| Index: source/libvpx/vp9/common/vp9_onyxc_int.h
|
| diff --git a/source/libvpx/vp9/common/vp9_onyxc_int.h b/source/libvpx/vp9/common/vp9_onyxc_int.h
|
| index 7ca24a56ee5754b84753f32d358aca448792df0e..5179c6906339f0f374bce5d4dbfa697beeac8e39 100644
|
| --- a/source/libvpx/vp9/common/vp9_onyxc_int.h
|
| +++ b/source/libvpx/vp9/common/vp9_onyxc_int.h
|
| @@ -88,7 +88,7 @@ typedef struct {
|
| int col;
|
| } RefCntBuffer;
|
|
|
| -typedef struct {
|
| +typedef struct BufferPool {
|
| // Protect BufferPool from being accessed by several FrameWorkers at
|
| // the same time during frame parallel decode.
|
| // TODO(hkuang): Try to use atomic variable instead of locking the whole pool.
|
| @@ -184,6 +184,8 @@ typedef struct VP9Common {
|
| int y_dc_delta_q;
|
| int uv_dc_delta_q;
|
| int uv_ac_delta_q;
|
| + int16_t y_dequant[MAX_SEGMENTS][2];
|
| + int16_t uv_dequant[MAX_SEGMENTS][2];
|
|
|
| /* We allocate a MODE_INFO struct for each macroblock, together with
|
| an extra row on top and column on the left to simplify prediction. */
|
| @@ -201,6 +203,12 @@ typedef struct VP9Common {
|
| void (*free_mi)(struct VP9Common *cm);
|
| void (*setup_mi)(struct VP9Common *cm);
|
|
|
| + // Grid of pointers to 8x8 MODE_INFO structs. Any 8x8 not in the visible
|
| + // area will be NULL.
|
| + MODE_INFO **mi_grid_base;
|
| + MODE_INFO **mi_grid_visible;
|
| + MODE_INFO **prev_mi_grid_base;
|
| + MODE_INFO **prev_mi_grid_visible;
|
|
|
| // Whether to use previous frame's motion vectors for prediction.
|
| int use_prev_frame_mvs;
|
| @@ -371,7 +379,8 @@ static INLINE void set_mi_row_col(MACROBLOCKD *xd, const TileInfo *const tile,
|
| xd->up_available = (mi_row != 0);
|
| xd->left_available = (mi_col > tile->mi_col_start);
|
| if (xd->up_available) {
|
| - xd->above_mi = xd->mi[-xd->mi_stride].src_mi;
|
| + xd->above_mi = xd->mi[-xd->mi_stride];
|
| + // above_mi may be NULL in VP9 encoder's first pass.
|
| xd->above_mbmi = xd->above_mi ? &xd->above_mi->mbmi : NULL;
|
| } else {
|
| xd->above_mi = NULL;
|
| @@ -379,7 +388,8 @@ static INLINE void set_mi_row_col(MACROBLOCKD *xd, const TileInfo *const tile,
|
| }
|
|
|
| if (xd->left_available) {
|
| - xd->left_mi = xd->mi[-1].src_mi;
|
| + xd->left_mi = xd->mi[-1];
|
| + // left_mi may be NULL in VP9 encoder's first pass.
|
| xd->left_mbmi = xd->left_mi ? &xd->left_mi->mbmi : NULL;
|
| } else {
|
| xd->left_mi = NULL;
|
| @@ -400,8 +410,8 @@ static INLINE void update_partition_context(MACROBLOCKD *xd,
|
| // update the partition context at the end notes. set partition bits
|
| // of block sizes larger than the current one to be one, and partition
|
| // bits of smaller block sizes to be zero.
|
| - vpx_memset(above_ctx, partition_context_lookup[subsize].above, bs);
|
| - vpx_memset(left_ctx, partition_context_lookup[subsize].left, bs);
|
| + memset(above_ctx, partition_context_lookup[subsize].above, bs);
|
| + memset(left_ctx, partition_context_lookup[subsize].left, bs);
|
| }
|
|
|
| static INLINE int partition_plane_context(const MACROBLOCKD *xd,
|
| @@ -409,21 +419,12 @@ static INLINE int partition_plane_context(const MACROBLOCKD *xd,
|
| BLOCK_SIZE bsize) {
|
| const PARTITION_CONTEXT *above_ctx = xd->above_seg_context + mi_col;
|
| const PARTITION_CONTEXT *left_ctx = xd->left_seg_context + (mi_row & MI_MASK);
|
| -
|
| const int bsl = mi_width_log2_lookup[bsize];
|
| - const int bs = 1 << bsl;
|
| - int above = 0, left = 0, i;
|
| + int above = (*above_ctx >> bsl) & 1 , left = (*left_ctx >> bsl) & 1;
|
|
|
| assert(b_width_log2_lookup[bsize] == b_height_log2_lookup[bsize]);
|
| assert(bsl >= 0);
|
|
|
| - for (i = 0; i < bs; i++) {
|
| - above |= above_ctx[i];
|
| - left |= left_ctx[i];
|
| - }
|
| - above = (above & bs) > 0;
|
| - left = (left & bs) > 0;
|
| -
|
| return (left * 2 + above) + bsl * PARTITION_PLOFFSET;
|
| }
|
|
|
|
|