]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/vp9.h
vp9: split superframes in the filtering stage before actual decoding
[ffmpeg] / libavcodec / vp9.h
index e59129818c6f318be8ea190b363fa8b78af03877..6fd5ba18b4489545e26c5400e9fb0f96e5cc6d8a 100644 (file)
@@ -127,9 +127,8 @@ typedef struct ProbContext {
     uint8_t partition[4][4][3];
 } ProbContext;
 
-typedef void (*vp9_mc_func)(uint8_t *dst, const uint8_t *ref,
-                            ptrdiff_t dst_stride,
-                            ptrdiff_t ref_stride,
+typedef void (*vp9_mc_func)(uint8_t *dst, ptrdiff_t dst_stride,
+                            const uint8_t *ref, ptrdiff_t ref_stride,
                             int h, int mx, int my);
 
 typedef struct VP9DSPContext {
@@ -271,6 +270,9 @@ typedef struct VP9Block {
     int row, row7, col, col7;
     uint8_t *dst[3];
     ptrdiff_t y_stride, uv_stride;
+
+    enum BlockLevel bl;
+    enum BlockPartition bp;
 } VP9Block;
 
 typedef struct VP9Context {
@@ -283,6 +285,14 @@ typedef struct VP9Context {
     VP9Block *b;
     VP9Block *b_base;
 
+    int alloc_width;
+    int alloc_height;
+
+    int pass;
+    int uses_2pass;
+    int last_uses_2pass;
+    int setup_finished;
+
     // bitstream header
     uint8_t profile;
     uint8_t keyframe, last_keyframe;
@@ -410,7 +420,8 @@ typedef struct VP9Context {
     // whole-frame cache
     uint8_t *intra_pred_data[3];
     VP9Filter *lflvl;
-    DECLARE_ALIGNED(32, uint8_t, edge_emu_buffer)[71 * 80];
+    // This requires 64 + 8 rows, with 80 bytes stride
+    DECLARE_ALIGNED(32, uint8_t, edge_emu_buffer)[72 * 80];
 
     // block reconstruction intermediates
     int16_t *block_base, *block, *uvblock_base[2], *uvblock[2];
@@ -420,8 +431,12 @@ typedef struct VP9Context {
     DECLARE_ALIGNED(32, uint8_t, tmp_uv)[2][32 * 32];
 } VP9Context;
 
+extern const int8_t ff_vp9_subpel_filters[3][15][8];
+
 void ff_vp9dsp_init(VP9DSPContext *dsp);
 
+void ff_vp9dsp_init_aarch64(VP9DSPContext *dsp);
+void ff_vp9dsp_init_arm(VP9DSPContext *dsp);
 void ff_vp9dsp_init_x86(VP9DSPContext *dsp);
 
 void ff_vp9_fill_mv(VP9Context *s, VP56mv *mv, int mode, int sb);