diff options
author | Christophe Gisquet <christophe.gisquet@gmail.com> | 2014-10-25 11:19:25 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-26 19:21:59 +0100 |
commit | 05da586fef865274d44da57f841068b5f17c812c (patch) | |
tree | 29feeeda4157d8d64c7840c156d2c5a7c2410ab8 /libavcodec/dv.c | |
parent | 6fe02d25ee6816e44de8d8b23b6905d307e1ed28 (diff) | |
download | ffmpeg-05da586fef865274d44da57f841068b5f17c812c.tar.gz |
dv: move inverse weight tables to decoder
The encoder has its own tables and does not access the idct_factor
member of the DVVideoContext structure.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dv.c')
-rw-r--r-- | libavcodec/dv.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/libavcodec/dv.c b/libavcodec/dv.c index 1f0486107a..6cd8a89f8b 100644 --- a/libavcodec/dv.c +++ b/libavcodec/dv.c @@ -185,7 +185,6 @@ static const uint8_t dv_quant_areas[4] = { 6, 21, 43, 64 }; int ff_dv_init_dynamic_tables(DVVideoContext *ctx, const AVDVProfile *d) { int j, i, c, s, p; - uint32_t *factor1, *factor2; p = i = 0; for (c = 0; c < d->n_difchan; c++) { @@ -203,39 +202,6 @@ int ff_dv_init_dynamic_tables(DVVideoContext *ctx, const AVDVProfile *d) } } - factor1 = &ctx->idct_factor[0]; - factor2 = &ctx->idct_factor[DV_PROFILE_IS_HD(d) ? 4096 : 2816]; - if (DV_PROFILE_IS_HD(d)) { - const uint16_t *iweight1, *iweight2; - if (d->height == 720) { - iweight1 = &ff_dv_iweight_720_y[0]; - iweight2 = &ff_dv_iweight_720_c[0]; - } else { - iweight1 = &ff_dv_iweight_1080_y[0]; - iweight2 = &ff_dv_iweight_1080_c[0]; - } - for (c = 0; c < 4; c++) { - for (s = 0; s < 16; s++) { - for (i = 0; i < 64; i++) { - *factor1++ = (dv100_qstep[s] << (c + 9)) * iweight1[i]; - *factor2++ = (dv100_qstep[s] << (c + 9)) * iweight2[i]; - } - } - } - } else { - const uint16_t *iweight1 = &ff_dv_iweight_88[0]; - for (j = 0; j < 2; j++, iweight1 = &ff_dv_iweight_248[0]) { - for (s = 0; s < 22; s++) { - for (i = c = 0; c < 4; c++) { - for (; i < dv_quant_areas[c]; i++) { - *factor1 = iweight1[i] << (ff_dv_quant_shifts[s][c] + 1); - *factor2++ = (*factor1++) << 1; - } - } - } - } - } - return 0; } |