diff mbox series

[FFmpeg-devel,2/5] avcodec/vp56.h: Move VP8-only functions to vp8.c

Message ID DB6PR0101MB2214BAB83DC011BE2184A2A78F939@DB6PR0101MB2214.eurprd01.prod.exchangelabs.com
State Accepted
Commit 062599d7863bd4c5a9dee57bc29a7839e38d38a5
Headers show
Series [FFmpeg-devel,1/5] avcodec/hq_hqa: Remove transient GetByteContext from context | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt July 23, 2022, 5:16 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/vp56.h | 36 +-----------------------------------
 libavcodec/vp8.c  | 34 ++++++++++++++++++++++++++++++++++
 2 files changed, 35 insertions(+), 35 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/vp56.h b/libavcodec/vp56.h
index d2e6ad3ed0..08172e1987 100644
--- a/libavcodec/vp56.h
+++ b/libavcodec/vp56.h
@@ -339,7 +339,7 @@  static int vp56_rac_gets(VP56RangeCoder *c, int bits)
     return value;
 }
 
-static int vp8_rac_get_uint(VP56RangeCoder *c, int bits)
+static av_unused int vp8_rac_get_uint(VP56RangeCoder *c, int bits)
 {
     int value = 0;
 
@@ -350,22 +350,6 @@  static int vp8_rac_get_uint(VP56RangeCoder *c, int bits)
     return value;
 }
 
-// fixme: add 1 bit to all the calls to this?
-static av_unused int vp8_rac_get_sint(VP56RangeCoder *c, int bits)
-{
-    int v;
-
-    if (!vp8_rac_get(c))
-        return 0;
-
-    v = vp8_rac_get_uint(c, bits);
-
-    if (vp8_rac_get(c))
-        v = -v;
-
-    return v;
-}
-
 // P(7)
 static av_unused int vp56_rac_gets_nn(VP56RangeCoder *c, int bits)
 {
@@ -373,12 +357,6 @@  static av_unused int vp56_rac_gets_nn(VP56RangeCoder *c, int bits)
     return v + !v;
 }
 
-static av_unused int vp8_rac_get_nn(VP56RangeCoder *c)
-{
-    int v = vp8_rac_get_uint(c, 7) << 1;
-    return v + !v;
-}
-
 static av_always_inline
 int vp56_rac_get_tree(VP56RangeCoder *c,
                       const VP56Tree *tree,
@@ -407,16 +385,4 @@  static av_always_inline int vp8_rac_get_tree(VP56RangeCoder *c, const int8_t (*t
     return -i;
 }
 
-// DCTextra
-static av_always_inline int vp8_rac_get_coeff(VP56RangeCoder *c, const uint8_t *prob)
-{
-    int v = 0;
-
-    do {
-        v = (v<<1) + vp56_rac_get_prob(c, *prob++);
-    } while (*prob);
-
-    return v;
-}
-
 #endif /* AVCODEC_VP56_H */
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index 10de962118..9e7616990f 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -52,6 +52,40 @@ 
 #define VPX(vp7, f) vp8_ ## f
 #endif
 
+// fixme: add 1 bit to all the calls to this?
+static int vp8_rac_get_sint(VP56RangeCoder *c, int bits)
+{
+    int v;
+
+    if (!vp8_rac_get(c))
+        return 0;
+
+    v = vp8_rac_get_uint(c, bits);
+
+    if (vp8_rac_get(c))
+        v = -v;
+
+    return v;
+}
+
+static int vp8_rac_get_nn(VP56RangeCoder *c)
+{
+    int v = vp8_rac_get_uint(c, 7) << 1;
+    return v + !v;
+}
+
+// DCTextra
+static int vp8_rac_get_coeff(VP56RangeCoder *c, const uint8_t *prob)
+{
+    int v = 0;
+
+    do {
+        v = (v<<1) + vp56_rac_get_prob(c, *prob++);
+    } while (*prob);
+
+    return v;
+}
+
 static void free_buffers(VP8Context *s)
 {
     int i;