Possible now that MB_TYPE_L1 (which does not fit into an int16_t) is no longer used).
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -67,7 +67,7 @@ static VLCElem studio_chroma_dc[528]; · 66 unmodified lines | ||
| 67 | 67 | |
| 68 | 68 | static const uint8_t mpeg4_block_count[4] = { 0, 6, 8, 12 }; |
| 69 | 69 | |
| 70 | −static const int mb_type_b_map[4] = { | |
| 70 | +static const int16_t mb_type_b_map[4] = { | |
| 71 | 71 | MB_TYPE_DIRECT2 | MB_TYPE_BIDIR_MV, |
| 72 | 72 | MB_TYPE_BIDIR_MV | MB_TYPE_16x16, |
| 73 | 73 | MB_TYPE_BACKWARD_MV | MB_TYPE_16x16, |
| @@ -1845,7 +1845,6 @@ static int mpeg4_decode_mb(MpegEncContext *s, int16_t block[6][64]) · 1771 unmodified lines | ||
| 1845 | 1845 | av_log(s->avctx, AV_LOG_ERROR, "illegal MB_type\n"); |
| 1846 | 1846 | return AVERROR_INVALIDDATA; |
| 1847 | 1847 | } |
| 1848 | − mb_type = mb_type_b_map[mb_type]; | |
| 1849 | 1848 | if (modb2) { |
| 1850 | 1849 | cbp = 0; |
| 1851 | 1850 | } else { |
| @@ -3794,9 +3793,10 @@ static av_cold void mpeg4_init_static(void) · 1942 unmodified lines | ||
| 3794 | 3793 | VLC_INIT_STATIC_TABLE_FROM_LENGTHS(sprite_trajectory, SPRITE_TRAJ_VLC_BITS, 15, |
| 3795 | 3794 | ff_sprite_trajectory_lens, 1, |
| 3796 | 3795 | NULL, 0, 0, 0, 0); |
| 3797 | − VLC_INIT_STATIC_TABLE(mb_type_b_vlc, MB_TYPE_B_VLC_BITS, 4, | |
| 3798 | − &ff_mb_type_b_tab[0][1], 2, 1, | |
| 3799 | − &ff_mb_type_b_tab[0][0], 2, 1, 0); | |
| 3796 | + VLC_INIT_STATIC_SPARSE_TABLE(mb_type_b_vlc, MB_TYPE_B_VLC_BITS, 4, | |
| 3797 | + &ff_mb_type_b_tab[0][1], 2, 1, | |
| 3798 | + &ff_mb_type_b_tab[0][0], 2, 1, | |
| 3799 | + mb_type_b_map, 2, 2, 0); | |
| 3800 | 3800 | } |
| 3801 | 3801 | |
| 3802 | 3802 | static av_cold int decode_init(AVCodecContext *avctx) |