[FFmpeg-devel] [PATCH] Optimize QTRLE encoding

Michael Niedermayer michaelni at gmx.at
Sun Feb 17 17:21:37 CET 2013


On Fri, Feb 15, 2013 at 04:02:09PM -0500, Malcolm Bechard wrote:
> On Fri, Feb 15, 2013 at 3:12 PM, Alexis Ballier <alexis.ballier at gmail.com>wrote:
> 
> > looks good to me, thanks
> >
> > just one nitpick:
> >
> > @@ -164,6 +218,7 @@ static void qtrle_encode_line(QtrleEncContext *s,
> > const AVFrame *p, int line, ui
> >
> >          total_repeat_cost = s->length_table[i + repeatcount] + 1 +
> > s->pixel_size;
> >
> > +
> >          /* skip code is free for the first pixel, it costs one byte
> > for repeat and bulk copy
> >           * so let's make it aware */
> >          if (i == 0) {
> >
> >
> > this hunk appears in your diff, I think some people would prefer if it
> > were removed ^^
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> 
> Ok, here's an update with that removed.
> 
> Malcolm

>  qtrleenc.c |   87 ++++++++++++++++++++++++++++++++++++++++++++++---------------
>  1 file changed, 67 insertions(+), 20 deletions(-)
> c88603b1c5e1ec4a7ec66add209069e03c66b662  0001-Improve-QTRLE-encoding-performance-no-change-to-outp.patch
> From 0af76909ff8bc12264451ad2df74f02df65ab5ce Mon Sep 17 00:00:00 2001
> From: Malcolm Bechard <malcolm.bechard at gmail.com>
> Date: Fri, 15 Feb 2013 10:53:27 -0500
> Subject: [PATCH] Improve QTRLE encoding performance, no change to output file
>  size/content.
> 
> Avoid searching for the lowest bulk cost for each pixel that isn't a repeat/skip. Instead store the lowest cost as we go along each pixel, and use it as needed.

this patch breaks make fate

--- ./tests/ref/vsynth/vsynth2-qtrle    2013-02-17 13:57:19.199049065 +0100
+++ tests/data/fate/vsynth2-qtrle   2013-02-17 17:18:05.771302853 +0100
@@ -1,4 +1,4 @@
-f2aea57de225cccadb936bba4086a836 *tests/data/fate/vsynth2-qtrle.mov
-14798345 tests/data/fate/vsynth2-qtrle.mov
+c63c8c5e96bd0103c8494f0081fde689 *tests/data/fate/vsynth2-qtrle.mov
+14798495 tests/data/fate/vsynth2-qtrle.mov
 98d0e2854731472c5bf13d8638502d0a *tests/data/fate/vsynth2-qtrle.out.rawvideo
 stddev:    1.26 PSNR: 46.10 MAXDIFF:   13 bytes:  7603200/  7603200

 
[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

What does censorship reveal? It reveals fear. -- Julian Assange
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130217/8bdf1902/attachment.asc>


More information about the ffmpeg-devel mailing list