From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Subject: [FFmpeg-devel] [PATCH 2/5] avcodec/vp56.h: Move VP8-only functions to vp8.c
Date: Sat, 23 Jul 2022 07:16:07 +0200
Message-ID: <DB6PR0101MB2214BAB83DC011BE2184A2A78F939@DB6PR0101MB2214.eurprd01.prod.exchangelabs.com> (raw)
In-Reply-To: <DB6PR0101MB22140015535809CE6744142A8F939@DB6PR0101MB2214.eurprd01.prod.exchangelabs.com>
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 --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;
--
2.34.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2022-07-23 5:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-23 5:14 [FFmpeg-devel] [PATCH 1/5] avcodec/hq_hqa: Remove transient GetByteContext from context Andreas Rheinhardt
2022-07-23 5:16 ` Andreas Rheinhardt [this message]
2022-07-23 5:16 ` [FFmpeg-devel] [PATCH 3/5] avcodec/vp56: Move VP8/9-only rac functions to a header of their own Andreas Rheinhardt
2022-07-23 5:16 ` [FFmpeg-devel] [PATCH 4/5] avcodec/vp56: Move VP5-9 range coder " Andreas Rheinhardt
2022-07-23 5:16 ` [FFmpeg-devel] [PATCH 5/5] avcodec/vp8, vp9: Avoid using VP56mv and VP56Frame in VP8/9 Andreas Rheinhardt
2022-07-23 13:34 ` Ronald S. Bultje
2022-07-23 15:17 ` Andreas Rheinhardt
2022-07-23 16:13 ` [FFmpeg-devel] [PATCH v2 " Andreas Rheinhardt
2022-07-26 21:51 ` [FFmpeg-devel] [PATCH 1/5] avcodec/hq_hqa: Remove transient GetByteContext from context Andreas Rheinhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DB6PR0101MB2214BAB83DC011BE2184A2A78F939@DB6PR0101MB2214.eurprd01.prod.exchangelabs.com \
--to=andreas.rheinhardt@outlook.com \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git