40 for (i = 0; i < 4; ++i) {
50 int parity,
int id_add){
71 while ((i[0] < len || i[1] < len) && index < def_len) {
72 while (i[0] < len && !(in[ i[0] ] && (in[ i[0] ]->
f.reference & sel)))
74 while (i[1] < len && !(in[ i[1] ] && (in[ i[1] ]->
f.reference & (sel^3))))
76 if (i[0] < len && index < def_len) {
80 if (i[1] < len && index < def_len) {
94 best_poc= dir ? INT_MIN : INT_MAX;
97 const int poc= src[i]->
poc;
98 if(((poc > limit) ^ dir) && ((poc < best_poc) ^ dir)){
100 sorted[out_i]= src[i];
103 if(best_poc == (dir ? INT_MIN : INT_MAX))
105 limit= sorted[out_i++]->
poc - dir;
124 for(list= 0; list<2; list++){
135 if(len < h->ref_count[list])
140 if(lens[0] == lens[1] && lens[1] > 1){
152 if(len < h->ref_count[0])
197 int list,
index, pic_structure;
208 for(index=0; ; index++){
214 if(reordering_of_pic_nums_idc==3)
222 if(reordering_of_pic_nums_idc<3){
223 if(reordering_of_pic_nums_idc<2){
232 if(reordering_of_pic_nums_idc == 0) pred-= abs_diff_pic_num;
233 else pred+= abs_diff_pic_num;
262 if (ref && (ref->
f.
reference & pic_structure)) {
275 for(i=index; i+1<h->
ref_count[list]; i++){
279 for(; i >
index; i--){
295 for(index= 0; index < h->
ref_count[list]; index++){
311 for(list=0; list<2; list++){
317 field[0].
f.linesize[j] <<= 1;
392 assert(i >= 0 && i < h->short_ref_count);
477 for(i = 0; i < 16; i++){
509 int current_ref_assigned=0, err=0;
515 for(i=0; i<mmco_count; i++){
534 switch(mmco[i].opcode){
577 current_ref_assigned=1;
580 assert(mmco[i].long_arg <= 16);
582 for(j = mmco[i].long_arg; j<16; j++){
590 for(j = 0; j < 16; j++) {
602 if (!current_ref_assigned) {
614 "assignment for second field "
615 "in complementary field pair "
616 "(first field is long term)\n");
642 "number of reference frames (%d+%d) exceeds max (%d; probably "
643 "corrupt input), discarding one\n",
648 for (i = 0; i < 16; ++i)