set_mv_limits(cm, x, mi_row, mi_col);
- for (rf_idx = 0; rf_idx < 3; ++rf_idx) {
+ for (rf_idx = 0; rf_idx < MAX_INTER_REF_FRAMES; ++rf_idx) {
int_mv mv;
if (ref_frame[rf_idx] == NULL) continue;
#endif // USE_PQSORT
#endif // CHANGE_MV_SEARCH_ORDER
-static void build_motion_field(VP9_COMP *cpi, MACROBLOCKD *xd, int frame_idx,
- YV12_BUFFER_CONFIG *ref_frame[3],
- BLOCK_SIZE bsize) {
+static void build_motion_field(
+ VP9_COMP *cpi, MACROBLOCKD *xd, int frame_idx,
+ YV12_BUFFER_CONFIG *ref_frame[MAX_INTER_REF_FRAMES], BLOCK_SIZE bsize) {
VP9_COMMON *cm = &cpi->common;
ThreadData *td = &cpi->td;
TplDepFrame *tpl_frame = &cpi->tpl_stats[frame_idx];
qsort(cpi->feature_score_loc_sort, fs_loc_sort_size,
sizeof(*cpi->feature_score_loc_sort), compare_feature_score);
- for (rf_idx = 0; rf_idx < 3; ++rf_idx) {
+ for (rf_idx = 0; rf_idx < MAX_INTER_REF_FRAMES; ++rf_idx) {
for (mi_row = 0; mi_row < cm->mi_rows; mi_row += mi_height) {
for (mi_col = 0; mi_col < cm->mi_cols; mi_col += mi_width) {
TplDepStats *tpl_stats =
}
// TODO(angiebird): Clean up this part.
- for (rf_idx = 0; rf_idx < 3; ++rf_idx) {
+ for (rf_idx = 0; rf_idx < MAX_INTER_REF_FRAMES; ++rf_idx) {
int i;
if (ref_frame[rf_idx] == NULL) {
continue;
int frame_idx, BLOCK_SIZE bsize) {
TplDepFrame *tpl_frame = &cpi->tpl_stats[frame_idx];
YV12_BUFFER_CONFIG *this_frame = gf_picture[frame_idx].frame;
- YV12_BUFFER_CONFIG *ref_frame[3] = { NULL, NULL, NULL };
+ YV12_BUFFER_CONFIG *ref_frame[MAX_INTER_REF_FRAMES] = { NULL, NULL, NULL };
VP9_COMMON *cm = &cpi->common;
struct scale_factors sf;
// Prepare reference frame pointers. If any reference frame slot is
// unavailable, the pointer will be set to Null.
- for (idx = 0; idx < 3; ++idx) {
+ for (idx = 0; idx < MAX_INTER_REF_FRAMES; ++idx) {
int rf_idx = gf_picture[frame_idx].ref_frame[idx];
if (rf_idx != -1) ref_frame[idx] = gf_picture[rf_idx].frame;
}
BLOCK_SIZE square_bsize = square_block_idx_to_bsize(square_block_idx);
build_motion_field(cpi, xd, frame_idx, ref_frame, square_bsize);
}
- for (rf_idx = 0; rf_idx < 3; ++rf_idx) {
+ for (rf_idx = 0; rf_idx < MAX_INTER_REF_FRAMES; ++rf_idx) {
int ref_frame_idx = gf_picture[frame_idx].ref_frame[rf_idx];
if (ref_frame_idx != -1) {
predict_mv_mode_arr(cpi, x, gf_picture, frame_idx, tpl_frame, rf_idx,
const VP9_COMMON *cm = &cpi->common;
int rf_idx;
for (frame_idx = 1; frame_idx < tpl_group_frames; ++frame_idx) {
- for (rf_idx = 0; rf_idx < 3; ++rf_idx) {
+ for (rf_idx = 0; rf_idx < MAX_INTER_REF_FRAMES; ++rf_idx) {
const TplDepFrame *tpl_frame = &cpi->tpl_stats[frame_idx];
int mi_row, mi_col;
int ref_frame_idx;
continue;
#if CONFIG_NON_GREEDY_MV
- for (rf_idx = 0; rf_idx < 3; ++rf_idx) {
+ for (rf_idx = 0; rf_idx < MAX_INTER_REF_FRAMES; ++rf_idx) {
for (sqr_bsize = 0; sqr_bsize < SQUARE_BLOCK_SIZES; ++sqr_bsize) {
vpx_free(cpi->tpl_stats[frame].pyramid_mv_arr[rf_idx][sqr_bsize]);
CHECK_MEM_ERROR(
for (frame = 0; frame < MAX_ARF_GOP_SIZE; ++frame) {
#if CONFIG_NON_GREEDY_MV
int rf_idx;
- for (rf_idx = 0; rf_idx < 3; ++rf_idx) {
+ for (rf_idx = 0; rf_idx < MAX_INTER_REF_FRAMES; ++rf_idx) {
int sqr_bsize;
for (sqr_bsize = 0; sqr_bsize < SQUARE_BLOCK_SIZES; ++sqr_bsize) {
vpx_free(cpi->tpl_stats[frame].pyramid_mv_arr[rf_idx][sqr_bsize]);
motion_field_info->motion_field_array =
vpx_calloc(frame_num, sizeof(*motion_field_info->motion_field_array));
for (frame_idx = 0; frame_idx < frame_num; ++frame_idx) {
- for (rf_idx = 0; rf_idx < 3; ++rf_idx) {
+ for (rf_idx = 0; rf_idx < MAX_INTER_REF_FRAMES; ++rf_idx) {
for (square_block_idx = 0; square_block_idx < SQUARE_BLOCK_SIZES;
++square_block_idx) {
BLOCK_SIZE bsize = square_block_idx_to_bsize(square_block_idx);
if (motion_field_info->allocated) {
int frame_idx, rf_idx, square_block_idx;
for (frame_idx = 0; frame_idx < motion_field_info->frame_num; ++frame_idx) {
- for (rf_idx = 0; rf_idx < 3; ++rf_idx) {
+ for (rf_idx = 0; rf_idx < MAX_INTER_REF_FRAMES; ++rf_idx) {
for (square_block_idx = 0; square_block_idx < SQUARE_BLOCK_SIZES;
++square_block_idx) {
MotionField *motion_field =