Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -59,7 +59,7 @@ · 58 unmodified lines | |||
| 59 | #define H263_MBTYPE_B_VLC_BITS 6 | 59 | #define H263_MBTYPE_B_VLC_BITS 6 |
| 60 | #define CBPC_B_VLC_BITS 3 | 60 | #define CBPC_B_VLC_BITS 3 |
| 61 | 61 | ||
| 62 | static const int h263_mb_type_b_map[15]= { | 62 | static const int16_t h263_mb_type_b_map[15]= { |
| 63 | MB_TYPE_DIRECT2 | MB_TYPE_BIDIR_MV, | 63 | MB_TYPE_DIRECT2 | MB_TYPE_BIDIR_MV, |
| 64 | MB_TYPE_DIRECT2 | MB_TYPE_BIDIR_MV | MB_TYPE_CBP, | 64 | MB_TYPE_DIRECT2 | MB_TYPE_BIDIR_MV | MB_TYPE_CBP, |
| 65 | MB_TYPE_DIRECT2 | MB_TYPE_BIDIR_MV | MB_TYPE_CBP | MB_TYPE_QUANT, | 65 | MB_TYPE_DIRECT2 | MB_TYPE_BIDIR_MV | MB_TYPE_CBP | MB_TYPE_QUANT, |
| @@ -125,9 +125,10 @@ static av_cold void h263_decode_init_vlc(void) · 59 unmodified lines | |||
| 125 | ff_h263_init_rl_inter(); | 125 | ff_h263_init_rl_inter(); |
| 126 | VLC_INIT_RL(ff_h263_rl_inter, 554); | 126 | VLC_INIT_RL(ff_h263_rl_inter, 554); |
| 127 | INIT_FIRST_VLC_RL(ff_rl_intra_aic, 554); | 127 | INIT_FIRST_VLC_RL(ff_rl_intra_aic, 554); |
| 128 | VLC_INIT_STATIC_TABLE(h263_mbtype_b_vlc, H263_MBTYPE_B_VLC_BITS, 15, | 128 | VLC_INIT_STATIC_SPARSE_TABLE(h263_mbtype_b_vlc, H263_MBTYPE_B_VLC_BITS, 15, |
| 129 | &ff_h263_mbtype_b_tab[0][1], 2, 1, | 129 | &ff_h263_mbtype_b_tab[0][1], 2, 1, |
| 130 | &ff_h263_mbtype_b_tab[0][0], 2, 1, 0); | 130 | &ff_h263_mbtype_b_tab[0][0], 2, 1, |
| 131 | h263_mb_type_b_map, 2, 2, 0); | ||
| 131 | VLC_INIT_STATIC_TABLE(cbpc_b_vlc, CBPC_B_VLC_BITS, 4, | 132 | VLC_INIT_STATIC_TABLE(cbpc_b_vlc, CBPC_B_VLC_BITS, 4, |
| 132 | &ff_cbpc_b_tab[0][1], 2, 1, | 133 | &ff_cbpc_b_tab[0][1], 2, 1, |
| 133 | &ff_cbpc_b_tab[0][0], 2, 1, 0); | 134 | &ff_cbpc_b_tab[0][0], 2, 1, 0); |
| @@ -911,8 +912,6 @@ int ff_h263_decode_mb(MpegEncContext *s, · 777 unmodified lines | |||
| 911 | av_log(s->avctx, AV_LOG_ERROR, "b mb_type damaged at %d %d\n", s->mb_x, s->mb_y); | 912 | av_log(s->avctx, AV_LOG_ERROR, "b mb_type damaged at %d %d\n", s->mb_x, s->mb_y); |
| 912 | return SLICE_ERROR; | 913 | return SLICE_ERROR; |
| 913 | } | 914 | } |
| 914 | |||
| 915 | mb_type= h263_mb_type_b_map[ mb_type ]; | ||
| 916 | }while(!mb_type); | 915 | }while(!mb_type); |
| 917 | 916 | ||
| 918 | s->mb_intra = IS_INTRA(mb_type); | 917 | s->mb_intra = IS_INTRA(mb_type); |