From: Ronald S. Bultje Date: Wed, 10 Apr 2013 15:51:58 +0000 (-0700) Subject: Merge "Make SB coding size-independent." into experimental X-Git-Tag: v1.3.0~1106^2~294 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1932828d19a2b6db8f9a120570a1f4d522064cda;p=platform%2Fupstream%2Flibvpx.git Merge "Make SB coding size-independent." into experimental --- 1932828d19a2b6db8f9a120570a1f4d522064cda diff --cc vp9/common/vp9_blockd.h index f441811,d0c7707..d372325 --- a/vp9/common/vp9_blockd.h +++ b/vp9/common/vp9_blockd.h @@@ -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