On Tue, Nov 10, 2020 at 11:58:22AM +0100, Andreas Rheinhardt wrote: > Expressions like array[get_vlc2()] can be optimized by using a symbols > table if the array is always the same for a given VLC. This requirement > is fulfilled for the VLC used for VP3 motion vectors. The reason it > hasn't been done before is probably that the array in this case > contained entries in the range -31..31; but this is no problem with > ff_init_vlc_from_lengths(): Just apply an offset of 31 to the symbols > before storing them in the table used to initialize VP3 motion vectors > and apply an offset of -31 when initializing the actual VLC. > > Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@gmail.com> > --- > libavcodec/vp3.c | 20 ++++++++++++------- > libavcodec/vp3data.h | 46 +++++++++++--------------------------------- > 2 files changed, 24 insertions(+), 42 deletions(-) > > diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c > index 7037d03a98..f288a53fe1 100644 > --- a/libavcodec/vp3.c > +++ b/libavcodec/vp3.c > @@ -48,6 +48,7 @@ > #include "vp3dsp.h" > #include "xiph.h" > > +#define VP3_MV_VLC_BITS 6 > #define VP4_MV_VLC_BITS 6 > #define SUPERBLOCK_VLC_BITS 6
or just use '#define MV_VLC_BITS 6' -- Peter (A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".