| Index: source/libvpx/vp9/common/vp9_blockd.h
|
| ===================================================================
|
| --- source/libvpx/vp9/common/vp9_blockd.h (revision 223100)
|
| +++ source/libvpx/vp9/common/vp9_blockd.h (working copy)
|
| @@ -134,7 +134,7 @@
|
| typedef struct {
|
| MB_PREDICTION_MODE mode, uv_mode;
|
| MV_REFERENCE_FRAME ref_frame[2];
|
| - TX_SIZE txfm_size;
|
| + TX_SIZE tx_size;
|
| int_mv mv[2]; // for each reference frame used
|
| int_mv ref_mvs[MAX_REF_FRAMES][MAX_MV_REF_CANDIDATES];
|
| int_mv best_mv, best_second_mv;
|
| @@ -147,10 +147,6 @@
|
| // Flags used for prediction status of various bit-stream signals
|
| unsigned char seg_id_predicted;
|
|
|
| - // Indicates if the block is part of the image (1) vs border (0)
|
| - // This can be useful in determining whether it provides a valid predictor
|
| - unsigned char in_image;
|
| -
|
| INTERPOLATIONFILTERTYPE interp_filter;
|
|
|
| BLOCK_SIZE sb_type;
|
| @@ -206,10 +202,16 @@
|
|
|
| struct scale_factors scale_factor[2];
|
|
|
| - MODE_INFO *prev_mode_info_context;
|
| - MODE_INFO *mode_info_context;
|
| + MODE_INFO *last_mi;
|
| + MODE_INFO *this_mi;
|
| int mode_info_stride;
|
|
|
| + MODE_INFO *mic_stream_ptr;
|
| +
|
| + // A NULL indicates that the 8x8 is not part of the image
|
| + MODE_INFO **mi_8x8;
|
| + MODE_INFO **prev_mi_8x8;
|
| +
|
| int up_available;
|
| int left_available;
|
| int right_available;
|
| @@ -319,7 +321,7 @@
|
|
|
| static INLINE TX_TYPE get_tx_type_4x4(PLANE_TYPE plane_type,
|
| const MACROBLOCKD *xd, int ib) {
|
| - const MODE_INFO *const mi = xd->mode_info_context;
|
| + const MODE_INFO *const mi = xd->this_mi;
|
| const MB_MODE_INFO *const mbmi = &mi->mbmi;
|
|
|
| if (plane_type != PLANE_TYPE_Y_WITH_DC ||
|
| @@ -334,13 +336,13 @@
|
| static INLINE TX_TYPE get_tx_type_8x8(PLANE_TYPE plane_type,
|
| const MACROBLOCKD *xd) {
|
| return plane_type == PLANE_TYPE_Y_WITH_DC ?
|
| - mode2txfm_map[xd->mode_info_context->mbmi.mode] : DCT_DCT;
|
| + mode2txfm_map[xd->this_mi->mbmi.mode] : DCT_DCT;
|
| }
|
|
|
| static INLINE TX_TYPE get_tx_type_16x16(PLANE_TYPE plane_type,
|
| const MACROBLOCKD *xd) {
|
| return plane_type == PLANE_TYPE_Y_WITH_DC ?
|
| - mode2txfm_map[xd->mode_info_context->mbmi.mode] : DCT_DCT;
|
| + mode2txfm_map[xd->this_mi->mbmi.mode] : DCT_DCT;
|
| }
|
|
|
| static void setup_block_dptrs(MACROBLOCKD *xd, int ss_x, int ss_y) {
|
| @@ -360,7 +362,7 @@
|
|
|
|
|
| static INLINE TX_SIZE get_uv_tx_size(const MB_MODE_INFO *mbmi) {
|
| - return MIN(mbmi->txfm_size, max_uv_txsize_lookup[mbmi->sb_type]);
|
| + return MIN(mbmi->tx_size, max_uv_txsize_lookup[mbmi->sb_type]);
|
| }
|
|
|
| static BLOCK_SIZE get_plane_block_size(BLOCK_SIZE bsize,
|
| @@ -389,12 +391,12 @@
|
| const MACROBLOCKD *const xd, BLOCK_SIZE bsize, int plane,
|
| foreach_transformed_block_visitor visit, void *arg) {
|
| const struct macroblockd_plane *const pd = &xd->plane[plane];
|
| - const MB_MODE_INFO* mbmi = &xd->mode_info_context->mbmi;
|
| + const MB_MODE_INFO* mbmi = &xd->this_mi->mbmi;
|
| // block and transform sizes, in number of 4x4 blocks log 2 ("*_b")
|
| // 4x4=0, 8x8=2, 16x16=4, 32x32=6, 64x64=8
|
| // transform size varies per plane, look it up in a common way.
|
| const TX_SIZE tx_size = plane ? get_uv_tx_size(mbmi)
|
| - : mbmi->txfm_size;
|
| + : mbmi->tx_size;
|
| const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
|
| const int num_4x4_w = num_4x4_blocks_wide_lookup[plane_bsize];
|
| const int num_4x4_h = num_4x4_blocks_high_lookup[plane_bsize];
|
| @@ -584,4 +586,10 @@
|
| }
|
| }
|
|
|
| +static int get_tx_eob(struct segmentation *seg, int segment_id,
|
| + TX_SIZE tx_size) {
|
| + const int eob_max = 16 << (tx_size << 1);
|
| + return vp9_segfeature_active(seg, segment_id, SEG_LVL_SKIP) ? 0 : eob_max;
|
| +}
|
| +
|
| #endif // VP9_COMMON_VP9_BLOCKD_H_
|
|
|