Mercurial > libavcodec.hg
comparison svq1dec.c @ 10259:21add4db7e53 libavcodec
Use INIT_VLC_STATIC where easily possible in svq1dec
author | reimar |
---|---|
date | Thu, 24 Sep 2009 09:44:51 +0000 |
parents | 38cfe222e1a4 |
children | 0eed6587903b |
comparison
equal
deleted
inserted
replaced
10258:6829e70ef3aa | 10259:21add4db7e53 |
---|---|
778 avctx->pix_fmt = PIX_FMT_YUV410P; | 778 avctx->pix_fmt = PIX_FMT_YUV410P; |
779 avctx->has_b_frames= 1; // not true, but DP frames and these behave like unidirectional b frames | 779 avctx->has_b_frames= 1; // not true, but DP frames and these behave like unidirectional b frames |
780 s->flags= avctx->flags; | 780 s->flags= avctx->flags; |
781 if (MPV_common_init(s) < 0) return -1; | 781 if (MPV_common_init(s) < 0) return -1; |
782 | 782 |
783 init_vlc(&svq1_block_type, 2, 4, | 783 INIT_VLC_STATIC(&svq1_block_type, 2, 4, |
784 &ff_svq1_block_type_vlc[0][1], 2, 1, | 784 &ff_svq1_block_type_vlc[0][1], 2, 1, |
785 &ff_svq1_block_type_vlc[0][0], 2, 1, INIT_VLC_USE_STATIC); | 785 &ff_svq1_block_type_vlc[0][0], 2, 1, 6); |
786 | 786 |
787 init_vlc(&svq1_motion_component, 7, 33, | 787 INIT_VLC_STATIC(&svq1_motion_component, 7, 33, |
788 &mvtab[0][1], 2, 1, | 788 &mvtab[0][1], 2, 1, |
789 &mvtab[0][0], 2, 1, INIT_VLC_USE_STATIC); | 789 &mvtab[0][0], 2, 1, 176); |
790 | 790 |
791 for (i = 0; i < 6; i++) { | 791 for (i = 0; i < 6; i++) { |
792 init_vlc(&svq1_intra_multistage[i], 3, 8, | 792 init_vlc(&svq1_intra_multistage[i], 3, 8, |
793 &ff_svq1_intra_multistage_vlc[i][0][1], 2, 1, | 793 &ff_svq1_intra_multistage_vlc[i][0][1], 2, 1, |
794 &ff_svq1_intra_multistage_vlc[i][0][0], 2, 1, INIT_VLC_USE_STATIC); | 794 &ff_svq1_intra_multistage_vlc[i][0][0], 2, 1, INIT_VLC_USE_STATIC); |
795 init_vlc(&svq1_inter_multistage[i], 3, 8, | 795 init_vlc(&svq1_inter_multistage[i], 3, 8, |
796 &ff_svq1_inter_multistage_vlc[i][0][1], 2, 1, | 796 &ff_svq1_inter_multistage_vlc[i][0][1], 2, 1, |
797 &ff_svq1_inter_multistage_vlc[i][0][0], 2, 1, INIT_VLC_USE_STATIC); | 797 &ff_svq1_inter_multistage_vlc[i][0][0], 2, 1, INIT_VLC_USE_STATIC); |
798 } | 798 } |
799 | 799 |
800 init_vlc(&svq1_intra_mean, 8, 256, | 800 INIT_VLC_STATIC(&svq1_intra_mean, 8, 256, |
801 &ff_svq1_intra_mean_vlc[0][1], 4, 2, | 801 &ff_svq1_intra_mean_vlc[0][1], 4, 2, |
802 &ff_svq1_intra_mean_vlc[0][0], 4, 2, INIT_VLC_USE_STATIC); | 802 &ff_svq1_intra_mean_vlc[0][0], 4, 2, 632); |
803 | 803 |
804 init_vlc(&svq1_inter_mean, 9, 512, | 804 INIT_VLC_STATIC(&svq1_inter_mean, 9, 512, |
805 &ff_svq1_inter_mean_vlc[0][1], 4, 2, | 805 &ff_svq1_inter_mean_vlc[0][1], 4, 2, |
806 &ff_svq1_inter_mean_vlc[0][0], 4, 2, INIT_VLC_USE_STATIC); | 806 &ff_svq1_inter_mean_vlc[0][0], 4, 2, 1434); |
807 | 807 |
808 return 0; | 808 return 0; |
809 } | 809 } |
810 | 810 |
811 static av_cold int svq1_decode_end(AVCodecContext *avctx) | 811 static av_cold int svq1_decode_end(AVCodecContext *avctx) |