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

Andreas Öman andreas
Tue Jul 3 13:13:49 CEST 2007


Michael Niedermayer wrote:
> Hi
> On Wed, Jun 27, 2007 at 11:20:28AM +0200, Andreas ?man wrote:
>> Hi (again)
>> Andreas ?man wrote:
>>> Hi,
>>> 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.
>> The following patch fixes the issue (at least it looks much better,
>> but i have no reference decoder to make a binary verification)
>> Can you please try it?
>> There is a slight slowdown though, (see qp-timings.txt)
>> I'll look if some parts can be rewritten or optimized in some way.
>> Comments welcome..
> well as its a bugfix its needed evem if it slows the code down, but of
> course applying a bugfix which slows the code down is a last resort
> ...  [snip]

I basically did two things.

a) compute a new qptable for each pps, see build_qp_table()

b) keep qmul argument around calls to residual decoding.
This one seems to make most of the difference.

These two changes will be separate patches.

Here are the results from timing with

time ./ffmpeg -i $FILE -f null /deV/null 2>/dev/null


svn:     (3.248+3.220+3.224+3.248+3.248)/5

patched: (3.236+3.236+3.208+3.248+3.264)/5


svn:     (5.384+5.356+5.304+5.340+5.372)/5

patched: (5.336+5.316+5.332+5.320+5.440)/5


svn:     (25.962+26.170+25.974+26.022+25.998)/5

patched: (26.050+26.106+26.050+26.106+26.074)/5

More information about the ffmpeg-devel mailing list