diff options
author | Christophe Gisquet <christophe.gisquet@gmail.com> | 2014-10-25 11:19:21 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-25 16:54:12 +0200 |
commit | 80b29c2d0c0bade061f39672fb64924ea6bf3213 (patch) | |
tree | 24ae5885cba2109cc00b533e526c21774182ce29 | |
parent | eacf2e8eb35c3a18cfeddd2aa0ac787949dc7f94 (diff) | |
download | ffmpeg-80b29c2d0c0bade061f39672fb64924ea6bf3213.tar.gz |
dv: use smaller type for weight tables
Reviewed-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/dv.c | 4 | ||||
-rw-r--r-- | libavcodec/dvdata.c | 12 | ||||
-rw-r--r-- | libavcodec/dvdata.h | 12 |
3 files changed, 14 insertions, 14 deletions
diff --git a/libavcodec/dv.c b/libavcodec/dv.c index e1e5dd913f..1f0486107a 100644 --- a/libavcodec/dv.c +++ b/libavcodec/dv.c @@ -206,7 +206,7 @@ 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 int *iweight1, *iweight2; + const uint16_t *iweight1, *iweight2; if (d->height == 720) { iweight1 = &ff_dv_iweight_720_y[0]; iweight2 = &ff_dv_iweight_720_c[0]; @@ -223,7 +223,7 @@ int ff_dv_init_dynamic_tables(DVVideoContext *ctx, const AVDVProfile *d) } } } else { - const int *iweight1 = &ff_dv_iweight_88[0]; + 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++) { diff --git a/libavcodec/dvdata.c b/libavcodec/dvdata.c index 85cba5363c..007976e279 100644 --- a/libavcodec/dvdata.c +++ b/libavcodec/dvdata.c @@ -69,7 +69,7 @@ const uint8_t ff_dv_quant_shifts[22][4] = { const uint8_t ff_dv_quant_offset[4] = { 6, 3, 0, 1 }; -const int ff_dv_iweight_88[64] = { +const uint16_t ff_dv_iweight_88[64] = { 32768, 16710, 16710, 17735, 17015, 17735, 18197, 18079, 18079, 18197, 18725, 18559, 19196, 18559, 18725, 19284, 19108, 19692, 19692, 19108, 19284, 21400, 19645, 20262, @@ -79,7 +79,7 @@ const int ff_dv_iweight_88[64] = { 24600, 25267, 24457, 22672, 24457, 25267, 25971, 25191, 25191, 25971, 26715, 27962, 26715, 29642, 29642, 31536, }; -const int ff_dv_iweight_248[64] = { +const uint16_t ff_dv_iweight_248[64] = { 32768, 17735, 16710, 18079, 18725, 21400, 17735, 19196, 19108, 21845, 16384, 17735, 18725, 21400, 16710, 18079, 20262, 23173, 18197, 19692, 18725, 20262, 20815, 23764, @@ -93,7 +93,7 @@ const int ff_dv_iweight_248[64] = { /** * The "inverse" DV100 weights are actually just the spec weights (zig-zagged). */ -const int ff_dv_iweight_1080_y[64] = { +const uint16_t ff_dv_iweight_1080_y[64] = { 128, 16, 16, 17, 17, 17, 18, 18, 18, 18, 18, 18, 19, 18, 18, 19, 19, 19, 19, 19, 19, 42, 38, 40, @@ -103,7 +103,7 @@ const int ff_dv_iweight_1080_y[64] = { 48, 49, 48, 44, 48, 49, 101, 98, 98, 101, 104, 109, 104, 116, 116, 123, }; -const int ff_dv_iweight_1080_c[64] = { +const uint16_t ff_dv_iweight_1080_c[64] = { 128, 16, 16, 17, 17, 17, 25, 25, 25, 25, 26, 25, 26, 25, 26, 26, 26, 27, 27, 26, 26, 42, 38, 40, @@ -113,7 +113,7 @@ const int ff_dv_iweight_1080_c[64] = { 96, 197, 191, 177, 191, 197, 203, 197, 197, 203, 209, 219, 209, 232, 232, 246, }; -const int ff_dv_iweight_720_y[64] = { +const uint16_t ff_dv_iweight_720_y[64] = { 128, 16, 16, 17, 17, 17, 18, 18, 18, 18, 18, 18, 19, 18, 18, 19, 19, 19, 19, 19, 19, 42, 38, 40, @@ -123,7 +123,7 @@ const int ff_dv_iweight_720_y[64] = { 96, 98, 96, 88, 96, 98, 202, 196, 196, 202, 208, 218, 208, 232, 232, 246, }; -const int ff_dv_iweight_720_c[64] = { +const uint16_t ff_dv_iweight_720_c[64] = { 128, 24, 24, 26, 26, 26, 36, 36, 36, 36, 36, 36, 38, 36, 36, 38, 38, 38, 38, 38, 38, 84, 76, 80, diff --git a/libavcodec/dvdata.h b/libavcodec/dvdata.h index 0932d3ad15..3c4da447e9 100644 --- a/libavcodec/dvdata.h +++ b/libavcodec/dvdata.h @@ -26,12 +26,12 @@ extern const uint8_t ff_dv_zigzag248_direct[64]; extern const uint8_t ff_dv_quant_shifts[22][4]; extern const uint8_t ff_dv_quant_offset[4]; -extern const int ff_dv_iweight_88[64]; -extern const int ff_dv_iweight_248[64]; -extern const int ff_dv_iweight_1080_y[64]; -extern const int ff_dv_iweight_1080_c[64]; -extern const int ff_dv_iweight_720_y[64]; -extern const int ff_dv_iweight_720_c[64]; +extern const uint16_t ff_dv_iweight_88[64]; +extern const uint16_t ff_dv_iweight_248[64]; +extern const uint16_t ff_dv_iweight_1080_y[64]; +extern const uint16_t ff_dv_iweight_1080_c[64]; +extern const uint16_t ff_dv_iweight_720_y[64]; +extern const uint16_t ff_dv_iweight_720_c[64]; #define NB_DV_VLC 409 |