Merge "Removing last_mi from MACROBLOCKD struct."
This commit is contained in:
commit
fec0d4bc7d
@ -204,7 +204,6 @@ typedef struct RefBuffer {
|
|||||||
typedef struct macroblockd {
|
typedef struct macroblockd {
|
||||||
struct macroblockd_plane plane[MAX_MB_PLANE];
|
struct macroblockd_plane plane[MAX_MB_PLANE];
|
||||||
|
|
||||||
MODE_INFO *last_mi;
|
|
||||||
int mode_info_stride;
|
int mode_info_stride;
|
||||||
|
|
||||||
// A NULL indicates that the 8x8 is not part of the image
|
// A NULL indicates that the 8x8 is not part of the image
|
||||||
|
@ -188,12 +188,13 @@ static INLINE int is_inside(const TileInfo *const tile,
|
|||||||
// to try and find candidate reference vectors.
|
// to try and find candidate reference vectors.
|
||||||
static void find_mv_refs_idx(const VP9_COMMON *cm, const MACROBLOCKD *xd,
|
static void find_mv_refs_idx(const VP9_COMMON *cm, const MACROBLOCKD *xd,
|
||||||
const TileInfo *const tile,
|
const TileInfo *const tile,
|
||||||
MODE_INFO *mi, const MODE_INFO *prev_mi,
|
MODE_INFO *mi, MV_REFERENCE_FRAME ref_frame,
|
||||||
MV_REFERENCE_FRAME ref_frame,
|
|
||||||
int_mv *mv_ref_list,
|
int_mv *mv_ref_list,
|
||||||
int block, int mi_row, int mi_col) {
|
int block, int mi_row, int mi_col) {
|
||||||
const int *ref_sign_bias = cm->ref_frame_sign_bias;
|
const int *ref_sign_bias = cm->ref_frame_sign_bias;
|
||||||
int i, refmv_count = 0;
|
int i, refmv_count = 0;
|
||||||
|
const MODE_INFO *prev_mi = cm->coding_use_prev_mi && cm->prev_mi ?
|
||||||
|
xd->prev_mi_8x8[0] : NULL;
|
||||||
const POSITION *const mv_ref_search = mv_ref_blocks[mi->mbmi.sb_type];
|
const POSITION *const mv_ref_search = mv_ref_blocks[mi->mbmi.sb_type];
|
||||||
const MB_MODE_INFO *const prev_mbmi = cm->coding_use_prev_mi && prev_mi ?
|
const MB_MODE_INFO *const prev_mbmi = cm->coding_use_prev_mi && prev_mi ?
|
||||||
&prev_mi->mbmi : NULL;
|
&prev_mi->mbmi : NULL;
|
||||||
@ -282,11 +283,10 @@ static void find_mv_refs_idx(const VP9_COMMON *cm, const MACROBLOCKD *xd,
|
|||||||
|
|
||||||
void vp9_find_mv_refs(const VP9_COMMON *cm, const MACROBLOCKD *xd,
|
void vp9_find_mv_refs(const VP9_COMMON *cm, const MACROBLOCKD *xd,
|
||||||
const TileInfo *const tile,
|
const TileInfo *const tile,
|
||||||
MODE_INFO *mi, const MODE_INFO *prev_mi,
|
MODE_INFO *mi, MV_REFERENCE_FRAME ref_frame,
|
||||||
MV_REFERENCE_FRAME ref_frame,
|
|
||||||
int_mv *mv_ref_list,
|
int_mv *mv_ref_list,
|
||||||
int mi_row, int mi_col) {
|
int mi_row, int mi_col) {
|
||||||
find_mv_refs_idx(cm, xd, tile, mi, prev_mi, ref_frame, mv_ref_list, -1,
|
find_mv_refs_idx(cm, xd, tile, mi, ref_frame, mv_ref_list, -1,
|
||||||
mi_row, mi_col);
|
mi_row, mi_col);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -324,8 +324,8 @@ void vp9_append_sub8x8_mvs_for_idx(VP9_COMMON *cm, MACROBLOCKD *xd,
|
|||||||
|
|
||||||
assert(MAX_MV_REF_CANDIDATES == 2);
|
assert(MAX_MV_REF_CANDIDATES == 2);
|
||||||
|
|
||||||
find_mv_refs_idx(cm, xd, tile, mi, xd->last_mi, mi->mbmi.ref_frame[ref],
|
find_mv_refs_idx(cm, xd, tile, mi, mi->mbmi.ref_frame[ref], mv_list, block,
|
||||||
mv_list, block, mi_row, mi_col);
|
mi_row, mi_col);
|
||||||
|
|
||||||
near->as_int = 0;
|
near->as_int = 0;
|
||||||
switch (block) {
|
switch (block) {
|
||||||
|
@ -31,10 +31,8 @@ static INLINE void clamp_mv2(MV *mv, const MACROBLOCKD *xd) {
|
|||||||
|
|
||||||
void vp9_find_mv_refs(const VP9_COMMON *cm, const MACROBLOCKD *xd,
|
void vp9_find_mv_refs(const VP9_COMMON *cm, const MACROBLOCKD *xd,
|
||||||
const TileInfo *const tile,
|
const TileInfo *const tile,
|
||||||
MODE_INFO *mi, const MODE_INFO *prev_mi,
|
MODE_INFO *mi, MV_REFERENCE_FRAME ref_frame,
|
||||||
MV_REFERENCE_FRAME ref_frame,
|
int_mv *mv_ref_list, int mi_row, int mi_col);
|
||||||
int_mv *mv_ref_list,
|
|
||||||
int mi_row, int mi_col);
|
|
||||||
|
|
||||||
// check a list of motion vectors by sad score using a number rows of pixels
|
// check a list of motion vectors by sad score using a number rows of pixels
|
||||||
// above and a number cols of pixels in the left to select the one with best
|
// above and a number cols of pixels in the left to select the one with best
|
||||||
|
@ -346,10 +346,6 @@ static void set_offsets(VP9_COMMON *const cm, MACROBLOCKD *const xd,
|
|||||||
|
|
||||||
xd->mi_8x8 = cm->mi_grid_visible + offset;
|
xd->mi_8x8 = cm->mi_grid_visible + offset;
|
||||||
xd->prev_mi_8x8 = cm->prev_mi_grid_visible + offset;
|
xd->prev_mi_8x8 = cm->prev_mi_grid_visible + offset;
|
||||||
|
|
||||||
xd->last_mi = cm->coding_use_prev_mi && cm->prev_mi ?
|
|
||||||
xd->prev_mi_8x8[0] : NULL;
|
|
||||||
|
|
||||||
xd->mi_8x8[0] = xd->mi_stream + offset - tile_offset;
|
xd->mi_8x8[0] = xd->mi_stream + offset - tile_offset;
|
||||||
xd->mi_8x8[0]->mbmi.sb_type = bsize;
|
xd->mi_8x8[0]->mbmi.sb_type = bsize;
|
||||||
for (y = 0; y < y_mis; ++y)
|
for (y = 0; y < y_mis; ++y)
|
||||||
|
@ -432,7 +432,7 @@ static void read_inter_block_mode_info(VP9_COMMON *const cm,
|
|||||||
|
|
||||||
for (ref = 0; ref < 1 + is_compound; ++ref) {
|
for (ref = 0; ref < 1 + is_compound; ++ref) {
|
||||||
const MV_REFERENCE_FRAME frame = mbmi->ref_frame[ref];
|
const MV_REFERENCE_FRAME frame = mbmi->ref_frame[ref];
|
||||||
vp9_find_mv_refs(cm, xd, tile, mi, xd->last_mi, frame, mbmi->ref_mvs[frame],
|
vp9_find_mv_refs(cm, xd, tile, mi, frame, mbmi->ref_mvs[frame],
|
||||||
mi_row, mi_col);
|
mi_row, mi_col);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -624,9 +624,6 @@ static void set_offsets(VP9_COMP *cpi, const TileInfo *const tile,
|
|||||||
|
|
||||||
xd->mi_8x8 = cm->mi_grid_visible + idx_str;
|
xd->mi_8x8 = cm->mi_grid_visible + idx_str;
|
||||||
xd->prev_mi_8x8 = cm->prev_mi_grid_visible + idx_str;
|
xd->prev_mi_8x8 = cm->prev_mi_grid_visible + idx_str;
|
||||||
|
|
||||||
xd->last_mi = cm->prev_mi ? xd->prev_mi_8x8[0] : NULL;
|
|
||||||
|
|
||||||
xd->mi_8x8[0] = cm->mi + idx_str;
|
xd->mi_8x8[0] = cm->mi + idx_str;
|
||||||
|
|
||||||
mbmi = &xd->mi_8x8[0]->mbmi;
|
mbmi = &xd->mi_8x8[0]->mbmi;
|
||||||
@ -2434,8 +2431,6 @@ static void encode_frame_internal(VP9_COMP *cpi) {
|
|||||||
// required for vp9_frame_init_quantizer
|
// required for vp9_frame_init_quantizer
|
||||||
xd->mi_8x8[0] = cm->mi;
|
xd->mi_8x8[0] = cm->mi;
|
||||||
|
|
||||||
xd->last_mi = cm->prev_mi;
|
|
||||||
|
|
||||||
vp9_zero(cm->counts.mv);
|
vp9_zero(cm->counts.mv);
|
||||||
vp9_zero(cpi->coef_counts);
|
vp9_zero(cpi->coef_counts);
|
||||||
vp9_zero(cm->counts.eob_branch);
|
vp9_zero(cm->counts.eob_branch);
|
||||||
|
@ -2332,8 +2332,7 @@ void vp9_setup_buffer_inter(VP9_COMP *cpi, MACROBLOCK *x,
|
|||||||
setup_pred_block(xd, yv12_mb[ref_frame], yv12, mi_row, mi_col, sf, sf);
|
setup_pred_block(xd, yv12_mb[ref_frame], yv12, mi_row, mi_col, sf, sf);
|
||||||
|
|
||||||
// Gets an initial list of candidate vectors from neighbours and orders them
|
// Gets an initial list of candidate vectors from neighbours and orders them
|
||||||
vp9_find_mv_refs(cm, xd, tile, mi, xd->last_mi, ref_frame, candidates,
|
vp9_find_mv_refs(cm, xd, tile, mi, ref_frame, candidates, mi_row, mi_col);
|
||||||
mi_row, mi_col);
|
|
||||||
|
|
||||||
// Candidate refinement carried out at encoder and decoder
|
// Candidate refinement carried out at encoder and decoder
|
||||||
vp9_find_best_ref_mvs(xd, cm->allow_high_precision_mv, candidates,
|
vp9_find_best_ref_mvs(xd, cm->allow_high_precision_mv, candidates,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user