Merge "Make SB coding size-independent." into experimental
authorRonald S. Bultje <rbultje@google.com>
Wed, 10 Apr 2013 15:51:58 +0000 (08:51 -0700)
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>
Wed, 10 Apr 2013 15:51:58 +0000 (08:51 -0700)
1  2 
vp9/common/vp9_blockd.h
vp9/decoder/vp9_decodframe.c
vp9/encoder/vp9_rdopt.c

@@@ -198,20 -199,44 +199,52 @@@ typedef enum 
    MAX_REF_FRAMES = 4
  } MV_REFERENCE_FRAME;
  
- typedef enum {
-   BLOCK_SIZE_MB16X16 = 0,
-   BLOCK_SIZE_SB32X32 = 1,
-   BLOCK_SIZE_SB64X64 = 2,
- } BLOCK_SIZE_TYPE;
+ static INLINE int mb_width_log2(BLOCK_SIZE_TYPE sb_type) {
+   switch (sb_type) {
+ #if CONFIG_SBSEGMENT
+     case BLOCK_SIZE_SB16X32:
+ #endif
+     case BLOCK_SIZE_MB16X16: return 0;
+ #if CONFIG_SBSEGMENT
+     case BLOCK_SIZE_SB32X16:
+     case BLOCK_SIZE_SB32X64:
+ #endif
+     case BLOCK_SIZE_SB32X32: return 1;
+ #if CONFIG_SBSEGMENT
+     case BLOCK_SIZE_SB64X32:
+ #endif
+     case BLOCK_SIZE_SB64X64: return 2;
+     default: assert(0);
+   }
+ }
+ static INLINE int mb_height_log2(BLOCK_SIZE_TYPE sb_type) {
+   switch (sb_type) {
+ #if CONFIG_SBSEGMENT
+     case BLOCK_SIZE_SB32X16:
+ #endif
+     case BLOCK_SIZE_MB16X16: return 0;
+ #if CONFIG_SBSEGMENT
+     case BLOCK_SIZE_SB16X32:
+     case BLOCK_SIZE_SB64X32:
+ #endif
+     case BLOCK_SIZE_SB32X32: return 1;
+ #if CONFIG_SBSEGMENT
+     case BLOCK_SIZE_SB32X64:
+ #endif
+     case BLOCK_SIZE_SB64X64: return 2;
+     default: assert(0);
+   }
+ }
  
 +typedef enum {
 +  BLOCK_4X4_LG2 = 0,
 +  BLOCK_8X8_LG2 = 2,
 +  BLOCK_16X16_LG2 = 4,
 +  BLOCK_32X32_LG2 = 6,
 +  BLOCK_64X64_LG2 = 8
 +} BLOCK_SIZE_LG2;
 +
  typedef struct {
    MB_PREDICTION_MODE mode, uv_mode;
  #if CONFIG_COMP_INTERINTRA_PRED
Simple merge
Simple merge