PR #21160 opened by mkver
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21160
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21160.patch


>From da5783a5a8d4219e63c3c32328502adb1b8d8c9c Mon Sep 17 00:00:00 2001
From: Andreas Rheinhardt <[email protected]>
Date: Wed, 10 Dec 2025 21:03:41 +0100
Subject: [PATCH 1/3] avcodec/hq_hqa: Don't rederive value

perm gets incremented in the loop in such a manner that
it already has the value it is set to here except for
the first loop iteration.

Signed-off-by: Andreas Rheinhardt <[email protected]>
---
 libavcodec/hq_hqa.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/hq_hqa.c b/libavcodec/hq_hqa.c
index 61242678b2..664d10c1fc 100644
--- a/libavcodec/hq_hqa.c
+++ b/libavcodec/hq_hqa.c
@@ -137,7 +137,7 @@ static int hq_decode_frame(HQContext *ctx, AVFrame *pic, 
GetByteContext *gbc,
 {
     const HQProfile *profile;
     GetBitContext gb;
-    const uint8_t *perm, *src = gbc->buffer;
+    const uint8_t *src = gbc->buffer;
     uint32_t slice_off[21];
     int slice, start_off, next_off, i, ret;
 
@@ -168,10 +168,10 @@ static int hq_decode_frame(HQContext *ctx, AVFrame *pic, 
GetByteContext *gbc,
         slice_off[i] = bytestream2_get_be24u(gbc) - 4;
 
     next_off = 0;
+    const uint8_t *perm = profile->perm_tab;
     for (slice = 0; slice < profile->num_slices; slice++) {
         start_off = next_off;
         next_off  = profile->tab_h * (slice + 1) / profile->num_slices;
-        perm = profile->perm_tab + start_off * profile->tab_w * 2;
 
         if (slice_off[slice] < (profile->num_slices + 1) * 3 ||
             slice_off[slice] >= slice_off[slice + 1] ||
-- 
2.49.1


>From 0e0ca1946028944999e68e43834662a4f57a64f7 Mon Sep 17 00:00:00 2001
From: Andreas Rheinhardt <[email protected]>
Date: Wed, 10 Dec 2025 21:15:09 +0100
Subject: [PATCH 2/3] avcodec/hq_hqadata: Remove padding from tables

Each table needs only tab_w*tab_h*2 entries.

Signed-off-by: Andreas Rheinhardt <[email protected]>
---
 libavcodec/hq_hqadata.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libavcodec/hq_hqadata.h b/libavcodec/hq_hqadata.h
index 10120ee94f..9c2c792c7f 100644
--- a/libavcodec/hq_hqadata.h
+++ b/libavcodec/hq_hqadata.h
@@ -1739,7 +1739,6 @@ static const uint8_t hq_tab_02[] = {
     16, 35, 11, 41, 16,  3, 21, 16, 27, 19, 21, 32, 27, 36, 22,
      2, 10, 13,  5, 19,  0, 29,  5, 39,  0,  2, 16, 17, 10, 22,
     16, 34, 11, 42, 16,  2, 21, 15, 27, 18, 21, 31, 27, 37, 22,
-     0,  0,
 };
 
 static const uint8_t hq_tab_03[] = {
@@ -5444,7 +5443,6 @@ static const uint8_t hq_tab_08[] = {
      8,  41,  0, 72,   8, 83,  0, 114,  8, 15,  25, 26, 17,  57, 25,
     68,  17, 99, 25, 110, 17, 11,  34, 37, 43,  53, 34, 75,  43, 95,
     34, 113, 43, 12,  60, 38, 51,  50, 60, 79,  52, 88, 60, 117, 52,
-     0,   0,  0,  0,   0,  0,  0,   0,
 };
 
 static const uint8_t hq_tab_09[] = {
@@ -6132,7 +6130,7 @@ static const uint8_t hq_tab_16[] = {
      5, 3,  1, 4, 3, 5, 3,  6, 1,  7, 5,  8, 9,  0,  6,
      1, 0,  2, 4, 3, 2, 4,  2, 5,  4, 6,  0, 7,  6,  8,
     10, 0,  5, 1, 1, 2, 3,  3, 3,  4, 1,  5, 5,  6, 10,
-     7, 7,  8, 0, 0,
+     7, 7,  8,
 };
 
 static const uint8_t hq_tab_17[] = {
-- 
2.49.1


>From f430cf115b0cd0a6576ca21d8a608658e36b105a Mon Sep 17 00:00:00 2001
From: Andreas Rheinhardt <[email protected]>
Date: Wed, 10 Dec 2025 21:38:29 +0100
Subject: [PATCH 3/3] avcodec/hq_hqadata: Avoid relocation for HQProfiles

Signed-off-by: Andreas Rheinhardt <[email protected]>
---
 libavcodec/hq_hqa.c     |   2 +-
 libavcodec/hq_hqadata.h | 129 ++++++++++++++--------------------------
 2 files changed, 46 insertions(+), 85 deletions(-)

diff --git a/libavcodec/hq_hqa.c b/libavcodec/hq_hqa.c
index 664d10c1fc..bc42f8a21f 100644
--- a/libavcodec/hq_hqa.c
+++ b/libavcodec/hq_hqa.c
@@ -168,7 +168,7 @@ static int hq_decode_frame(HQContext *ctx, AVFrame *pic, 
GetByteContext *gbc,
         slice_off[i] = bytestream2_get_be24u(gbc) - 4;
 
     next_off = 0;
-    const uint8_t *perm = profile->perm_tab;
+    const uint8_t *perm = hq_perms + profile->offset;
     for (slice = 0; slice < profile->num_slices; slice++) {
         start_off = next_off;
         next_off  = profile->tab_h * (slice + 1) / profile->num_slices;
diff --git a/libavcodec/hq_hqadata.h b/libavcodec/hq_hqadata.h
index 9c2c792c7f..7ab2ce9336 100644
--- a/libavcodec/hq_hqadata.h
+++ b/libavcodec/hq_hqadata.h
@@ -28,7 +28,7 @@
 #define NUM_HQ_QUANTS     16
 
 typedef struct HQProfile {
-    const uint8_t *perm_tab;
+    unsigned offset;
     int width, height;
     int num_slices;
     int tab_w, tab_h;
@@ -1369,7 +1369,8 @@ static const uint8_t hq_ac_lens[NUM_HQ_AC_ENTRIES] = {
 };
 
 /* tables section - one per supported profile */
-static const uint8_t hq_tab_01[] = {
+static const uint8_t hq_perms[] = {
+    /* Profile 1 - 2700 elements */
      0,  0, 12,  3, 20,  0, 28,  3, 40,  0,  0, 10, 15,  6, 20,
     10, 35,  6, 40, 10,  7, 13, 15, 16, 23, 13, 35, 16, 39, 13,
      7, 23, 10, 19, 23, 23, 27, 20, 39, 23,  2, 26, 10, 29, 22,
@@ -1550,9 +1551,7 @@ static const uint8_t hq_tab_01[] = {
      0, 29,  3, 39,  0,  0,  9, 14,  6, 19, 10, 34,  6, 39, 10,
      8, 13, 14, 16, 24, 13, 34, 16, 40, 13,  8, 23, 11, 19, 24,
     23, 27, 19, 40, 23,  1, 26, 11, 29, 21, 26, 27, 29, 41, 26,
-};
-
-static const uint8_t hq_tab_02[] = {
+    /* Profile 2 - 2790 elements */
      0,  0, 12,  5, 20,  0, 28,  5, 40,  0,  3, 16, 17, 11, 23,
     16, 33, 11, 43, 16,  1, 21, 14, 27, 18, 22, 30, 27, 38, 22,
      1,  0, 11,  5, 21,  0, 27,  5, 41,  0,  4, 16, 16, 11, 24,
@@ -1739,9 +1738,7 @@ static const uint8_t hq_tab_02[] = {
     16, 35, 11, 41, 16,  3, 21, 16, 27, 19, 21, 32, 27, 36, 22,
      2, 10, 13,  5, 19,  0, 29,  5, 39,  0,  2, 16, 17, 10, 22,
     16, 34, 11, 42, 16,  2, 21, 15, 27, 18, 21, 31, 27, 37, 22,
-};
-
-static const uint8_t hq_tab_03[] = {
+    /* Profile 3 - 3240 elements */
      0,  0, 14,  4, 20,  0, 34,  4, 40,  0,  8, 14, 15,  9, 24,
     14, 35,  9, 40, 14,  7, 19, 11, 23, 23, 19, 27, 23, 39, 19,
      1, 33, 10, 28, 21, 33, 27, 29, 41, 33,  1,  0, 15,  4, 21,
@@ -1958,9 +1955,7 @@ static const uint8_t hq_tab_03[] = {
     33, 28, 28, 39, 33,  8,  8, 13,  4, 19,  0, 33,  4, 39,  0,
      8, 13, 14,  9, 25, 14, 34,  9, 41, 14,  8, 19, 12, 23, 24,
     19, 28, 23, 40, 19,  0, 33, 11, 28, 20, 33, 27, 28, 40, 33,
-};
-
-static const uint8_t hq_tab_04[] = {
+    /* Profile 4 - 5400 elements */
      0,  0, 19,  4, 26,  0, 45,  4, 52,  0, 11, 13, 18,  9, 34,
     14, 44,  9, 56, 14, 10, 18, 18, 23, 35, 19, 40, 23, 57, 19,
      2, 32, 19, 28, 24, 32, 41, 28, 49, 33,  3, 37, 15, 42, 25,
@@ -2321,9 +2316,7 @@ static const uint8_t hq_tab_04[] = {
      0, 44,  4, 51,  0, 10, 13, 17,  9, 35, 14, 43,  9, 57, 14,
      9, 18, 19, 23, 35, 18, 41, 23, 58, 19,  3, 32, 20, 28, 25,
     32, 42, 28, 48, 33,  4, 37, 14, 42, 26, 37, 40, 42, 48, 37,
-};
-
-static const uint8_t hq_tab_05[] = {
+    /* Profile 5 - 7200 elements */
      0,  0, 25,  4, 34,  0, 59,  4, 68,  0, 13, 13, 22,  9, 47,
     13, 56,  9, 78, 14, 10, 18, 28, 23, 44, 18, 58, 23, 78, 18,
      8, 32, 31, 28, 38, 32, 61, 28, 68, 32, 11, 37, 18, 41, 41,
@@ -2804,9 +2797,7 @@ static const uint8_t hq_tab_05[] = {
      0, 58,  4, 67,  0, 12, 13, 21,  9, 46, 13, 55,  9, 79, 14,
      9, 18, 29, 23, 43, 18, 59, 23, 77, 18,  9, 32, 31, 27, 39,
     32, 62, 28, 69, 32, 12, 37, 19, 41, 42, 37, 49, 41, 72, 37,
-};
-
-static const uint8_t hq_tab_06[] = {
+    /* Profile 6 - 10880 elements */
      0,  0, 25,  8, 34,  0, 59,  8, 68,  0, 13, 25, 22, 17, 47,
     25, 56, 17, 78, 26, 10, 34, 28, 43, 44, 34, 58, 43, 78, 34,
      8, 60, 31, 52, 38, 60, 61, 52, 68, 60,  1,  0, 26,  8, 35,
@@ -3533,9 +3524,7 @@ static const uint8_t hq_tab_06[] = {
      0, 58,  8, 67,  0, 12, 25, 21, 17, 46, 25, 55, 17, 79, 26,
      9, 34, 29, 43, 43, 34, 59, 43, 77, 34,  9, 60, 31, 51, 39,
     60, 62, 52, 69, 60,
-};
-
-static const uint8_t hq_tab_07[] = {
+    /* Profile 7 - 12240 elements */
      0,  0, 23,  8, 32,  0, 55,  8, 64,  0, 87,  8, 13, 25, 22,
     17, 44, 26, 54, 17, 72, 26, 86, 17, 12, 34, 24, 43, 44, 34,
     52, 43, 73, 35, 80, 43,  4, 60, 25, 52, 32, 60, 53, 52, 60,
@@ -4352,9 +4341,7 @@ static const uint8_t hq_tab_07[] = {
      8, 31,  0, 54,  8, 63,  0, 86,  8, 12, 25, 21, 17, 44, 25,
     53, 17, 73, 26, 85, 17, 11, 34, 25, 43, 43, 34, 53, 43, 74,
     35, 81, 43,  5, 60, 26, 52, 33, 60, 54, 52, 61, 60, 82, 52,
-};
-
-static const uint8_t hq_tab_08[] = {
+    /* Profile 8 - 16320 elements */
      0,   0, 31,  8,  42,  0, 73,   8, 84,  0, 115,  8, 16,  25, 27,
     17,  58, 25, 69,  17, 99, 26, 111, 17, 12,  34, 36, 43,  54, 34,
     74,  43, 96, 34, 112, 43, 11,  60, 39, 51,  49, 60, 78,  52, 87,
@@ -5443,9 +5430,7 @@ static const uint8_t hq_tab_08[] = {
      8,  41,  0, 72,   8, 83,  0, 114,  8, 15,  25, 26, 17,  57, 25,
     68,  17, 99, 25, 110, 17, 11,  34, 37, 43,  53, 34, 75,  43, 95,
     34, 113, 43, 12,  60, 38, 51,  50, 60, 79,  52, 88, 60, 117, 52,
-};
-
-static const uint8_t hq_tab_09[] = {
+    /* Profile 9 - 2400 elements */
      0,  0, 10,  3, 18,  0, 24,  3, 36,  0,  1, 10, 14,  6, 19,
     10, 31,  7, 37, 10,  5, 13, 15, 16, 19, 13, 30, 17, 33, 13,
      4, 23,  8, 20, 18, 23, 26, 20, 32, 23,  4, 26,  9, 24, 22,
@@ -5606,9 +5591,7 @@ static const uint8_t hq_tab_09[] = {
      0, 25,  3, 35,  0,  0, 10, 13,  6, 18, 10, 31,  6, 36, 10,
      6, 13, 14, 16, 20, 13, 31, 17, 34, 13,  5, 23,  8, 19, 19,
     23, 25, 20, 33, 23,  3, 26,  8, 24, 21, 26, 26, 24, 39, 26,
-};
-
-static const uint8_t hq_tab_10[] = {
+    /* Profile 10 - 600 elements */
      0,  0,  4,  1, 10,  0, 13,  2, 19,  1,  0,  5,  6,  4, 10,
      3, 15,  5, 16,  3,  2,  8,  6,  7,  8,  6, 12,  7, 18,  6,
      2, 11,  4, 10,  8, 11, 14, 10, 18,  9,  0, 14,  7, 12, 10,
@@ -5649,9 +5632,7 @@ static const uint8_t hq_tab_10[] = {
      0, 12,  2, 19,  0,  1,  5,  5,  4, 11,  3, 15,  4, 17,  3,
      1,  8,  7,  7, 11,  8, 13,  7, 17,  6,  3, 11,  4,  9,  9,
     11, 13, 10, 19,  9,  0, 13,  6, 12,  9, 14, 15, 13, 19, 14,
-};
-
-static const uint8_t hq_tab_11[] = {
+    /* Profile 11 - 160 elements */
     0, 0, 3, 3, 5, 1, 6, 0, 8, 2, 1, 5, 3, 7, 4,
     6, 6, 4, 9, 7, 1, 0, 2, 3, 4, 1, 7, 0, 9, 2,
     0, 5, 2, 7, 5, 6, 7, 4, 8, 7, 1, 1, 2, 0, 4,
@@ -5663,9 +5644,7 @@ static const uint8_t hq_tab_11[] = {
     1, 3, 2, 2, 4, 0, 7, 3, 9, 1, 0, 4, 2, 6, 5,
     5, 7, 7, 8, 6, 0, 3, 3, 2, 5, 0, 6, 3, 8, 1,
     1, 4, 3, 6, 4, 5, 6, 7, 9, 6,
-};
-
-static const uint8_t hq_tab_12[] = {
+    /* Profile 12 - 3800 elements */
      0,  0, 13,  3, 22,  0, 31,  3, 44,  0,  3, 11, 12,  8, 21,
     11, 34,  8, 40, 12,  2, 16, 11, 19, 24, 16, 30, 20, 46, 16,
      1, 27, 14, 24, 20, 28, 36, 24, 42, 28,  4, 32, 10, 36, 26,
@@ -5920,9 +5899,7 @@ static const uint8_t hq_tab_12[] = {
     11, 33,  8, 40, 11,  1, 16, 12, 19, 23, 16, 30, 19, 45, 16,
      2, 27, 13, 24, 20, 27, 35, 24, 41, 28,  3, 32, 10, 35, 25,
     32, 31, 36, 47, 32,
-};
-
-static const uint8_t hq_tab_13[] = {
+    /* Profile 13 - 1320 elements */
      0,  0, 15,  1,  7,  4, 18,  3,  4,  6, 11,  7, 10, 11, 14,
      9,  8, 12, 14, 14,  6, 17, 11, 16,  9, 19, 18, 20,  2, 23,
     15, 22,  5, 25, 11, 24,  9, 27, 19, 28,  1,  0, 14,  1,  8,
@@ -6011,9 +5988,7 @@ static const uint8_t hq_tab_13[] = {
     26,  0, 29, 17, 28, 10,  2, 16,  1,  6,  4, 19,  3,  3,  6,
     12,  7, 10, 10, 15,  9,  7, 12, 13, 14,  7, 17, 11, 15, 10,
     19, 17, 20,  3, 23, 14, 22,  6, 25, 21, 26, 10, 27, 18, 28,
-};
-
-static const uint8_t hq_tab_14[] = {
+    /* Profile 14 - 660 elements */
      0,  0, 17,  0,  0,  2, 14,  1,  9,  3, 14,  3,  9,  5, 19,
      4,  2,  6, 19,  6,  9,  6, 12,  7,  7,  9, 16,  8,  0,  9,
     15,  9, 10, 11, 15, 11, 10, 13, 18, 12,  1, 14, 18, 14,  1,
@@ -6058,9 +6033,7 @@ static const uint8_t hq_tab_14[] = {
     14,  7,  1, 16,  0,  0,  1, 15,  1, 10,  3, 15,  3, 10,  5,
     18,  4,  1,  6, 18,  6,  1,  8, 13,  7,  8,  9, 15,  8,  1,
      9, 20, 10, 10, 10, 16, 11, 10, 12, 17, 12,  0, 14, 17, 14,
-};
-
-static const uint8_t hq_tab_15[] = {
+    /* Profile 15 - 792 elements */
      0,  0, 15,  1,  3,  3, 14,  2,  4,  4, 11,  5,  0,  6, 18,
      6,  8,  8, 14,  8,  4, 10, 21, 11,  9, 13, 18, 12,  8, 14,
     17, 15,  5, 17, 21, 17,  1,  0, 14,  1,  2,  3, 15,  2,  5,
@@ -6114,9 +6087,7 @@ static const uint8_t hq_tab_15[] = {
     19, 15,  7, 17, 20, 16,  0,  1, 16,  1,  4,  3, 13,  2,  3,
      4, 12,  5,  0,  7, 17,  6,  7,  8, 13,  8,  3, 10, 21, 10,
     10, 13, 17, 12,  7, 14, 18, 15,  6, 17, 21, 16,
-};
-
-static const uint8_t hq_tab_16[] = {
+    /* Profile 16 - 198 elements */
      0, 0,  4, 1, 2, 2, 2,  3, 4,  4, 0,  5, 6,  6,  9,
      7, 8,  8, 1, 0, 3, 1,  3, 2,  1, 3,  5, 4, 10,  5,
      7, 6,  8, 7, 9, 8, 2,  0, 2,  1, 4,  2, 0,  3,  6,
@@ -6131,9 +6102,7 @@ static const uint8_t hq_tab_16[] = {
      1, 0,  2, 4, 3, 2, 4,  2, 5,  4, 6,  0, 7,  6,  8,
     10, 0,  5, 1, 1, 2, 3,  3, 3,  4, 1,  5, 5,  6, 10,
      7, 7,  8,
-};
-
-static const uint8_t hq_tab_17[] = {
+    /* Profile 17 - 10240 elements */
      0,  0, 25,  8, 34,  0, 59,  8, 68,  0, 13, 24, 22, 16, 47,
     24, 56, 16, 78, 25, 10, 32, 28, 41, 44, 32, 58, 41, 78, 32,
      8, 57, 31, 49, 38, 57, 61, 49, 68, 57,  1,  0, 26,  8, 35,
@@ -6817,9 +6786,7 @@ static const uint8_t hq_tab_17[] = {
      0, 15, 24,  8, 33,  0, 58,  8, 67,  0, 12, 24, 21, 16, 46,
     24, 55, 16, 79, 25,  9, 32, 29, 41, 43, 32, 59, 41, 77, 32,
      9, 57, 31, 48, 39, 57, 62, 49, 69, 57,
-};
-
-static const uint8_t hq_tab_18[] = {
+    /* Profile 18 - 9600 elements */
      0,  0, 25,  6, 34,  0, 59,  6, 68,  0, 13, 18, 22, 12, 47,
     18, 56, 12, 78, 19, 10, 24, 28, 31, 44, 24, 58, 31, 78, 24,
      8, 43, 31, 37, 38, 43, 61, 37, 68, 43, 11, 49, 18, 55, 41,
@@ -7460,9 +7427,7 @@ static const uint8_t hq_tab_18[] = {
      0, 58,  6, 67,  0, 12, 18, 21, 12, 46, 18, 55, 12, 79, 19,
      9, 24, 29, 31, 43, 24, 59, 31, 77, 24,  9, 43, 31, 36, 39,
     43, 62, 37, 69, 43, 12, 49, 19, 55, 42, 49, 49, 55, 72, 49,
-};
-
-static const uint8_t hq_tab_19[] = {
+    /* Profile 19 - 6144 elements */
      0,  0, 25,  4, 34,  0, 59,  4, 12, 12, 21,  8, 46, 12, 55,
      8,  8, 16, 30, 21, 42, 16, 60, 21, 11, 29, 29, 24, 41, 29,
     63, 24, 15, 33, 22, 37, 45, 33, 52, 37,  3, 45, 26, 41, 33,
@@ -7873,9 +7838,7 @@ static const uint8_t hq_tab_19[] = {
     12, 20,  8, 45, 12, 54,  8,  7, 16, 31, 21, 41, 16, 61, 21,
     12, 29, 28, 24, 42, 29, 62, 24, 15, 32, 23, 37, 46, 33, 53,
     37,  4, 45, 27, 41, 34, 45, 57, 41,
-};
-
-static const uint8_t hq_tab_20[] = {
+    /* Profile 20 - 2640 elements */
      0,  0, 15,  3, 24,  0, 35,  3,  1,  9, 16,  6, 22, 10, 40,
      6,  8, 12, 14, 16, 32, 12, 38, 16,  6, 22, 19, 19, 30, 22,
     39, 19,  5, 25, 21, 29, 25, 25, 41, 29,  1,  0, 14,  3, 25,
@@ -8052,9 +8015,7 @@ static const uint8_t hq_tab_20[] = {
     28, 27, 25, 43, 29,  0,  5, 16,  3, 23,  0, 36,  3,  2,  9,
     15,  6, 22,  9, 39,  6,  7, 12, 13, 16, 31, 12, 37, 16,  5,
     22, 20, 19, 29, 22, 40, 19,  6, 25, 21, 28, 26, 25, 42, 29,
-};
-
-static const uint8_t hq_tab_21[] = {
+    /* Profile 21 - 3168 elements */
      0,  0, 15,  3, 24,  0, 35,  3,  1,  9, 16,  6, 22, 10, 40,
      6,  8, 12, 14, 16, 32, 12, 38, 16,  6, 22, 19, 19, 30, 22,
     39, 19,  5, 25, 21, 29, 25, 25, 41, 29,  7, 35, 11, 31, 27,
@@ -8271,28 +8232,28 @@ static const uint8_t hq_tab_21[] = {
 
 /* List of profiles, order is important */
 static const HQProfile hq_profile[NUM_HQ_PROFILES] = {
-    { hq_tab_11,  160,  120,  8, 10,   8 }, // case 0 (default) = case 11
-    { hq_tab_01,  720,  480,  8, 25,  54 },
-    { hq_tab_02,  720,  486,  8, 15,  93 },
-    { hq_tab_03,  720,  576,  8, 20,  81 },
-    { hq_tab_04,  960,  720, 12, 25, 108 },
-    { hq_tab_05, 1280,  720, 16, 25, 144 },
-    { hq_tab_06, 1280, 1080, 16, 20, 272 },
-    { hq_tab_07, 1440, 1080, 16, 24, 255 },
-    { hq_tab_08, 1920, 1080, 20, 24, 340 },
-    { hq_tab_09,  640,  480,  8, 25,  48 },
-    { hq_tab_10,  320,  240,  8, 25,  12 },
-    { hq_tab_11,  160,  120,  8, 10,   8 },
-    { hq_tab_12,  800,  600,  8, 25,  76 },
-    { hq_tab_13,  352,  480,  8, 20,  33 },
-    { hq_tab_14,  352,  240,  8, 22,  15 },
-    { hq_tab_15,  352,  288,  8, 18,  22 },
-    { hq_tab_16,  176,  144,  8,  9,  11 },
-    { hq_tab_17, 1280, 1024, 16, 20, 256 },
-    { hq_tab_18, 1280,  960, 16, 25, 192 },
-    { hq_tab_19, 1024,  768, 16, 24, 128 },
-    { hq_tab_20,  704,  480,  8, 20,  66 },
-    { hq_tab_21,  704,  576,  8, 24,  66 },
+    { 63770,  160,  120,  8, 10,   8 }, // case 0 (default) = case 11
+    { 0,      720,  480,  8, 25,  54 },
+    { 2700,   720,  486,  8, 15,  93 },
+    { 5490,   720,  576,  8, 20,  81 },
+    { 8730,   960,  720, 12, 25, 108 },
+    { 14130, 1280,  720, 16, 25, 144 },
+    { 21330, 1280, 1080, 16, 20, 272 },
+    { 32210, 1440, 1080, 16, 24, 255 },
+    { 44450, 1920, 1080, 20, 24, 340 },
+    { 60770,  640,  480,  8, 25,  48 },
+    { 63170,  320,  240,  8, 25,  12 },
+    { 63770,  160,  120,  8, 10,   8 },
+    { 63930,  800,  600,  8, 25,  76 },
+    { 67730,  352,  480,  8, 20,  33 },
+    { 69050,  352,  240,  8, 22,  15 },
+    { 69710,  352,  288,  8, 18,  22 },
+    { 70502,  176,  144,  8,  9,  11 },
+    { 70700, 1280, 1024, 16, 20, 256 },
+    { 80940, 1280,  960, 16, 25, 192 },
+    { 90540, 1024,  768, 16, 24, 128 },
+    { 96684,  704,  480,  8, 20,  66 },
+    { 99324,  704,  576,  8, 24,  66 },
 };
 
 #endif /* AVCODEC_HQ_HQADATA_H */
-- 
2.49.1

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to