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

Andreas Öman andreas
Fri Jul 6 12:26:36 CEST 2007


Hi

Michael Niedermayer wrote:
> Hi
> 
> [...]
> 
>> @@ -6682,7 +6689,9 @@
>>  static void filter_mb_fast( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint8_t *img_cb, uint8_t *img_cr, unsigned int linesize, unsigned int uvlinesize) {
>>      MpegEncContext * const s = &h->s;
>>      int mb_xy, mb_type;
>> -    int qp, qp0, qp1, qpc, qpc0, qpc1, qp_thresh;
>> +    int qp, qp0, qp1, qp_thresh;
>> +    int qpb, qpb0, qpb1;
>> +    int qpr, qpr0, qpr1;
>>  
>>      mb_xy = mb_x + mb_y*s->mb_stride;
>>  
> 
> as said, please leave the fast/simple cases as is, without 2 chroma QPs

ok, fixed in the deblocker, i dont find any other places where i can
think it's worth it.

The initial check in filter_mb_fast() is a bit bloated now,
I'll see if it can be relaxed a bit (compute a boolean at
start of slice). I'll send that as a separate patch once this
is in.

> [...]
>> @@ -171,7 +171,7 @@
>>      int got_avcC; ///< flag used to parse avcC data only once
>>      int nal_length_size; ///< Number of bytes used for nal length (1, 2 or 4)
>>  
>> -    int chroma_qp; //QPc
>> +    int chroma_qp[0]; //QPc
> 
> this looks odd

Yikes, what a typo :(
It must have used prev_mb_skipped and next_mb_skipped as
storage then :). I rerun the tests and it didnt seem to have
affected the first timing measurements i did.

Here are timings with this patch (try#3)

Aladin.mpg

svn           avg: 3.213  stddev: 0.009  med: 3.214
qmul.diff     avg: 3.207  stddev: 0.005  med: 3.206
qplookup.diff avg: 3.209  stddev: 0.015  med: 3.204
secondqp.diff avg: 3.214  stddev: 0.010  med: 3.216
try#1         avg: 3.223  stddev: 0.015  med: 3.220
try#3         avg: 3.217  stddev: 0.013  med: 3.216

SVT.ts

svn           avg: 5.298  stddev: 0.016  med: 5.308
qmul.diff     avg: 5.315  stddev: 0.021  med: 5.308
qplookup.diff avg: 5.284  stddev: 0.009  med: 5.280
secondqp.diff avg: 5.320  stddev: 0.052  med: 5.316
try#1         avg: 5.344  stddev: 0.010  med: 5.344
try#3         avg: 5.324  stddev: 0.042  med: 5.312

ffh264_issue3.h264

svn           avg: 26.366  stddev: 0.055  med: 26.390
qmul.diff     avg: 26.292  stddev: 0.035  med: 26.298
qplookup.diff avg: 26.153  stddev: 0.020  med: 26.150
secondqp.diff avg: 26.315  stddev: 0.034  med: 26.298
try#1         avg: 26.421  stddev: 0.023  med: 26.422
try#3         avg: 26.113  stddev: 0.024  med: 26.122

apple zodiac trailer

svn           avg: 34.731  stddev: 0.068  med: 34.726
qmul.diff     avg: 34.691  stddev: 0.041  med: 34.694
qplookup.diff avg: 34.748  stddev: 0.064  med: 34.774
secondqp.diff avg: 34.796  stddev: 0.057  med: 34.778
try#1         avg: 34.954  stddev: 0.026  med: 34.958
try#3         avg: 34.826  stddev: 0.206  med: 34.718



-------------- next part --------------
A non-text attachment was scrubbed...
Name: qp-take3.diff
Type: text/x-patch
Size: 17661 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070706/8d4efde8/attachment.bin>



More information about the ffmpeg-devel mailing list