Open Gnurou opened 1 year ago
On it.
ffmpeg is falling back to the software decoder for MR3_TANDBERG_B
.
thread 'main' panicked at 'decoder error: Could not find a ShortTerm picture to mark in the DPB', /usr/local/google/home/acourbot/Work/cros-codecs/src/utils.rs:234:27
I fixed this by fixing a bug in the frame gap algorithm, but nevertheless there's still corruption. I get the exact same output from GStreamer.
Frames #283-#299 exhibit corruption for some macroblocks, which is usually due to errors in the slice reference lists.
Here's what both us and GStreamer are sending:
10.490350][ctx none]=========vaMapBuffer ret = VA_STATUS_SUCCESS, success (no error)
[27610.490350][ctx 0x0000002c] element[0] =
[27610.490350][ctx 0x0000002c] --VAPictureParameterBufferH264
[27610.490351][ctx 0x0000002c] CurrPic.picture_id = 0x0000001b
[27610.490351][ctx 0x0000002c] CurrPic.frame_idx = 226
[27610.490352][ctx 0x0000002c] CurrPic.flags = 0x00000008
[27610.490352][ctx 0x0000002c] CurrPic.TopFieldOrderCnt = 964
[27610.490352][ctx 0x0000002c] CurrPic.BottomFieldOrderCnt = 964
[27610.490352][ctx 0x0000002c] ReferenceFrames (TopFieldOrderCnt-BottomFieldOrderCnt-picture_id-frame_idx-flags):
[27610.490353][ctx 0x0000002c] 00000946-00000946-0x00000027-00000217-0x00000008
[27610.490354][ctx 0x0000002c] 00000948-00000948-0x00000028-00000218-0x00000008
[27610.490354][ctx 0x0000002c] 00000954-00000954-0x0000002a-00000221-0x00000008
[27610.490355][ctx 0x0000002c] 00000962-00000962-0x0000001a-00000225-0x00000008
[27610.490355][ctx 0x0000002c] 00000956-00000956-0x0000002b-00000000-0x00000010
Except that using JM, these are (apparently) the right values for this frame (breakpoint on void init_lists_p_slice(Slice *currSlice)
on currSlice->frame_num==226
, which matches the frame_num in cros-codecs
for timestamp==283
.
(Using POC to avoid confusion with frame_idx, which changes meaning depending on whether it's a short term or long term ref)
962
954
948
946
956
So apparently a bug in fn init_ref_pic_list_p(&mut self)
for this particular case
OK I stand corrected. We're sending the same data and this just happens to fail on AMD :/
I will chalk it up to a bug in the AMD driver, as I got this to pass on Intel
MR4_TANDBERG_C
is also broken on both GStreamer and ccdec on AMD. Likely driver issue.
Same for MR5_TANDBERG_C
FFmpeg VAAPI can pass these tests, so this is likely a problem with our H.264 parser.