[FFmpeg-devel] Color corruption and seeking errors with H264 disc sources

Andreas Öman andreas
Tue Jun 26 22:05:59 CEST 2007


Hi,

infernix wrote:
> Hi all,
> 
> I've gathered a few samples which show problems with todays ffmpeg and 
> mplayer SVN. I have uploaded these to 
> upload.mplayerhq.hu/MPlayer/incoming/ffh264_issues/ and they are also 
> available at http://dx.infernix.net/ffh264/
> 
> - ffh264_issue1.m2ts and 2 are cut from a Bluray disc and exhibit red 
> and green colors in horizontal bands where they really should not. 
> Strangely enough, this occurs and ends on scene changes. Note that the 
> first few frames are corrupted due to it being a raw cut. I've 
> illustrated this problem here: 
> http://dx.infernix.net/ffh264/ffh264_issue1.png and this is reproducable 
> with ffplay and mplayer.
> 
> - ffh264_issue3.h264 gives greenish/purpleish colors in the skyline that 
> change every ~2 seconds. This is also incorrect and might be related to 
> the problem above. This is cut from a demuxed H264 stream off of a HDDVD 
> disc.
> 

Issue 1, 2 and 3 seems to be a result of that ffmpegs h264 doesn't
read 'second_chroma_qp_index_offset' from the PPS.
second_chroma_qp_index_offset is used to select different index
offsets for the Cr and Cb planes, and I would guess that this "bug" will
result in these type of errors.

Looking at debug output (where i print out both index offsets) we
see that they differ (for PPS 1 which is used in some of the scenes):

[h264 @ 0x848ee28]slice:2 F mb:2040 B pps:0 frame:78 poc:128/128 ref:1/1 
qp:23 loop:1:0:0 weight:0
[h264 @ 0x848ee28]slice:3 F mb:4080 B pps:0 frame:78 poc:128/128 ref:1/1 
qp:23 loop:1:0:0 weight:0
[h264 @ 0x848ee28]slice:4 F mb:6120 B pps:0 frame:78 poc:128/128 ref:1/1 
qp:23 loop:1:0:0 weight:0
[h264 @ 0x848ee28]sps:0 profile:100/41 poc:0 ref:3 120x68 FRM 8B8 
crop:0/0/0/4 VUI
[h264 @ 0x848ee28]pps:0 sps:0 CABAC slice_groups:1 ref:3/1 
qp:26/26/-2/-2    8x8DCT
[h264 @ 0x848ee28]pps:1 sps:0 CABAC slice_groups:1 ref:3/1 
qp:26/26/-6/6    8x8DCT  <- here
[h264 @ 0x848ee28]slice:1 F mb:0 I pps:1 frame:0 poc:0/0 ref:3/1 qp:19 
loop:1:0:0 weight:0
[h264 @ 0x848ee28]slice:2 F mb:2040 I pps:1 frame:0 poc:0/0 ref:3/1 
qp:19 loop:1:0:0 weight:0
[h264 @ 0x848ee28]slice:3 F mb:4080 I pps:1 frame:0 poc:0/0 ref:3/1 
qp:19 loop:1:0:0 weight:0
[h264 @ 0x848ee28]slice:4 F mb:6120 I pps:1 frame:0 poc:0/0 ref:3/1 
qp:19 loop:1:0:0 weight:0

I no one else does it, i might take a look at this tomorrow if i can
find some time. But please, since i'm no h264 expert, if someone with
more expertise takes a look at it, drop me a mail or something so
i dont wast my time.

Michael, perhaps you care to comment a bit on this too?


> - ffh264_issue4.h264 gives a black block at about the 80th frame. This 
> file also gives seeking errors with ffplay and crashes mplayer when 
> seeking, but that might be unavoidable and unrelated.

I can confirm the missing block, but haven't really figured out why.




More information about the ffmpeg-devel mailing list