[FFmpeg-devel] Patch review request: 10bit DNxHD decoding support

Joseph Artsimovich joseph
Fri Mar 11 10:11:04 CET 2011


> @@ -39,8 +40,16 @@ typedef struct {
>       int cur_field;                      ///< current interlaced field
>       VLC ac_vlc, dc_vlc, run_vlc;
>       int last_dc[3];
> -    DSPContext dsp;
> +
> +    /* It easier to have both DSPs always initialized than initialize one
> +       on demand. Note that these DSPs may have different permutation
> tables. */
> +    DSPContext dsp8;
> +    DSPContext dsp10;
> +    DSPContext* dsp;
> 
> I think you should avoid having DSPContext twice. If you really need 8bit and
> 10bit decoding in the same file or stream, you could just add a second
> permutation table within DSPContext, one for the 8bit IDCT as is and the
> other for the 10bit IDCT.
Any particular reason why not?  I mean they are reentrant and relatively lightweight. The reason I decided to have both is that bit depth is specified in frame header, and therefore it's theoretically possible for it to change on the fly.  I am also not a great fan of foo_is_initialized type of flags.


Joseph Artsimovich
Software Developer
MirriAd Ltd






More information about the ffmpeg-devel mailing list