comparison dnxhddec.c @ 5465:6478c562c80f libavcodec

10l, use correct cid table
author bcoudurier
date Sat, 04 Aug 2007 13:03:12 +0000
parents 75940bbbecfc
children 587b3e6c8d4f
comparison
equal deleted inserted replaced
5464:75940bbbecfc 5465:6478c562c80f
113 av_log(ctx->avctx, AV_LOG_ERROR, "unsupported cid %d\n", cid); 113 av_log(ctx->avctx, AV_LOG_ERROR, "unsupported cid %d\n", cid);
114 return -1; 114 return -1;
115 } 115 }
116 ctx->cid_table = &cid_table[index]; 116 ctx->cid_table = &cid_table[index];
117 init_vlc(&ctx->ac_vlc, DNXHD_VLC_BITS, 257, 117 init_vlc(&ctx->ac_vlc, DNXHD_VLC_BITS, 257,
118 cid_table->ac_bits, 1, 1, 118 ctx->cid_table->ac_bits, 1, 1,
119 cid_table->ac_codes, 2, 2, 0); 119 ctx->cid_table->ac_codes, 2, 2, 0);
120 init_vlc(&ctx->dc_vlc, DNXHD_DC_VLC_BITS, 12, 120 init_vlc(&ctx->dc_vlc, DNXHD_DC_VLC_BITS, 12,
121 cid_table->dc_bits, 1, 1, 121 ctx->cid_table->dc_bits, 1, 1,
122 cid_table->dc_codes, 1, 1, 0); 122 ctx->cid_table->dc_codes, 1, 1, 0);
123 init_vlc(&ctx->run_vlc, DNXHD_VLC_BITS, 62, 123 init_vlc(&ctx->run_vlc, DNXHD_VLC_BITS, 62,
124 cid_table->run_bits, 1, 1, 124 ctx->cid_table->run_bits, 1, 1,
125 cid_table->run_codes, 2, 2, 0); 125 ctx->cid_table->run_codes, 2, 2, 0);
126 126
127 ctx->run = cid_table->run; 127 ctx->run = ctx->cid_table->run;
128 ctx->ac_level = cid_table->ac_level; 128 ctx->ac_level = ctx->cid_table->ac_level;
129 ctx->ac_run_flag = cid_table->ac_run_flag; 129 ctx->ac_run_flag = ctx->cid_table->ac_run_flag;
130 ctx->ac_index_flag = cid_table->ac_index_flag; 130 ctx->ac_index_flag = ctx->cid_table->ac_index_flag;
131 ctx->luma_weigth = cid_table->luma_weigth; 131 ctx->luma_weigth = ctx->cid_table->luma_weigth;
132 ctx->chroma_weigth = cid_table->chroma_weigth; 132 ctx->chroma_weigth = ctx->cid_table->chroma_weigth;
133 133
134 ctx->index_bits = cid_table->index_bits; 134 ctx->index_bits = ctx->cid_table->index_bits;
135 135
136 ff_init_scantable(ctx->dsp.idct_permutation, &ctx->scantable, ff_zigzag_direct); 136 ff_init_scantable(ctx->dsp.idct_permutation, &ctx->scantable, ff_zigzag_direct);
137 } 137 }
138 return 0; 138 return 0;
139 } 139 }