Imported Upstream version 6.1
[platform/upstream/ffmpeg.git] / libavcodec / vp9dec.h
index 9cbd583..de7aba0 100644 (file)
 #include "libavutil/thread.h"
 #include "libavutil/internal.h"
 
+#include "get_bits.h"
+#include "videodsp.h"
 #include "vp9.h"
 #include "vp9dsp.h"
 #include "vp9shared.h"
+#include "vpx_rac.h"
 
 #define REF_INVALID_SCALE 0xFFFF
 
@@ -82,7 +85,7 @@ typedef struct VP9Filter {
 typedef struct VP9Block {
     uint8_t seg_id, intra, comp, ref[2], mode[4], uvmode, skip;
     enum FilterMode filter;
-    VP56mv mv[4 /* b_idx */][2 /* ref */];
+    VP9mv mv[4 /* b_idx */][2 /* ref */];
     enum BlockSize bs;
     enum TxfmMode tx, uvtx;
     enum BlockLevel bl;
@@ -98,7 +101,7 @@ typedef struct VP9Context {
     VP9DSPContext dsp;
     VideoDSPContext vdsp;
     GetBitContext gb;
-    VP56RangeCoder c;
+    VPXRangeCoder c;
     int pass, active_tile_cols;
 
 #if HAVE_THREADS
@@ -146,7 +149,7 @@ typedef struct VP9Context {
     uint8_t *above_comp_ctx; // 1bit
     uint8_t *above_ref_ctx; // 2bit
     uint8_t *above_filter_ctx;
-    VP56mv (*above_mv_ctx)[2];
+    VP9mv (*above_mv_ctx)[2];
 
     // whole-frame cache
     uint8_t *intra_pred_data[3];
@@ -163,11 +166,9 @@ typedef struct VP9Context {
 } VP9Context;
 
 struct VP9TileData {
-    //VP9Context should be const, but because of the threading API(generates
-    //a lot of warnings) it's not.
-    VP9Context *s;
-    VP56RangeCoder *c_b;
-    VP56RangeCoder *c;
+    const VP9Context *s;
+    VPXRangeCoder *c_b;
+    VPXRangeCoder *c;
     int row, row7, col, col7;
     uint8_t *dst[3];
     ptrdiff_t y_stride, uv_stride;
@@ -209,7 +210,7 @@ struct VP9TileData {
     // contextual (left) cache
     DECLARE_ALIGNED(16, uint8_t, left_y_nnz_ctx)[16];
     DECLARE_ALIGNED(16, uint8_t, left_mode_ctx)[16];
-    DECLARE_ALIGNED(16, VP56mv, left_mv_ctx)[16][2];
+    DECLARE_ALIGNED(16, VP9mv, left_mv_ctx)[16][2];
     DECLARE_ALIGNED(16, uint8_t, left_uv_nnz_ctx)[2][16];
     DECLARE_ALIGNED(8, uint8_t, left_partition_ctx)[8];
     DECLARE_ALIGNED(8, uint8_t, left_skip_ctx)[8];
@@ -237,7 +238,7 @@ struct VP9TileData {
     unsigned int nb_block_structure;
 };
 
-void ff_vp9_fill_mv(VP9TileData *td, VP56mv *mv, int mode, int sb);
+void ff_vp9_fill_mv(VP9TileData *td, VP9mv *mv, int mode, int sb);
 
 void ff_vp9_adapt_probs(VP9Context *s);