Opened 9 years ago
Closed 8 years ago
#5614 closed defect (needs_more_info)
VDA output error and pixelation frames
Reported by: | niltsh | Owned by: | |
---|---|---|---|
Priority: | important | Component: | avcodec |
Version: | git-master | Keywords: | vda regression |
Cc: | zongyao.qu@gmail.com | Blocked By: | |
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Tested on latest MPlayer and FFmpeg by today.
decoder is h264_vda, the software decoder does NOT have the issue.
For some files, the following error outputs and the output frames looks pixelated, looks like that the I frame for reference is missing.
Such symptom lasts for several frames and will be corrected automatically.
-> I think it is because there was a new I frame coming in, so the issue corrected automatically.
When I tried to seek forward or backward, such error output and frame image goes wrong always, and corrected after several frames.
I checked the reason for
Discarding mismatching reference
looks like the avctx-> format == 0x11, should be YUV, and the ref_list->parent->format == VDA_VLD.
[h264_vda @ 0x100ecd480]Discarding mismatching reference
[h264_vda @ 0x100ecd480]Missing reference picture, default is 0
[h264_vda @ 0x100ecd480]decode_slice_header error
[h264_vda @ 0x100ecd480]Discarding mismatching reference
[h264_vda @ 0x100ecd480]Discarding mismatching reference
[h264_vda @ 0x100ecd480]Missing reference picture, default is 0
[h264_vda @ 0x100ecd480]decode_slice_header error
[h264_vda @ 0x100ecd480]Discarding mismatching reference
[h264_vda @ 0x100ecd480]Discarding mismatching reference
[h264_vda @ 0x100ecd480]Missing reference picture, default is 0
[h264_vda @ 0x100ecd480]decode_slice_header error
[h264_vda @ 0x100ecd480]Discarding mismatching reference
[h264_vda @ 0x100ecd480]Missing reference picture, default is 65542
Attachments (1)
Change History (11)
comment:1 by , 9 years ago
Priority: | important → normal |
---|
comment:2 by , 9 years ago
Hi
I used mplayer.
And FFmpeg is compiled from source, by placing the ffmpeg source inside of mplayer.
The command for mplayer is
./mplayer -demuxer lavf -vc ffh264vda xxxxxx.mp4
If I remove the -vc ffh264vda , the issue does not occur.
comment:3 by , 9 years ago
If this issue is reproducible with FFmpeg, please provide the command line that allows to reproduce it together with the complete, uncut console output.
If this is an issue that is only reproducible with MPlayer, please close this ticket and report the bug on the MPlayer bug tracker.
comment:4 by , 9 years ago
Managed to compile the ffplay and reproduced the issue w/o mplayer.
The command line is ./ffplay -vcodec h264_vda /Volumes/Backup\&Collection/...(the file path)
the output is
ffplay version N-80186-g39c0b22 Copyright (c) 2003-2016 the FFmpeg developers
built with Apple LLVM version 7.3.0 (clang-703.0.29)
configuration: --enable-ffplay
libavutil 55. 24.100 / 55. 24.100
libavcodec 57. 44.100 / 57. 44.100
libavformat 57. 37.101 / 57. 37.101
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 46.100 / 6. 46.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 0.101 / 2. 0.101
Input #0, matroska,webm, from '/Volumes/Backup&Collection/Movies/Batman/Batman.Begins.2005.BluRay.1080p.x264-CHD/Batman.Begins.2005.BluRay.1080p.DTS.2Audio.x2264-CHD.mkv':
Metadata:
encoder : libebml v0.7.7 + libmatroska v0.8.1
creation_time : 2009-11-13 05:13:01
Duration: 02:20:02.97, start: 0.000000, bitrate: 12130 kb/s
Stream #0:0(eng): Video: h264 (High), yuv420p, 1916x800, SAR 1:1 DAR 479:200, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
Metadata:
title : Batman.Begins.2005
Stream #0:1(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s (default)
Metadata:
title : DTS-5.1CH 1536K(From TrueHD5.1)
Stream #0:2(chi): Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
Metadata:
title : DD5.1 448k
2016-06-06 22:56:34.277 ffplay[90688:708912] 22:56:34.277 WARNING: 140: This application, or a library it uses, is using the deprecated Carbon Component Manager for hosting Audio Units. Support for this will be removed in a future release. Also, this makes the host incompatible with version 3 audio units. Please transition to the API's in AudioComponent.h.
[h264_vda @ 0x7faed203c200] Discarding mismatching referencef=0/0
[h264_vda @ 0x7faed203c200] Missing reference picture, default is 0
[h264_vda @ 0x7faed203c200] decode_slice_header error
[h264_vda @ 0x7faed203c200] Discarding mismatching reference
[h264_vda @ 0x7faed203c200] Missing reference picture, default is 65538
[h264_vda @ 0x7faed203c200] Discarding mismatching reference
[h264_vda @ 0x7faed203c200] Missing reference picture, default is 65540
[h264_vda @ 0x7faed203c200] Discarding mismatching referencef=0/0
[h264_vda @ 0x7faed203c200] Missing reference picture, default is 65542
[h264_vda @ 0x7faed203c200] Discarding mismatching referencef=0/0 0
[h264_vda @ 0x7faed203c200] Missing reference picture, default is 0
[h264_vda @ 0x7faed203c200] decode_slice_header error
[h264_vda @ 0x7faed203c200] Discarding mismatching reference
[h264_vda @ 0x7faed203c200] Missing reference picture, default is 65538
[h264_vda @ 0x7faed203c200] Discarding mismatching reference
[h264_vda @ 0x7faed203c200] Missing reference picture, default is 65540
[h264_vda @ 0x7faed203c200] Discarding mismatching referencef=0/0
[h264_vda @ 0x7faed203c200] Missing reference picture, default is 65540
Error in reorder_list, couldn't find short term reference with PicNum 1
[h264_vda @ 0x7faed203c200] Discarding mismatching referencef=0/0
[h264_vda @ 0x7faed203c200] Missing reference picture, default is 0
[h264_vda @ 0x7faed203c200] decode_slice_header error
[h264_vda @ 0x7faed203c200] Discarding mismatching reference
[h264_vda @ 0x7faed203c200] Missing reference picture, default is 65538
[h264_vda @ 0x7faed203c200] Discarding mismatching reference
[h264_vda @ 0x7faed203c200] Missing reference picture, default is 65540
[h264_vda @ 0x7faed203c200] Discarding mismatching referencef=0/0
[h264_vda @ 0x7faed203c200] Missing reference picture, default is 65542
[h264_vda @ 0x7faed203c200] Discarding mismatching referencef=0/0
[h264_vda @ 0x7faed203c200] Missing reference picture, default is 0
[h264_vda @ 0x7faed203c200] decode_slice_header error
[h264_vda @ 0x7faed203c200] Discarding mismatching reference
[h264_vda @ 0x7faed203c200] Missing reference picture, default is 0
[h264_vda @ 0x7faed203c200] decode_slice_header error
[h264_vda @ 0x7faed203c200] Discarding mismatching reference
[h264_vda @ 0x7faed203c200] Missing reference picture, default is 0
[h264_vda @ 0x7faed203c200] decode_slice_header error
[h264_vda @ 0x7faed203c200] Discarding mismatching referencef=0/0
Error in reorder_list, couldn't find short term reference with PicNum 1
Error in reorder_list, couldn't find short term reference with PicNum 1
Error in reorder_list, couldn't find short term reference with PicNum 2
66.63 A-V: -0.005 fd= 1 aq= 225KB vq= 1698KB sq= 0B f=0/0
each time I press -> or <- to seek, the similar error will output and after several frames, the error stops and frame images came to normal.
Thank you.
also the screenshot is attached.
comment:5 by , 9 years ago
Sorry, I am not sure I understand: The issue is only reproducible with ffplay, not with ffmpeg?
comment:6 by , 9 years ago
AFAIK, ffmpeg is a transcoder, not a player.
I don't know how to reproduce it with transcoder, since the easiest way to reproduce it is to press -> or <- to fast-forward or backward.
As I already said, as long as the I frame comes, the issue disappears itself. the easiest way to create the "lack of I frame" situation is in the player.
If you know how to make such situation in ffmpeg, please let me know, I could help to confirm here.
Thank you.
comment:7 by , 9 years ago
Just brainlessly tried the following patch, and it could fix the pixelation issue.
But it has other error messages output.
the patch:
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index 6f9a041..c483308 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -1298,7 +1298,7 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl) || h->mb_height != h->sps.mb_height * (2 - h->sps.frame_mbs_only_flag) )); if (h->avctx->pix_fmt == AV_PIX_FMT_NONE - || (non_j_pixfmt(h->avctx->pix_fmt) != non_j_pixfmt(get_pixel_format(h, 0)))) + || (non_j_pixfmt(h->avctx->pix_fmt) != non_j_pixfmt(get_pixel_format(h, 1)))) must_reinit = 1; if (first_slice && av_cmp_q(h->sps.sar, h->avctx->sample_aspect_ratio))
the output with the patch:
[h264_vda @ 0x7ffb1c038800] Reinit context to 1280x544, pix_fmt: vda_vld Last message repeated 1 times [h264_vda @ 0x7ffb1c038800] co located POCs unavailable [h264_vda @ 0x7ffb1c038800] co located POCs unavailable 0B f=0/1 Last message repeated 1 times [h264_vda @ 0x7ffb1c038800] co located POCs unavailable 0B f=0/1 Last message repeated 4 times [h264_vda @ 0x7ffb1c038800] Reinit context to 1280x544, pix_fmt: vda_vld Last message repeated 1 times [h264_vda @ 0x7ffb1c038800] Reinit context to 1280x544, pix_fmt: vda_vld Last message repeated 1 times [h264_vda @ 0x7ffb1c038800] Reinit context to 1280x544, pix_fmt: vda_vld Last message repeated 1 times [h264_vda @ 0x7ffb1c038800] co located POCs unavailable
comment:8 by , 9 years ago
After bisecting, found the evil commit
commit 4aa0de644a2de62f0bc3013a4533ab9283aa0a65 Author: Michael Niedermayer <michaelni@gmx.at> Date: Tue Jun 30 03:23:30 2015 +0200 avcodec/h264_refs: discard mismatching references Fixes inconsistency and out of array access Fixes: asan_heap-oob_17301a3_2100_cov_3226131691_ff_add_pixels_clamped_mmx.m2ts Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
after revert it, the issue disappears.
comment:9 by , 9 years ago
can you post a sample of the metadata (ftyp+moov box)? Are you sure your file is properly muxed and that the keyframe are properly tagged as they should?
comment:10 by , 8 years ago
Keywords: | vda regression added; VDA removed |
---|---|
Priority: | normal → important |
Resolution: | → needs_more_info |
Status: | new → closed |
Please reopen if you can provide a sample file that allows to reproduce the issue.
Please provide your FFmpeg command line together with the complete, uncut console output to make this a valid ticket.