History

avcodec/h264: fix reference reordering

Fixes hardware decoders depending on long_term_pic_idx. Relevant ITU conformance test vectors: MR6_BT_B, MR8_BT_B

averne committed 1 year ago

Commit 02eda841 parent 1e5c65f1 file · +2 −3Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/h264_refs.c+2−3
@@ -337,7 +337,7 @@ int ff_h264_build_ref_list(H264Context *h, H264SliceContext *sl) · 336 unmodified lines
337337 break;
338338 }
339339 if (i >= 0)
340− ref->pic_id = pred;
340+ pic_id = pred;
341341 break;
342342 }
343343 case 2: {
@@ -354,7 +354,6 @@ int ff_h264_build_ref_list(H264Context *h, H264SliceContext *sl) · 10 unmodified lines
354354 ref = h->long_ref[long_idx];
355355 assert(!(ref && !ref->reference));
356356 if (ref && (ref->reference & pic_structure)) {
357− ref->pic_id = pic_id;
358357 assert(ref->long_ref);
359358 i = 0;
360359 } else {
@@ -376,7 +375,7 @@ int ff_h264_build_ref_list(H264Context *h, H264SliceContext *sl) · 15 unmodified lines
376375 for (i = index; i + 1 < sl->ref_count[list]; i++) {
377376 if (sl->ref_list[list][i].parent &&
378377 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)
380379 break;
381380 }
382381 for (; i > index; i--) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t