[FFmpeg-devel] Patch review request: 10bit DNxHD decoding support
Michael Niedermayer
michaelni
Fri Mar 11 11:06:08 CET 2011
On Fri, Mar 11, 2011 at 09:11:04AM +0000, Joseph Artsimovich wrote:
> > @@ -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.
i dunno about having 2 but the *dsp means that there is an additional
pointer dereference on each call, this may result in a tiny performance drop
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110311/65e1ec0d/attachment.pgp>
More information about the ffmpeg-devel
mailing list