diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-11-01 05:36:35 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-12-08 17:51:46 +0100 |
commit | 3aa81a634a3d559288afcadce5ca3b1c57e57098 (patch) | |
tree | 44c41b88904b145d0df040f42c16c9fd94142aae /libavcodec/mpeg4video.h | |
parent | 0d71ac319f74a85add9c62c31461b4dd4dcfcabd (diff) |
avcodec/mpeg4video: Make tables used to initialize VLCs smaller
Switching from ff_init_vlc_sparse() to ff_init_vlc_from_lengths()
allows to replace codes which are so long that they need to be stored
in an uint16_t by symbols which fit into an uint8_t; and even these can
be avoided in case of the sprite trajectory VLC.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/mpeg4video.h')
-rw-r--r-- | libavcodec/mpeg4video.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/mpeg4video.h b/libavcodec/mpeg4video.h index 1a5da31928..3de598465f 100644 --- a/libavcodec/mpeg4video.h +++ b/libavcodec/mpeg4video.h @@ -138,7 +138,7 @@ extern RLTable ff_mpeg4_rl_intra; extern RLTable ff_rvlc_rl_inter; extern RLTable ff_rvlc_rl_intra; -extern const uint16_t ff_sprite_trajectory_tab[15][2]; +extern const uint8_t ff_sprite_trajectory_lens[15]; extern const uint8_t ff_mb_type_b_tab[4][2]; /* these matrixes will be permuted for the idct */ @@ -151,9 +151,9 @@ extern const uint16_t ff_mpeg4_resync_prefix[8]; extern const uint8_t ff_mpeg4_dc_threshold[8]; -extern const uint16_t ff_mpeg4_studio_dc_luma[19][2]; -extern const uint16_t ff_mpeg4_studio_dc_chroma[19][2]; -extern const uint16_t ff_mpeg4_studio_intra[12][22][2]; +extern const uint8_t ff_mpeg4_studio_dc_luma[19][2]; +extern const uint8_t ff_mpeg4_studio_dc_chroma[19][2]; +extern const uint8_t ff_mpeg4_studio_intra[12][24][2]; void ff_mpeg4_encode_mb(MpegEncContext *s, int16_t block[6][64], |