]> git.sesse.net Git - ffmpeg/commitdiff
lavc/vp9: shuffle header declaration
authorClément Bœsch <u@pkh.me>
Sat, 25 Mar 2017 12:24:46 +0000 (13:24 +0100)
committerClément Bœsch <u@pkh.me>
Mon, 27 Mar 2017 19:38:21 +0000 (21:38 +0200)
This reduces diff with Libav.

libavcodec/vp9.h

index ef277b1d1d4f12a0dba6a34ddbebf85b569d7732..a2067303000f433d174599753398547c7c4ed178 100644 (file)
 #include "thread.h"
 #include "vp56.h"
 
-enum BlockLevel {
-    BL_64X64,
-    BL_32X32,
-    BL_16X16,
-    BL_8X8,
-};
-
-enum BlockPartition {
-    PARTITION_NONE,    // [ ] <-.
-    PARTITION_H,       // [-]   |
-    PARTITION_V,       // [|]   |
-    PARTITION_SPLIT,   // [+] --'
-};
-
-enum BlockSize {
-    BS_64x64,
-    BS_64x32,
-    BS_32x64,
-    BS_32x32,
-    BS_32x16,
-    BS_16x32,
-    BS_16x16,
-    BS_16x8,
-    BS_8x16,
-    BS_8x8,
-    BS_8x4,
-    BS_4x8,
-    BS_4x4,
-    N_BS_SIZES,
-};
-
 enum TxfmMode {
     TX_4X4,
     TX_8X8,
@@ -102,13 +71,6 @@ enum IntraPredMode {
     N_INTRA_PRED_MODES
 };
 
-enum InterPredMode {
-    NEARESTMV = 10,
-    NEARMV = 11,
-    ZEROMV = 12,
-    NEWMV = 13,
-};
-
 enum FilterMode {
     FILTER_8TAP_SMOOTH,
     FILTER_8TAP_REGULAR,
@@ -117,10 +79,18 @@ enum FilterMode {
     FILTER_SWITCHABLE,
 };
 
-enum CompPredMode {
-    PRED_SINGLEREF,
-    PRED_COMPREF,
-    PRED_SWITCHABLE,
+enum BlockPartition {
+    PARTITION_NONE,    // [ ] <-.
+    PARTITION_H,       // [-]   |
+    PARTITION_V,       // [|]   |
+    PARTITION_SPLIT,   // [+] --'
+};
+
+enum InterPredMode {
+    NEARESTMV = 10,
+    NEARMV    = 11,
+    ZEROMV    = 12,
+    NEWMV     = 13,
 };
 
 enum MVJoint {
@@ -248,6 +218,12 @@ typedef struct VP9DSPContext {
     vp9_scaled_mc_func smc[5][4][2];
 } VP9DSPContext;
 
+enum CompPredMode {
+    PRED_SINGLEREF,
+    PRED_COMPREF,
+    PRED_SWITCHABLE,
+};
+
 typedef struct VP9mvrefPair {
     VP56mv mv[2];
     int8_t ref[2];
@@ -270,6 +246,40 @@ typedef struct VP9Frame {
     void *hwaccel_picture_private;
 } VP9Frame;
 
+enum BlockLevel {
+    BL_64X64,
+    BL_32X32,
+    BL_16X16,
+    BL_8X8,
+};
+
+enum BlockSize {
+    BS_64x64,
+    BS_64x32,
+    BS_32x64,
+    BS_32x32,
+    BS_32x16,
+    BS_16x32,
+    BS_16x16,
+    BS_16x8,
+    BS_8x16,
+    BS_8x8,
+    BS_8x4,
+    BS_4x8,
+    BS_4x4,
+    N_BS_SIZES,
+};
+
+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 */];
+    enum BlockSize bs;
+    enum TxfmMode tx, uvtx;
+    enum BlockLevel bl;
+    enum BlockPartition bp;
+} VP9Block;
+
 typedef struct VP9BitstreamHeader {
     // bitstream header
     uint8_t profile;
@@ -345,16 +355,6 @@ typedef struct VP9SharedContext {
     VP9Frame frames[3];
 } VP9SharedContext;
 
-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 */];
-    enum BlockSize bs;
-    enum TxfmMode tx, uvtx;
-    enum BlockLevel bl;
-    enum BlockPartition bp;
-} VP9Block;
-
 typedef struct VP9Context {
     VP9SharedContext s;