summaryrefslogtreecommitdiff
path: root/libavcodec/dv.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2012-04-04 17:13:13 +0200
committerDiego Biurrun <diego@biurrun.de>2012-04-16 10:04:56 +0200
commit05afc5f57d19ab403f4c798b5a479ae016a2307c (patch)
treeb1217fe1f52136f4fdeb509e7252b2dd0963e904 /libavcodec/dv.c
parentaff01de6415f1ba022f1a58e354ad6e4d0796e97 (diff)
dv: Move static tables only used in one place to where they are used.
Diffstat (limited to 'libavcodec/dv.c')
-rw-r--r--libavcodec/dv.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/libavcodec/dv.c b/libavcodec/dv.c
index 1a0075b57b..86ff211ab7 100644
--- a/libavcodec/dv.c
+++ b/libavcodec/dv.c
@@ -167,6 +167,15 @@ static inline void dv_calc_mb_coordinates(const DVprofile *d, int chan, int seq,
}
}
+/* 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(const DVprofile *d)
{
int j,i,c,s,p;
@@ -467,6 +476,28 @@ static av_always_inline int dv_guess_dct_mode(DVVideoContext *s, uint8_t *data,
return 0;
}
+static const int dv_weight_bits = 18;
+static const int dv_weight_88[64] = {
+ 131072, 257107, 257107, 242189, 252167, 242189, 235923, 237536,
+ 237536, 235923, 229376, 231390, 223754, 231390, 229376, 222935,
+ 224969, 217965, 217965, 224969, 222935, 200636, 218652, 211916,
+ 212325, 211916, 218652, 200636, 188995, 196781, 205965, 206433,
+ 206433, 205965, 196781, 188995, 185364, 185364, 200636, 200704,
+ 200636, 185364, 185364, 174609, 180568, 195068, 195068, 180568,
+ 174609, 170091, 175557, 189591, 175557, 170091, 165371, 170627,
+ 170627, 165371, 160727, 153560, 160727, 144651, 144651, 136258,
+};
+static const int dv_weight_248[64] = {
+ 131072, 242189, 257107, 237536, 229376, 200636, 242189, 223754,
+ 224969, 196781, 262144, 242189, 229376, 200636, 257107, 237536,
+ 211916, 185364, 235923, 217965, 229376, 211916, 206433, 180568,
+ 242189, 223754, 224969, 196781, 211916, 185364, 235923, 217965,
+ 200704, 175557, 222935, 205965, 200636, 185364, 195068, 170627,
+ 229376, 211916, 206433, 180568, 200704, 175557, 222935, 205965,
+ 175557, 153560, 188995, 174609, 165371, 144651, 200636, 185364,
+ 195068, 170627, 175557, 153560, 188995, 174609, 165371, 144651,
+};
+
static av_always_inline int dv_init_enc_block(EncBlockInfo* bi, uint8_t *data, int linesize, DVVideoContext *s, int bias)
{
const int *weight;