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++){
491 for (i = 0; i < n_mmcos; i++) {
492 if (mmco1[i].opcode != mmco2[i].opcode)
503 int mmco_index = 0, i;
524 }
else if (!first_slice && mmco_index >= 0 &&
528 "Inconsistent MMCO state between slices [%d, %d, %d]\n",
538 int current_ref_assigned=0, err=0;
544 for(i=0; i<mmco_count; i++){
545 int av_uninit(structure), av_uninit(frame_num);
563 switch(mmco[i].opcode){
606 current_ref_assigned=1;
609 assert(mmco[i].long_arg <= 16);
611 for(j = mmco[i].long_arg; j<16; j++){
619 for(j = 0; j < 16; j++) {
631 if (!current_ref_assigned) {
643 "assignment for second field "
644 "in complementary field pair "
645 "(first field is long term)\n");
671 "number of reference frames (%d+%d) exceeds max (%d; probably "
672 "corrupt input), discarding one\n",
677 for (i = 0; i < 16; ++i)
723 "illegal short ref in memory management control "
724 "operation %d\n", mmco);
732 if (long_arg >= 32 ||
737 "illegal long ref in memory management control "
738 "operation %d\n", opcode);
746 "illegal memory management control operation %d\n",
764 if (first_slice && mmco_index != -1) {
766 }
else if (!first_slice && mmco_index >= 0 &&
770 "Inconsistent MMCO state between slices [%d, %d, %d]\n",