summaryrefslogtreecommitdiff
path: root/libs/ffvpx/libavcodec/vp56.h
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2022-05-30 14:44:19 -0500
committerMatt A. Tobin <email@mattatobin.com>2022-05-30 14:49:22 -0500
commit8510f335c3ff39c207d8cb906da3eb91cd73d75a (patch)
tree88bc89f66bc6b15e27dab678d34c43aaad75de80 /libs/ffvpx/libavcodec/vp56.h
parentf11b40c3ab4a5a766b0b71ab1e9a6199b23bbfeb (diff)
downloadaura-central-8510f335c3ff39c207d8cb906da3eb91cd73d75a.tar.gz
[Libs:ffvpx] Update FFVPX to version 4.2.7
Diffstat (limited to 'libs/ffvpx/libavcodec/vp56.h')
-rw-r--r--libs/ffvpx/libavcodec/vp56.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/libs/ffvpx/libavcodec/vp56.h b/libs/ffvpx/libavcodec/vp56.h
index b8dda9e73..65cf46870 100644
--- a/libs/ffvpx/libavcodec/vp56.h
+++ b/libs/ffvpx/libavcodec/vp56.h
@@ -89,6 +89,7 @@ typedef struct VP56RangeCoder {
const uint8_t *buffer;
const uint8_t *end;
unsigned int code_word;
+ int end_reached;
} VP56RangeCoder;
typedef struct VP56RefDc {
@@ -105,6 +106,7 @@ typedef struct VP56Macroblock {
typedef struct VP56Model {
uint8_t coeff_reorder[64]; /* used in vp6 only */
uint8_t coeff_index_to_pos[64]; /* used in vp6 only */
+ uint8_t coeff_index_to_idct_selector[64]; /* used in vp6 only */
uint8_t vector_sig[2]; /* delta sign */
uint8_t vector_dct[2]; /* delta coding types */
uint8_t vector_pdi[2][2]; /* predefined delta init */
@@ -157,6 +159,7 @@ struct vp56_context {
VP56mb mb_type;
VP56Macroblock *macroblocks;
DECLARE_ALIGNED(16, int16_t, block_coeff)[6][64];
+ int idct_selector[6];
/* motion vectors */
VP56mv mv[6]; /* vectors for each block in MB */
@@ -170,6 +173,7 @@ struct vp56_context {
int filter_mode;
int max_vector_length;
int sample_variance_threshold;
+ DECLARE_ALIGNED(8, int, bounding_values_array)[256];
uint8_t coeff_ctx[4][64]; /* used in vp5 only */
uint8_t coeff_ctx_last[4]; /* used in vp5 only */
@@ -227,6 +231,16 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
extern const uint8_t ff_vp56_norm_shift[256];
int ff_vp56_init_range_decoder(VP56RangeCoder *c, const uint8_t *buf, int buf_size);
+/**
+ * vp5689 returns 1 if the end of the stream has been reached, 0 otherwise.
+ */
+static av_always_inline int vpX_rac_is_end(VP56RangeCoder *c)
+{
+ if (c->end <= c->buffer && c->bits >= 0)
+ c->end_reached ++;
+ return c->end_reached > 10;
+}
+
static av_always_inline unsigned int vp56_rac_renorm(VP56RangeCoder *c)
{
int shift = ff_vp56_norm_shift[c->high];