[FFmpeg-devel] [Ffmpeg-devel][PATCH] WMV 3 encoding support (intra main profile)

Kostya kostya.shishkov
Wed May 2 17:49:02 CEST 2007


On Wed, May 02, 2007 at 05:46:07AM +0300, Kostya wrote:
> On Tue, May 01, 2007 at 09:04:15PM +0200, Denis Fortin wrote:
> [...]
> > > > Index: libavcodec/h263data.h
> > > > ===================================================================
> > > > --- libavcodec/h263data.h        (revision 8855)
> > > > +++ libavcodec/h263data.h        (copie de travail)
> > > > @@ -111,7 +111,7 @@
> > > >  };
> > > >  
> > > >  /* third non intra table */
> > > > -const uint16_t inter_vlc[103][2] = {
> > > > +const uint32_t inter_vlc[103][2] = {
> > > >  { 0x2, 2 },{ 0xf, 4 },{ 0x15, 6 },{ 0x17, 7 },
> > > >  { 0x1f, 8 },{ 0x25, 9 },{ 0x24, 9 },{ 0x21, 10 },
> > > >  { 0x20, 10 },{ 0x7, 11 },{ 0x6, 11 },{ 0x20, 11 },
> > > 
> > > iam against doubling the size of all tables because 1 new table doesnt
> > > fit in 16bit, how "ugly" would a if() be at the one or 2 spots where
> > > the table is used?
> > i'll need to change: 
> > -msmpeg4.c: find_best_table to separately test these two new tables.
> > -msmepg4.c: msmpeg4_encode_block to check if index is not out of bound
> > -vc1enc.c: to adjust indexes
> > I'll check later if it's not too ugly.
> > There's still 6 tables duplicated between vc1acdata.h (uint32_t) and
> > msmpeg4data.h(uint16_t).
> > It's not unreasonable to keep uint32_t tables.
> > I suggest to ask Kostya about what he prefers for vc1 decoder and then
> > i'll adapt the encoder.
> 
> Well, I think I may reuse tables from msmpeg though I haven't done that
> because of additional tables. I'll look at it ASAP.

After some code studying I suggest to turn RLTable accepted values to
uint32_t.

Expected additional static data size needed for conversion ~6500 bytes
but after removing duplicate VC-1 tables it will be only about 2k.
Dynamically allocated memory size is also should be tolerable.

On the positive side I will be able to use RL codes in VC-1 decoder
(and encoder will be able to do the same). 




More information about the ffmpeg-devel mailing list