[FFmpeg-devel] [Patch] QT RLE encoder, bis

Alexis Ballier alexis.ballier
Sun Jun 24 15:56:03 CEST 2007


I've been reworking the QT RLE encoder sent months ago [1].
I should have taken into account the comments, and here is the little story :
I started by implementing the optimal coding algorithm, but it
happened to be too slow for what I wanted to do with it (screencasts),
but the code is here and should be correct.
Then I implemented the heuristic suggested in the last post of [1],
that seems good to me, and much faster which is perfect for

I've tried to follow the coding style but as this is my first patch
for ffmpeg, it's possible that I forgot something, so if it's not ok,
please tell me what and I'll send another patch.

There are some things that might need comments :
- I'm using the AVContext rc_max_rate variable to control whether to
use the optimal coding algorithm or the heuristic, that's the best
option I found but someone might have a better idea / not like this
- I've not bumped ffmpeg version in the patch as I don't know how it
should be changed
- I've left the copyright headers as in Baptiste's patch in [1], with
the credits to the original author

My benchs showed that the heuristic is about 10 times faster than the
optimal but produces files 10 to 20% bigger.

This encoder might support RGB555 pixel format but the current mov
muxer seems to only allow 24 bits per pixel, so that's disabled. [And
it will most likely support any pixel format that stores the pixels in
a variable of size a multiple of 8 bits]

[1]  http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2007-February/022756.html


-------------- next part --------------
A non-text attachment was scrubbed...
Name: qtrle_encoder2.patch
Type: text/x-patch
Size: 17651 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070624/03a227b2/attachment.bin>

More information about the ffmpeg-devel mailing list