Fixes hardware decoders depending on long_term_pic_idx. Relevant ITU conformance test vectors: MR6_BT_B, MR8_BT_B
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -337,7 +337,7 @@ int ff_h264_build_ref_list(H264Context *h, H264SliceContext *sl) · 336 unmodified lines | |||
| 337 | break; | 337 | break; |
| 338 | } | 338 | } |
| 339 | if (i >= 0) | 339 | if (i >= 0) |
| 340 | ref->pic_id = pred; | 340 | pic_id = pred; |
| 341 | break; | 341 | break; |
| 342 | } | 342 | } |
| 343 | case 2: { | 343 | case 2: { |
| @@ -354,7 +354,6 @@ int ff_h264_build_ref_list(H264Context *h, H264SliceContext *sl) · 10 unmodified lines | |||
| 354 | ref = h->long_ref[long_idx]; | 354 | ref = h->long_ref[long_idx]; |
| 355 | assert(!(ref && !ref->reference)); | 355 | assert(!(ref && !ref->reference)); |
| 356 | if (ref && (ref->reference & pic_structure)) { | 356 | if (ref && (ref->reference & pic_structure)) { |
| 357 | ref->pic_id = pic_id; | ||
| 358 | assert(ref->long_ref); | 357 | assert(ref->long_ref); |
| 359 | i = 0; | 358 | i = 0; |
| 360 | } else { | 359 | } else { |
| @@ -376,7 +375,7 @@ int ff_h264_build_ref_list(H264Context *h, H264SliceContext *sl) · 15 unmodified lines | |||
| 376 | for (i = index; i + 1 < sl->ref_count[list]; i++) { | 375 | for (i = index; i + 1 < sl->ref_count[list]; i++) { |
| 377 | if (sl->ref_list[list][i].parent && | 376 | if (sl->ref_list[list][i].parent && |
| 378 | ref->long_ref == sl->ref_list[list][i].parent->long_ref && | 377 | ref->long_ref == sl->ref_list[list][i].parent->long_ref && |
| 379 | ref->pic_id == sl->ref_list[list][i].pic_id) | 378 | pic_id == sl->ref_list[list][i].pic_id) |
| 380 | break; | 379 | break; |
| 381 | } | 380 | } |
| 382 | for (; i > index; i--) { | 381 | for (; i > index; i--) { |