]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mv30.c
avfilter/vf_v360: adjustment out_pad and in_pad maximum value to 1/10
[ffmpeg] / libavcodec / mv30.c
index ffa04ac493d4f9c1efec0afed18ed19077333e01..fed9bcd1e846aad100572c99ae5654a236a9420d 100644 (file)
@@ -33,6 +33,7 @@
 #include "blockdsp.h"
 #include "get_bits.h"
 #include "internal.h"
+#include "aandcttab.h"
 
 typedef struct MV30Context {
     GetBitContext  gb;
@@ -58,25 +59,6 @@ typedef struct MV30Context {
 
 static VLC cbp_tab;
 
-static const int16_t scale_tab[] = {
-    16384,  22725,  21407,  19266,
-    16384,  12873,   8867,   4520,
-    22725,  31521,  29692,  26722,
-    22725,  17855,  12299,   6270,
-    21407,  29692,  27969,  25172,
-    21407,  16819,  11585,   5906,
-    19266,  26722,  25172,  22654,
-    19266,  15137,  10426,   5315,
-    16384,  22725,  21407,  19266,
-    16384,  12873,   8867,   4520,
-    12873,  17855,  16819,  15137,
-    12873,  10114,   6967,   3552,
-     8867,  12299,  11585,  10426,
-     8867,   6967,   4799,   2446,
-     4520,   6270,   5906,   5315,
-     4520,   3552,   2446,   1247,
-};
-
 static const uint8_t luma_tab[] = {
     12, 12, 15, 19, 25, 34, 40, 48,
     12, 12, 18, 22, 27, 44, 47, 46,
@@ -86,14 +68,6 @@ static const uint8_t luma_tab[] = {
     25, 31, 42, 48, 58, 72, 81, 75,
     38, 46, 54, 61, 71, 84, 88, 85,
     50, 61, 65, 68, 79, 78, 86, 91,
-    12, 12, 16, 18, 20, 30, 40, 45,
-    12, 12, 16, 18, 30, 40, 45, 50,
-    16, 16, 20, 30, 40, 45, 50, 55,
-    18, 18, 35, 40, 45, 50, 55, 60,
-    20, 30, 40, 45, 50, 55, 60, 65,
-    30, 40, 45, 50, 55, 60, 65, 70,
-    40, 45, 50, 55, 60, 65, 70, 75,
-    45, 50, 55, 60, 65, 70, 75, 80,
 };
 
 static const uint8_t chroma_tab[] = {
@@ -105,14 +79,6 @@ static const uint8_t chroma_tab[] = {
     99, 99, 99, 99, 99, 99, 99, 99,
     99, 99, 99, 99, 99, 99, 99, 99,
     99, 99, 99, 99, 99, 99, 99, 99,
-    12, 16, 20, 24, 28, 36, 40, 44,
-    16, 20, 24, 28, 36, 40, 44, 50,
-    20, 24, 28, 36, 40, 44, 50, 60,
-    24, 28, 36, 40, 44, 50, 60, 80,
-    28, 36, 40, 44, 50, 60, 80, 99,
-    36, 40, 44, 50, 60, 80, 99, 99,
-    40, 44, 50, 60, 80, 99, 99, 99,
-    44, 50, 60, 80, 99, 99, 99, 99,
 };
 
 static const uint8_t zigzag[] = {
@@ -132,7 +98,7 @@ static void get_qtable(int16_t *table, int quant, const uint8_t *quant_tab)
 
     for (int i = 0; i < 64; i++) {
         table[i] = av_clip((quant_tab[i] * factor + 0x32) / 100, 1, 0x7fff);
-        table[i] = ((int)scale_tab[i] * (int)table[i] + 0x800) >> 12;
+        table[i] = ((int)ff_aanscales[i] * (int)table[i] + 0x800) >> 12;
     }
 }