[FFmpeg-devel] [PATCH] QT RLE header parser refactoring

Mike Melanson mike
Tue Mar 11 17:44:36 CET 2008

Michael Niedermayer wrote:
> On Mon, Mar 10, 2008 at 09:01:32PM -0700, Mike Melanson wrote:
>> Mike Melanson wrote:
>>> Yeah. I didn't like the idea either, to be honest. :) I have better
>>> ideas for refactoring I'll try next.
>> Here's my next idea. This is not a final draft; it's just a prototype to 
>> see if I'm going in the right direction. For the 8-bit decoding case, I 
>> moved the header parsing code into the main decode function and passed 3 
>> extra parameters into the 8-bit decoding function. There's a lot of cruft 
>> in this one but that would go away in the final draft.
> Yes, the header parsing should be factored as well. So yes this is the right
> direction.
> And after that the bpp sould be passed into the function instead of having
> a dozen functions.
> And then the AVPalette stuff should be cleaned up
> Then the CHECK_STREAM_PTR / CHECK_PIXEL_PTR should be removed and
> a minimum of checks be implemented cleanly.
> :)

Great. Thanks for the roadmap. I'm not sure about the second step--
passing the bpp into the function. This implies making 1 unified RLE
decoder function rather than 7. But each RLE unpacker is slightly
different for each. Should there be 7 different functions, or 1 function
that has 7 case statements?

	-Mike Melanson

More information about the ffmpeg-devel mailing list