diff options
Diffstat (limited to 'libavcodec/dv.c')
-rw-r--r-- | libavcodec/dv.c | 56 |
1 files changed, 7 insertions, 49 deletions
diff --git a/libavcodec/dv.c b/libavcodec/dv.c index 52a015e..9c75cfd 100644 --- a/libavcodec/dv.c +++ b/libavcodec/dv.c @@ -16,20 +16,20 @@ * Many thanks to Dan Dennedy <dan@dennedy.org> for providing wealth * of DV technical info. * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -49,7 +49,7 @@ #include "simple_idct.h" /* XXX: also include quantization */ -RL_VLC_ELEM ff_dv_rl_vlc[1184]; +RL_VLC_ELEM ff_dv_rl_vlc[1664]; static inline void dv_calc_mb_coordinates(const AVDVProfile *d, int chan, int seq, int slot, uint16_t *tbl) @@ -172,20 +172,9 @@ static inline void dv_calc_mb_coordinates(const AVDVProfile *d, int chan, } } -/* quantization quanta by QNO for DV100 */ -static const uint8_t dv100_qstep[16] = { - 1, /* QNO = 0 and 1 both have no quantization */ - 1, - 2, 3, 4, 5, 6, 7, 8, 16, 18, 20, 22, 24, 28, 52 -}; - -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; - const int *iweight1, *iweight2; p = i = 0; for (c = 0; c < d->n_difchan; c++) { @@ -203,38 +192,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 (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]; - } - if (DV_PROFILE_IS_HD(d)) { - 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 { - 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; } @@ -276,7 +233,7 @@ av_cold int ff_dvvideo_init(AVCodecContext *avctx) * to accelerate the parsing of partial codes */ init_vlc(&dv_vlc, TEX_VLC_BITS, j, new_dv_vlc_len, 1, 1, new_dv_vlc_bits, 2, 2, 0); - assert(dv_vlc.table_size == 1184); + av_assert1(dv_vlc.table_size == 1664); for (i = 0; i < dv_vlc.table_size; i++) { int code = dv_vlc.table[i][0]; @@ -302,3 +259,4 @@ av_cold int ff_dvvideo_init(AVCodecContext *avctx) return 0; } + |