40 for (i = 0; i < 4; ++i) {
50 int parity,
int id_add){
69 while(i[0]<len || i[1]<len){
70 while (i[0] < len && !(in[ i[0] ] && (in[ i[0] ]->
f.reference & sel)))
72 while (i[1] < len && !(in[ i[1] ] && (in[ i[1] ]->
f.reference & (sel^3))))
92 best_poc= dir ? INT_MIN : INT_MAX;
95 const int poc= src[i]->
poc;
96 if(((poc > limit) ^ dir) && ((poc < best_poc) ^ dir)){
98 sorted[out_i]= src[i];
101 if(best_poc == (dir ? INT_MIN : INT_MAX))
103 limit= sorted[out_i++]->
poc - dir;
122 for(list= 0; list<2; list++){
130 if(len < h->ref_count[list])
135 if(lens[0] == lens[1] && lens[1] > 1){
144 if(len < h->ref_count[0])
189 int list,
index, pic_structure;
200 for(index=0; ; index++){
206 if(reordering_of_pic_nums_idc==3)
214 if(reordering_of_pic_nums_idc<3){
215 if(reordering_of_pic_nums_idc<2){
224 if(reordering_of_pic_nums_idc == 0) pred-= abs_diff_pic_num;
225 else pred+= abs_diff_pic_num;
254 if (ref && (ref->
f.
reference & pic_structure)) {
267 for(i=index; i+1<h->
ref_count[list]; i++){
271 for(; i >
index; i--){
287 for(index= 0; index < h->
ref_count[list]; index++){
303 for(list=0; list<2; list++){
309 field[0].
f.linesize[j] <<= 1;
384 assert(i >= 0 && i < h->short_ref_count);
469 for(i = 0; i < 16; i++){
501 int current_ref_assigned=0, err=0;
507 for(i=0; i<mmco_count; i++){
526 switch(mmco[i].opcode){
569 current_ref_assigned=1;
572 assert(mmco[i].long_arg <= 16);
574 for(j = mmco[i].long_arg; j<16; j++){
582 for(j = 0; j < 16; j++) {
594 if (!current_ref_assigned) {
606 "assignment for second field "
607 "in complementary field pair "
608 "(first field is long term)\n");
634 "number of reference frames (%d+%d) exceeds max (%d; probably "
635 "corrupt input), discarding one\n",
640 for (i = 0; i < 16; ++i)