Compare commits

..

2 Commits

Author SHA1 Message Date
Scott LaVarnway
437d033dbb Merge "Remove tile param" 2015-06-29 18:04:56 +00:00
Scott LaVarnway
86f4a3d8af Remove tile param
and added to MACROBLOCKD.

Change-Id: I0e60aaa9f84bcc9f2376d71bd934f251baee38db
2015-06-22 06:09:38 -07:00
26 changed files with 93 additions and 742 deletions

2
configure vendored
View File

@@ -251,8 +251,6 @@ HAVE_LIST="
EXPERIMENT_LIST="
spatial_svc
fp_mb_stats
full_buffer_test
internal_resize
emulate_hardware
"
CONFIG_LIST="

View File

@@ -159,7 +159,6 @@ endif
ifeq ($(CONFIG_VP9_ENCODER)$(CONFIG_VP9_TEMPORAL_DENOISING),yesyes)
LIBVPX_TEST_SRCS-$(HAVE_SSE2) += vp9_denoiser_sse2_test.cc
endif
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_arf_freq_test.cc
endif # VP9

View File

@@ -135,7 +135,6 @@ TEST_P(TestVectorTest, MD5Match) {
// Test VP8 decode in serial mode with single thread.
// NOTE: VP8 only support serial mode.
#if CONFIG_VP8_DECODER
VP8_INSTANTIATE_TEST_CASE(
TestVectorTest,
::testing::Combine(
@@ -144,10 +143,8 @@ VP8_INSTANTIATE_TEST_CASE(
::testing::ValuesIn(libvpx_test::kVP8TestVectors,
libvpx_test::kVP8TestVectors +
libvpx_test::kNumVP8TestVectors)));
#endif
// Test VP9 decode in serial mode with single thread.
#if CONFIG_VP9_DECODER
VP9_INSTANTIATE_TEST_CASE(
TestVectorTest,
::testing::Combine(
@@ -157,6 +154,8 @@ VP9_INSTANTIATE_TEST_CASE(
libvpx_test::kVP9TestVectors +
libvpx_test::kNumVP9TestVectors)));
#if CONFIG_VP9_DECODER
// Test VP9 decode in frame parallel mode with different number of threads.
INSTANTIATE_TEST_CASE_P(
VP9MultiThreadedFrameParallel, TestVectorTest,

View File

@@ -1,230 +0,0 @@
/*
* Copyright (c) 2015 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "test/codec_factory.h"
#include "test/encode_test_driver.h"
#include "test/y4m_video_source.h"
#include "test/yuv_video_source.h"
#include "test/util.h"
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "vp9/encoder/vp9_ratectrl.h"
namespace {
const unsigned int kFrames = 100;
const int kBitrate = 500;
#define ARF_NOT_SEEN 1000001
#define ARF_SEEN_ONCE 1000000
typedef struct {
const char *filename;
unsigned int width;
unsigned int height;
unsigned int framerate_num;
unsigned int framerate_den;
unsigned int input_bit_depth;
vpx_img_fmt fmt;
vpx_bit_depth_t bit_depth;
unsigned int profile;
} TestVideoParam;
typedef struct {
libvpx_test::TestMode mode;
int cpu_used;
} TestEncodeParam;
const TestVideoParam kTestVectors[] = {
// artificially increase framerate to trigger default check
{"hantro_collage_w352h288.yuv", 352, 288, 5000, 1,
8, VPX_IMG_FMT_I420, VPX_BITS_8, 0},
{"hantro_collage_w352h288.yuv", 352, 288, 30, 1,
8, VPX_IMG_FMT_I420, VPX_BITS_8, 0},
{"rush_hour_444.y4m", 352, 288, 30, 1,
8, VPX_IMG_FMT_I444, VPX_BITS_8, 1},
#if CONFIG_VP9_HIGHBITDEPTH
// Add list of profile 2/3 test videos here ...
#endif // CONFIG_VP9_HIGHBITDEPTH
};
const TestEncodeParam kEncodeVectors[] = {
{::libvpx_test::kOnePassGood, 2},
{::libvpx_test::kOnePassGood, 5},
{::libvpx_test::kTwoPassGood, 1},
{::libvpx_test::kTwoPassGood, 2},
{::libvpx_test::kTwoPassGood, 5},
{::libvpx_test::kRealTime, 5},
};
const int kMinArfVectors[] = {
// NOTE: 0 refers to the default built-in logic in:
// vp9_rc_get_default_min_gf_interval(...)
0, 4, 8, 12, 15
};
int is_extension_y4m(const char *filename) {
const char *dot = strrchr(filename, '.');
if (!dot || dot == filename)
return 0;
else
return !strcmp(dot, ".y4m");
}
class ArfFreqTest
: public ::libvpx_test::EncoderTest,
public ::libvpx_test::CodecTestWith3Params<TestVideoParam, \
TestEncodeParam, int> {
protected:
ArfFreqTest()
: EncoderTest(GET_PARAM(0)),
test_video_param_(GET_PARAM(1)),
test_encode_param_(GET_PARAM(2)),
min_arf_requested_(GET_PARAM(3)) {
}
virtual ~ArfFreqTest() {}
virtual void SetUp() {
InitializeConfig();
SetMode(test_encode_param_.mode);
if (test_encode_param_.mode != ::libvpx_test::kRealTime) {
cfg_.g_lag_in_frames = 25;
cfg_.rc_end_usage = VPX_VBR;
} else {
cfg_.g_lag_in_frames = 0;
cfg_.rc_end_usage = VPX_CBR;
cfg_.rc_buf_sz = 1000;
cfg_.rc_buf_initial_sz = 500;
cfg_.rc_buf_optimal_sz = 600;
}
dec_cfg_.threads = 4;
}
virtual void BeginPassHook(unsigned int) {
min_arf_ = ARF_NOT_SEEN;
run_of_visible_frames_ = 0;
}
int GetNumFramesInPkt(const vpx_codec_cx_pkt_t *pkt) {
const uint8_t *buffer = reinterpret_cast<uint8_t*>(pkt->data.frame.buf);
const uint8_t marker = buffer[pkt->data.frame.sz - 1];
const int mag = ((marker >> 3) & 3) + 1;
int frames = (marker & 0x7) + 1;
const unsigned int index_sz = 2 + mag * frames;
// Check for superframe or not.
// Assume superframe has only one visible frame, the rest being
// invisible. If superframe index is not found, then there is only
// one frame.
if (!((marker & 0xe0) == 0xc0 &&
pkt->data.frame.sz >= index_sz &&
buffer[pkt->data.frame.sz - index_sz] == marker)) {
frames = 1;
}
return frames;
}
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
if (pkt->kind != VPX_CODEC_CX_FRAME_PKT)
return;
const int frames = GetNumFramesInPkt(pkt);
if (frames == 1) {
run_of_visible_frames_++;
} else if (frames == 2) {
if (min_arf_ == ARF_NOT_SEEN) {
min_arf_ = ARF_SEEN_ONCE;
} else if (min_arf_ == ARF_SEEN_ONCE ||
run_of_visible_frames_ < min_arf_) {
min_arf_ = run_of_visible_frames_;
}
run_of_visible_frames_ = 1;
} else {
min_arf_ = 0;
run_of_visible_frames_ = 1;
}
}
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
::libvpx_test::Encoder *encoder) {
if (video->frame() == 0) {
encoder->Control(VP9E_SET_FRAME_PARALLEL_DECODING, 1);
encoder->Control(VP9E_SET_TILE_COLUMNS, 4);
encoder->Control(VP8E_SET_CPUUSED, test_encode_param_.cpu_used);
encoder->Control(VP9E_SET_MIN_GF_INTERVAL, min_arf_requested_);
if (test_encode_param_.mode != ::libvpx_test::kRealTime) {
encoder->Control(VP8E_SET_ENABLEAUTOALTREF, 1);
encoder->Control(VP8E_SET_ARNR_MAXFRAMES, 7);
encoder->Control(VP8E_SET_ARNR_STRENGTH, 5);
encoder->Control(VP8E_SET_ARNR_TYPE, 3);
}
}
}
int GetMinArfDistance() const {
return min_arf_;
}
int GetMinArfDistanceRequested() const {
if (min_arf_requested_)
return min_arf_requested_;
else
return vp9_rc_get_default_min_gf_interval(
test_video_param_.width, test_video_param_.height,
(double)test_video_param_.framerate_num /
test_video_param_.framerate_den);
}
TestVideoParam test_video_param_;
TestEncodeParam test_encode_param_;
private:
int min_arf_requested_;
int min_arf_;
int run_of_visible_frames_;
};
TEST_P(ArfFreqTest, MinArfFreqTest) {
cfg_.rc_target_bitrate = kBitrate;
cfg_.g_error_resilient = 0;
cfg_.g_profile = test_video_param_.profile;
cfg_.g_input_bit_depth = test_video_param_.input_bit_depth;
cfg_.g_bit_depth = test_video_param_.bit_depth;
init_flags_ = VPX_CODEC_USE_PSNR;
if (cfg_.g_bit_depth > 8)
init_flags_ |= VPX_CODEC_USE_HIGHBITDEPTH;
libvpx_test::VideoSource *video;
if (is_extension_y4m(test_video_param_.filename)) {
video = new libvpx_test::Y4mVideoSource(test_video_param_.filename,
0, kFrames);
} else {
video = new libvpx_test::YUVVideoSource(test_video_param_.filename,
test_video_param_.fmt,
test_video_param_.width,
test_video_param_.height,
test_video_param_.framerate_num,
test_video_param_.framerate_den,
0, kFrames);
}
ASSERT_NO_FATAL_FAILURE(RunLoop(video));
const int min_arf_dist = GetMinArfDistance();
const int min_arf_dist_requested = GetMinArfDistanceRequested();
if (min_arf_dist != ARF_NOT_SEEN && min_arf_dist != ARF_SEEN_ONCE) {
EXPECT_GE(min_arf_dist, min_arf_dist_requested);
}
delete(video);
}
VP9_INSTANTIATE_TEST_CASE(
ArfFreqTest,
::testing::ValuesIn(kTestVectors),
::testing::ValuesIn(kEncodeVectors),
::testing::ValuesIn(kMinArfVectors));
} // namespace

View File

@@ -23,6 +23,7 @@
#include "vp9/common/vp9_mv.h"
#include "vp9/common/vp9_scale.h"
#include "vp9/common/vp9_seg_common.h"
#include "vp9/common/vp9_tile_common.h"
#ifdef __cplusplus
extern "C" {
@@ -149,7 +150,10 @@ typedef struct RefBuffer {
typedef struct macroblockd {
struct macroblockd_plane plane[MAX_MB_PLANE];
FRAME_COUNTS *counts;
TileInfo tile;
int mi_stride;
MODE_INFO **mi;

View File

@@ -14,7 +14,6 @@
// This function searches the neighbourhood of a given MB/SB
// to try and find candidate reference vectors.
static void find_mv_refs_idx(const VP9_COMMON *cm, const MACROBLOCKD *xd,
const TileInfo *const tile,
MODE_INFO *mi, MV_REFERENCE_FRAME ref_frame,
int_mv *mv_ref_list,
int block, int mi_row, int mi_col,
@@ -27,6 +26,7 @@ static void find_mv_refs_idx(const VP9_COMMON *cm, const MACROBLOCKD *xd,
int context_counter = 0;
const MV_REF *const prev_frame_mvs = cm->use_prev_frame_mvs ?
cm->prev_frame->mvs + mi_row * cm->mi_cols + mi_col : NULL;
const TileInfo *const tile = &xd->tile;
// Blank the reference vector list
memset(mv_ref_list, 0, sizeof(*mv_ref_list) * MAX_MV_REF_CANDIDATES);
@@ -147,13 +147,12 @@ 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,
const TileInfo *const tile,
MODE_INFO *mi, MV_REFERENCE_FRAME ref_frame,
int_mv *mv_ref_list,
int mi_row, int mi_col,
find_mv_refs_sync sync, void *const data,
uint8_t *mode_context) {
find_mv_refs_idx(cm, xd, tile, mi, ref_frame, mv_ref_list, -1,
find_mv_refs_idx(cm, xd, mi, ref_frame, mv_ref_list, -1,
mi_row, mi_col, sync, data, mode_context);
}
@@ -181,7 +180,6 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd, int allow_hp,
}
void vp9_append_sub8x8_mvs_for_idx(VP9_COMMON *cm, MACROBLOCKD *xd,
const TileInfo *const tile,
int block, int ref, int mi_row, int mi_col,
int_mv *nearest_mv, int_mv *near_mv,
uint8_t *mode_context) {
@@ -192,7 +190,7 @@ void vp9_append_sub8x8_mvs_for_idx(VP9_COMMON *cm, MACROBLOCKD *xd,
assert(MAX_MV_REF_CANDIDATES == 2);
find_mv_refs_idx(cm, xd, tile, mi, mi->mbmi.ref_frame[ref], mv_list, block,
find_mv_refs_idx(cm, xd, mi, mi->mbmi.ref_frame[ref], mv_list, block,
mi_row, mi_col, NULL, NULL, mode_context);
near_mv->as_int = 0;

View File

@@ -209,7 +209,6 @@ static INLINE void clamp_mv2(MV *mv, const MACROBLOCKD *xd) {
typedef void (*find_mv_refs_sync)(void *const data, int mi_row);
void vp9_find_mv_refs(const VP9_COMMON *cm, const MACROBLOCKD *xd,
const TileInfo *const tile,
MODE_INFO *mi, MV_REFERENCE_FRAME ref_frame,
int_mv *mv_ref_list, int mi_row, int mi_col,
find_mv_refs_sync sync, void *const data,
@@ -222,7 +221,6 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd, int allow_hp,
int_mv *mvlist, int_mv *nearest_mv, int_mv *near_mv);
void vp9_append_sub8x8_mvs_for_idx(VP9_COMMON *cm, MACROBLOCKD *xd,
const TileInfo *const tile,
int block, int ref, int mi_row, int mi_col,
int_mv *nearest_mv, int_mv *near_mv,
uint8_t *mode_context);

View File

@@ -168,9 +168,9 @@ MV average_split_mvs(const struct macroblockd_plane *pd,
}
void build_inter_predictors(MACROBLOCKD *xd, int plane, int block,
int bw, int bh,
int x, int y, int w, int h,
int mi_x, int mi_y) {
int bw, int bh,
int x, int y, int w, int h,
int mi_x, int mi_y) {
struct macroblockd_plane *const pd = &xd->plane[plane];
const MODE_INFO *mi = xd->mi[0];
const int is_compound = has_second_ref(&mi->mbmi);
@@ -201,20 +201,7 @@ void build_inter_predictors(MACROBLOCKD *xd, int plane, int block,
const int is_scaled = vp9_is_scaled(sf);
if (is_scaled) {
// Co-ordinate of containing block to pixel precision.
int x_start = (-xd->mb_to_left_edge >> (3 + pd->subsampling_x));
int y_start = (-xd->mb_to_top_edge >> (3 + pd->subsampling_y));
if (plane == 0)
pre_buf->buf = xd->block_refs[ref]->buf->y_buffer;
else if (plane == 1)
pre_buf->buf = xd->block_refs[ref]->buf->u_buffer;
else
pre_buf->buf = xd->block_refs[ref]->buf->v_buffer;
pre_buf->buf += scaled_buffer_offset(x_start + x, y_start + y,
pre_buf->stride, sf);
pre = pre_buf->buf;
pre = pre_buf->buf + scaled_buffer_offset(x, y, pre_buf->stride, sf);
scaled_mv = vp9_scale_mv(&mv_q4, mi_x + x, mi_y + y, sf);
xs = sf->x_step_q4;
ys = sf->y_step_q4;

View File

@@ -698,7 +698,6 @@ static void dec_build_inter_predictors_sb(VP9Decoder *const pbi,
}
static MB_MODE_INFO *set_offsets(VP9_COMMON *const cm, MACROBLOCKD *const xd,
const TileInfo *const tile,
BLOCK_SIZE bsize, int mi_row, int mi_col) {
const int bw = num_8x8_blocks_wide_lookup[bsize];
const int bh = num_8x8_blocks_high_lookup[bsize];
@@ -706,6 +705,7 @@ static MB_MODE_INFO *set_offsets(VP9_COMMON *const cm, MACROBLOCKD *const xd,
const int y_mis = MIN(bh, cm->mi_rows - mi_row);
const int offset = mi_row * cm->mi_stride + mi_col;
int x, y;
const TileInfo *const tile = &xd->tile;
xd->mi = cm->mi_grid_visible + offset;
xd->mi[0] = &cm->mi[offset];
@@ -726,12 +726,11 @@ static MB_MODE_INFO *set_offsets(VP9_COMMON *const cm, MACROBLOCKD *const xd,
}
static void decode_block(VP9Decoder *const pbi, MACROBLOCKD *const xd,
const TileInfo *const tile,
int mi_row, int mi_col,
vp9_reader *r, BLOCK_SIZE bsize) {
VP9_COMMON *const cm = &pbi->common;
const int less8x8 = bsize < BLOCK_8X8;
MB_MODE_INFO *mbmi = set_offsets(cm, xd, tile, bsize, mi_row, mi_col);
MB_MODE_INFO *mbmi = set_offsets(cm, xd, bsize, mi_row, mi_col);
if (bsize >= BLOCK_8X8 && (cm->subsampling_x || cm->subsampling_y)) {
const BLOCK_SIZE uv_subsize =
@@ -741,17 +740,11 @@ static void decode_block(VP9Decoder *const pbi, MACROBLOCKD *const xd,
VPX_CODEC_CORRUPT_FRAME, "Invalid block size.");
}
vp9_read_mode_info(pbi, xd, tile, mi_row, mi_col, r);
vp9_read_mode_info(pbi, xd, mi_row, mi_col, r);
if (less8x8)
bsize = BLOCK_8X8;
#if CONFIG_INTERNAL_STATS
pbi->total_block_in_8x8 += (1 << (num_pels_log2_lookup[bsize] - 6));
if (!is_inter_block(mbmi))
pbi->intra_block_in_8x8 += (1 << (num_pels_log2_lookup[bsize] - 6));
#endif
if (mbmi->skip) {
reset_skip_context(xd, bsize);
}
@@ -760,9 +753,6 @@ static void decode_block(VP9Decoder *const pbi, MACROBLOCKD *const xd,
struct intra_args arg = {xd, r, mbmi->segment_id};
vp9_foreach_transformed_block(xd, bsize,
predict_and_reconstruct_intra_block, &arg);
#if CONFIG_INTERNAL_STATS
pbi->sub8x8_intra += less8x8;
#endif
} else {
// Prediction
dec_build_inter_predictors_sb(pbi, xd, mi_row, mi_col, bsize);
@@ -775,10 +765,6 @@ static void decode_block(VP9Decoder *const pbi, MACROBLOCKD *const xd,
if (!less8x8 && eobtotal == 0)
mbmi->skip = 1; // skip loopfilter
}
#if CONFIG_INTERNAL_STATS
pbi->sub8x8_inter += less8x8;
#endif
}
xd->corrupted |= vp9_reader_has_error(r);
@@ -808,7 +794,6 @@ static PARTITION_TYPE read_partition(MACROBLOCKD *xd, int mi_row, int mi_col,
}
static void decode_partition(VP9Decoder *const pbi, MACROBLOCKD *const xd,
const TileInfo *const tile,
int mi_row, int mi_col,
vp9_reader* r, BLOCK_SIZE bsize) {
VP9_COMMON *const cm = &pbi->common;
@@ -824,27 +809,27 @@ static void decode_partition(VP9Decoder *const pbi, MACROBLOCKD *const xd,
partition = read_partition(xd, mi_row, mi_col, bsize, r, has_rows, has_cols);
subsize = get_subsize(bsize, partition);
if (bsize == BLOCK_8X8) {
decode_block(pbi, xd, tile, mi_row, mi_col, r, subsize);
decode_block(pbi, xd, mi_row, mi_col, r, subsize);
} else {
switch (partition) {
case PARTITION_NONE:
decode_block(pbi, xd, tile, mi_row, mi_col, r, subsize);
decode_block(pbi, xd, mi_row, mi_col, r, subsize);
break;
case PARTITION_HORZ:
decode_block(pbi, xd, tile, mi_row, mi_col, r, subsize);
decode_block(pbi, xd, mi_row, mi_col, r, subsize);
if (has_rows)
decode_block(pbi, xd, tile, mi_row + hbs, mi_col, r, subsize);
decode_block(pbi, xd, mi_row + hbs, mi_col, r, subsize);
break;
case PARTITION_VERT:
decode_block(pbi, xd, tile, mi_row, mi_col, r, subsize);
decode_block(pbi, xd, mi_row, mi_col, r, subsize);
if (has_cols)
decode_block(pbi, xd, tile, mi_row, mi_col + hbs, r, subsize);
decode_block(pbi, xd, mi_row, mi_col + hbs, r, subsize);
break;
case PARTITION_SPLIT:
decode_partition(pbi, xd, tile, mi_row, mi_col, r, subsize);
decode_partition(pbi, xd, tile, mi_row, mi_col + hbs, r, subsize);
decode_partition(pbi, xd, tile, mi_row + hbs, mi_col, r, subsize);
decode_partition(pbi, xd, tile, mi_row + hbs, mi_col + hbs, r, subsize);
decode_partition(pbi, xd, mi_row, mi_col, r, subsize);
decode_partition(pbi, xd, mi_row, mi_col + hbs, r, subsize);
decode_partition(pbi, xd, mi_row + hbs, mi_col, r, subsize);
decode_partition(pbi, xd, mi_row + hbs, mi_col + hbs, r, subsize);
break;
default:
assert(0 && "Invalid partition type");
@@ -1328,7 +1313,6 @@ static const uint8_t *decode_tiles(VP9Decoder *pbi,
// Load all tile information into tile_data.
for (tile_row = 0; tile_row < tile_rows; ++tile_row) {
for (tile_col = 0; tile_col < tile_cols; ++tile_col) {
TileInfo tile;
const TileBuffer *const buf = &tile_buffers[tile_row][tile_col];
tile_data = pbi->tile_data + tile_cols * tile_row + tile_col;
tile_data->cm = cm;
@@ -1336,7 +1320,7 @@ static const uint8_t *decode_tiles(VP9Decoder *pbi,
tile_data->xd.corrupted = 0;
tile_data->xd.counts = cm->frame_parallel_decoding_mode ?
NULL : &cm->counts;
vp9_tile_init(&tile, tile_data->cm, tile_row, tile_col);
vp9_tile_init(&tile_data->xd.tile, tile_data->cm, tile_row, tile_col);
setup_token_decoder(buf->data, data_end, buf->size, &cm->error,
&tile_data->bit_reader, pbi->decrypt_cb,
pbi->decrypt_state);
@@ -1358,8 +1342,8 @@ static const uint8_t *decode_tiles(VP9Decoder *pbi,
vp9_zero(tile_data->xd.left_seg_context);
for (mi_col = tile.mi_col_start; mi_col < tile.mi_col_end;
mi_col += MI_BLOCK_SIZE) {
decode_partition(pbi, &tile_data->xd, &tile, mi_row,
mi_col, &tile_data->bit_reader, BLOCK_64X64);
decode_partition(pbi, &tile_data->xd, mi_row, mi_col,
&tile_data->bit_reader, BLOCK_64X64);
}
pbi->mb.corrupted |= tile_data->xd.corrupted;
if (pbi->mb.corrupted)
@@ -1432,7 +1416,7 @@ static int tile_worker_hook(TileWorkerData *const tile_data,
for (mi_col = tile->mi_col_start; mi_col < tile->mi_col_end;
mi_col += MI_BLOCK_SIZE) {
decode_partition(tile_data->pbi, &tile_data->xd,
tile, mi_row, mi_col, &tile_data->bit_reader,
mi_row, mi_col, &tile_data->bit_reader,
BLOCK_64X64);
}
}
@@ -1556,6 +1540,7 @@ static const uint8_t *decode_tiles_mt(VP9Decoder *pbi,
tile_data->xd.counts = cm->frame_parallel_decoding_mode ?
0 : &tile_data->counts;
vp9_tile_init(tile, cm, 0, buf->col);
vp9_tile_init(&tile_data->xd.tile, cm, 0, buf->col);
setup_token_decoder(buf->data, data_end, buf->size, &cm->error,
&tile_data->bit_reader, pbi->decrypt_cb,
pbi->decrypt_state);
@@ -1694,7 +1679,6 @@ static size_t read_uncompressed_header(VP9Decoder *pbi,
for (i = 0; i < REF_FRAMES; ++i)
cm->next_ref_frame_map[i] = cm->ref_frame_map[i];
}
return 0;
}
@@ -1807,17 +1791,6 @@ static size_t read_uncompressed_header(VP9Decoder *pbi,
// below, forcing the use of context 0 for those frame types.
cm->frame_context_idx = vp9_rb_read_literal(rb, FRAME_CONTEXTS_LOG2);
#if CONFIG_FULL_BUFFER_TEST
{
int k;
fprintf(stderr, "\nDecode frame index %d, is_show_frame %d, new_fb_idx %d\n",
cm->current_video_frame, cm->show_frame, cm->new_fb_idx);
for (k = 0; k < 8; ++k)
fprintf(stderr, "%d ", cm->ref_frame_map[k]);
fprintf(stderr, "\n");
}
#endif
// Generate next_ref_frame_map.
lock_buffer_pool(pool);
for (mask = pbi->refresh_frame_flags; mask; mask >>= 1) {
@@ -2004,9 +1977,6 @@ void vp9_decode_frame(VP9Decoder *pbi,
init_read_bit_buffer(pbi, &rb, data, data_end, clear_data));
const int tile_rows = 1 << cm->log2_tile_rows;
const int tile_cols = 1 << cm->log2_tile_cols;
#if CONFIG_INTERNAL_STATS
const int64_t data_size = data_end - data;
#endif
YV12_BUFFER_CONFIG *const new_fb = get_frame_new_buffer(cm);
xd->cur_buf = new_fb;
@@ -2036,23 +2006,6 @@ void vp9_decode_frame(VP9Decoder *pbi,
"Uninitialized entropy context.");
vp9_zero(cm->counts);
#if CONFIG_INTERNAL_STATS
// Reset internal stats
if (cm->current_video_frame == 0) {
int i;
for (i = 0; i < BR_MOVING_AVERAGE_SIZE; ++i)
pbi->br_data.bit_rate[i] = 0;
pbi->br_data.index = 0;
pbi->peak_average_br = 0;
pbi->total_block_in_8x8 = 0;
pbi->subpel_mc_block_in_4x4_h = 0;
pbi->subpel_mc_block_in_4x4_v = 0;
pbi->sub8x8_inter = 0;
pbi->sub8x8_intra = 0;
pbi->intra_block_in_8x8 = 0;
pbi->compound_inter_block_in_8x8 = 0;
}
#endif
xd->corrupted = 0;
new_fb->corrupted = read_compressed_header(pbi, data, first_partition_size);
@@ -2069,7 +2022,6 @@ void vp9_decode_frame(VP9Decoder *pbi,
if (pbi->frame_parallel_decode && cm->frame_parallel_decoding_mode) {
VP9Worker *const worker = pbi->frame_worker_owner;
FrameWorkerData *const frame_worker_data = worker->data1;
if (cm->refresh_frame_context) {
context_updated = 1;
cm->frame_contexts[cm->frame_context_idx] = *cm->fc;
@@ -2122,43 +2074,4 @@ void vp9_decode_frame(VP9Decoder *pbi,
// Non frame parallel update frame context here.
if (cm->refresh_frame_context && !context_updated)
cm->frame_contexts[cm->frame_context_idx] = *cm->fc;
#if CONFIG_INTERNAL_STATS
vp9_clear_system_state();
{
FILE *pf = fopen("frame_level_stats.stt", "a");
int i;
double subpel_mc_h = (double)pbi->subpel_mc_block_in_4x4_h /
(double)pbi->total_block_in_8x8;
double subpel_mc_v = (double)pbi->subpel_mc_block_in_4x4_v /
(double)pbi->total_block_in_8x8;
double intra_mode = (double)pbi->intra_block_in_8x8 /
(double)pbi->total_block_in_8x8;
double compound_block = (double)pbi->compound_inter_block_in_8x8 /
(double)pbi->total_block_in_8x8;
double sub8x8_inter = (double)pbi->sub8x8_inter /
(double)pbi->total_block_in_8x8;
double sub8x8_intra = (double)pbi->sub8x8_intra /
(double)pbi->total_block_in_8x8;
double average_bit_rate = 0;
pbi->br_data.bit_rate[pbi->br_data.index] = data_size;
++pbi->br_data.index;
if (pbi->br_data.index >= BR_MOVING_AVERAGE_SIZE)
pbi->br_data.index = 0;
for (i = 0; i < BR_MOVING_AVERAGE_SIZE; ++i) {
average_bit_rate += (double)pbi->br_data.bit_rate[i];
}
average_bit_rate /= BR_MOVING_AVERAGE_SIZE;
if ((int64_t)average_bit_rate > pbi->peak_average_br)
pbi->peak_average_br = (int64_t)average_bit_rate;
fprintf(pf, "frame index %d, sub-pel mc (%7.3f, %7.3f)\tintra mode%7.3f\tcompound inter block%7.3f\t",
cm->current_video_frame, 25 * subpel_mc_h, 25 * subpel_mc_v, 100 * intra_mode,
100 * compound_block);
fprintf(pf, "sub8x8 inter %7.3f intra %7.3f average-br %7.3f peak-average-br %7.3f\n",
100 * sub8x8_inter, 100 * sub8x8_intra, average_bit_rate, (double)pbi->peak_average_br / 1000);
fclose(pf);
}
#endif
}

View File

@@ -464,7 +464,6 @@ static void fpm_sync(void *const data, int mi_row) {
static void read_inter_block_mode_info(VP9Decoder *const pbi,
MACROBLOCKD *const xd,
const TileInfo *const tile,
MODE_INFO *const mi,
int mi_row, int mi_col, vp9_reader *r) {
VP9_COMMON *const cm = &pbi->common;
@@ -479,20 +478,17 @@ static void read_inter_block_mode_info(VP9Decoder *const pbi,
read_ref_frames(cm, xd, r, mbmi->segment_id, mbmi->ref_frame);
is_compound = has_second_ref(mbmi);
#if CONFIG_INTERNAL_STATS
pbi->compound_inter_block_in_8x8 += is_compound;
#endif
for (ref = 0; ref < 1 + is_compound; ++ref) {
const MV_REFERENCE_FRAME frame = mbmi->ref_frame[ref];
RefBuffer *ref_buf = &cm->frame_refs[frame - LAST_FRAME];
xd->block_refs[ref] = ref_buf;
if ((!vp9_is_valid_scale(&ref_buf->sf)))
vpx_internal_error(xd->error_info, VPX_CODEC_UNSUP_BITSTREAM,
"Reference frame has invalid dimensions");
vp9_setup_pre_planes(xd, ref, ref_buf->buf, mi_row, mi_col,
&ref_buf->sf);
vp9_find_mv_refs(cm, xd, tile, mi, frame, ref_mvs[frame],
vp9_find_mv_refs(cm, xd, mi, frame, ref_mvs[frame],
mi_row, mi_col, fpm_sync, (void *)pbi, inter_mode_ctx);
}
@@ -535,7 +531,7 @@ static void read_inter_block_mode_info(VP9Decoder *const pbi,
if (b_mode == NEARESTMV || b_mode == NEARMV) {
uint8_t dummy_mode_ctx[MAX_REF_FRAMES];
for (ref = 0; ref < 1 + is_compound; ++ref)
vp9_append_sub8x8_mvs_for_idx(cm, xd, tile, j, ref, mi_row, mi_col,
vp9_append_sub8x8_mvs_for_idx(cm, xd, j, ref, mi_row, mi_col,
&nearest_sub8x8[ref],
&near_sub8x8[ref],
dummy_mode_ctx);
@@ -551,22 +547,7 @@ static void read_inter_block_mode_info(VP9Decoder *const pbi,
mi->bmi[j].as_mv[0].as_int = block[0].as_int;
if (is_compound)
mi->bmi[j].as_mv[1].as_int = block[1].as_int;
#if CONFIG_INTERNAL_STATS
if (mi->bmi[j].as_mv[0].as_mv.row & 0x07)
pbi->subpel_mc_block_in_4x4_v +=
(1 << (num_pels_log2_lookup[bsize] - 4));
if (mi->bmi[j].as_mv[0].as_mv.col & 0x07)
pbi->subpel_mc_block_in_4x4_h +=
(1 << (num_pels_log2_lookup[bsize] - 4));
if (is_compound) {
if (mi->bmi[j].as_mv[1].as_mv.row & 0x07)
pbi->subpel_mc_block_in_4x4_v +=
(1 << (num_pels_log2_lookup[bsize] - 4));
if (mi->bmi[j].as_mv[1].as_mv.col & 0x07)
pbi->subpel_mc_block_in_4x4_h +=
(1 << (num_pels_log2_lookup[bsize] - 4));
}
#endif
if (num_4x4_h == 2)
mi->bmi[j + 2] = mi->bmi[j];
if (num_4x4_w == 2)
@@ -581,24 +562,11 @@ static void read_inter_block_mode_info(VP9Decoder *const pbi,
} else {
xd->corrupted |= !assign_mv(cm, xd, mbmi->mode, mbmi->mv, nearestmv,
nearestmv, nearmv, is_compound, allow_hp, r);
#if CONFIG_INTERNAL_STATS
if (mbmi->mv[0].as_mv.row & 0x07)
pbi->subpel_mc_block_in_4x4_v += (1 << (num_pels_log2_lookup[bsize] - 4));
if (mbmi->mv[0].as_mv.col & 0x07)
pbi->subpel_mc_block_in_4x4_h += (1 << (num_pels_log2_lookup[bsize] - 4));
if (is_compound) {
if (mbmi->mv[1].as_mv.row & 0x07)
pbi->subpel_mc_block_in_4x4_v += (1 << (num_pels_log2_lookup[bsize] - 4));
if (mbmi->mv[1].as_mv.col & 0x07)
pbi->subpel_mc_block_in_4x4_h += (1 << (num_pels_log2_lookup[bsize] - 4));
}
#endif
}
}
static void read_inter_frame_mode_info(VP9Decoder *const pbi,
MACROBLOCKD *const xd,
const TileInfo *const tile,
int mi_row, int mi_col, vp9_reader *r) {
VP9_COMMON *const cm = &pbi->common;
MODE_INFO *const mi = xd->mi[0];
@@ -613,13 +581,12 @@ static void read_inter_frame_mode_info(VP9Decoder *const pbi,
mbmi->tx_size = read_tx_size(cm, xd, !mbmi->skip || !inter_block, r);
if (inter_block)
read_inter_block_mode_info(pbi, xd, tile, mi, mi_row, mi_col, r);
read_inter_block_mode_info(pbi, xd, mi, mi_row, mi_col, r);
else
read_intra_block_mode_info(cm, xd, mi, r);
}
void vp9_read_mode_info(VP9Decoder *const pbi, MACROBLOCKD *xd,
const TileInfo *const tile,
int mi_row, int mi_col, vp9_reader *r) {
VP9_COMMON *const cm = &pbi->common;
MODE_INFO *const mi = xd->mi[0];
@@ -633,7 +600,7 @@ void vp9_read_mode_info(VP9Decoder *const pbi, MACROBLOCKD *xd,
if (frame_is_intra_only(cm)) {
read_intra_frame_mode_info(cm, xd, mi_row, mi_col, r);
} else {
read_inter_frame_mode_info(pbi, xd, tile, mi_row, mi_col, r);
read_inter_frame_mode_info(pbi, xd, mi_row, mi_col, r);
for (h = 0; h < y_mis; ++h) {
MV_REF *const frame_mv = frame_mvs + h * cm->mi_cols;

View File

@@ -18,10 +18,7 @@
extern "C" {
#endif
struct TileInfo;
void vp9_read_mode_info(VP9Decoder *const pbi, MACROBLOCKD *xd,
const struct TileInfo *const tile,
int mi_row, int mi_col, vp9_reader *r);
#ifdef __cplusplus

View File

@@ -26,14 +26,6 @@
extern "C" {
#endif
#if CONFIG_INTERNAL_STATS
#define BR_MOVING_AVERAGE_SIZE 4
typedef struct BR_DATA {
int64_t bit_rate[BR_MOVING_AVERAGE_SIZE];
int index;
} BR_DATA;
#endif
// TODO(hkuang): combine this with TileWorkerData.
typedef struct TileData {
VP9_COMMON *cm;
@@ -83,31 +75,6 @@ typedef struct VP9Decoder {
int inv_tile_order;
int need_resync; // wait for key/intra-only frame.
int hold_ref_buf; // hold the reference buffer.
#if CONFIG_INTERNAL_STATS
// total blocks in unit of 8x8 inside the frame.
int64_t total_block_in_8x8;
// sub8x8 blocks in unit of 8x8.
int64_t sub8x8_inter;
int64_t sub8x8_intra;
// number of blocks using 1-D sub-pixel filtering for motion compensated
// prediction. if a block is using sub-pixel filter in both vertical and
// horizontal directions, it counts as using 1-D sub-pixel filter twice.
int64_t subpel_mc_block_in_4x4_h;
int64_t subpel_mc_block_in_4x4_v;
// nubmer of blocks using intra prediction mode.
int64_t intra_block_in_8x8;
// number of blocks using compound prediction mode.
int64_t compound_inter_block_in_8x8;
// peak N-frame-average bit rate
int64_t peak_average_br;
BR_DATA br_data;
#endif
} VP9Decoder;
int vp9_receive_compressed_data(struct VP9Decoder *pbi,

View File

@@ -897,21 +897,6 @@ static void write_tile_info(const VP9_COMMON *const cm,
}
static int get_refresh_mask(VP9_COMP *cpi) {
int lst_fb_idx = cpi->lst_fb_idx;
#if CONFIG_FULL_BUFFER_TEST
if (cpi->common.frame_type == KEY_FRAME) {
lst_fb_idx = 0;
} else {
if (cpi->lst_fb_idx == 0)
lst_fb_idx = 3;
else if (cpi->lst_fb_idx == 7)
lst_fb_idx = 0;
else
lst_fb_idx = cpi->lst_fb_idx + 1;
}
#endif
if (vp9_preserve_existing_gf(cpi)) {
// We have decided to preserve the previously existing golden frame as our
// new ARF frame. However, in the short term we leave it in the GF slot and,
@@ -923,7 +908,7 @@ static int get_refresh_mask(VP9_COMP *cpi) {
// Note: This is highly specific to the use of ARF as a forward reference,
// and this needs to be generalized as other uses are implemented
// (like RTC/temporal scalability).
return (cpi->refresh_last_frame << lst_fb_idx) |
return (cpi->refresh_last_frame << cpi->lst_fb_idx) |
(cpi->refresh_golden_frame << cpi->alt_fb_idx);
} else {
int arf_idx = cpi->alt_fb_idx;
@@ -931,7 +916,7 @@ static int get_refresh_mask(VP9_COMP *cpi) {
const GF_GROUP *const gf_group = &cpi->twopass.gf_group;
arf_idx = gf_group->arf_update_idx[gf_group->index];
}
return (cpi->refresh_last_frame << lst_fb_idx) |
return (cpi->refresh_last_frame << cpi->lst_fb_idx) |
(cpi->refresh_golden_frame << cpi->gld_fb_idx) |
(cpi->refresh_alt_ref_frame << arf_idx);
}

View File

@@ -230,6 +230,9 @@ static void set_offsets(VP9_COMP *cpi, const TileInfo *const tile,
mbmi->segment_id = 0;
x->encode_breakout = cpi->encode_breakout;
}
// required by vp9_append_sub8x8_mvs_for_idx() and vp9_find_best_ref_mvs()
xd->tile = *tile;
}
static void duplicate_mode_info_in_sb(VP9_COMMON *cm, MACROBLOCKD *xd,
@@ -2929,7 +2932,7 @@ static void nonrd_pick_sb_modes(VP9_COMP *cpi,
vp9_pick_inter_mode(cpi, x, tile_data, mi_row, mi_col,
rd_cost, bsize, ctx);
else
vp9_pick_inter_mode_sub8x8(cpi, x, tile_data, mi_row, mi_col,
vp9_pick_inter_mode_sub8x8(cpi, x, mi_row, mi_col,
rd_cost, bsize, ctx);
duplicate_mode_info_in_sb(cm, xd, mi_row, mi_col, bsize);

View File

@@ -1447,7 +1447,7 @@ void vp9_change_config(struct VP9_COMP *cpi, const VP9EncoderConfig *oxcf) {
cpi->td.mb.e_mbd.bd = (int)cm->bit_depth;
#endif // CONFIG_VP9_HIGHBITDEPTH
rc->baseline_gf_interval = (MIN_GF_INTERVAL + MAX_GF_INTERVAL) / 2;
rc->baseline_gf_interval = DEFAULT_GF_INTERVAL;
cpi->refresh_golden_frame = 0;
cpi->refresh_last_frame = 1;
@@ -2697,61 +2697,13 @@ void vp9_update_reference_frames(VP9_COMP *cpi) {
}
if (cpi->refresh_last_frame) {
#if CONFIG_FULL_BUFFER_TEST
int ref_index;
if (cm->frame_type == KEY_FRAME) {
cpi->lst_fb_idx = 0;
ref_index = cm->ref_frame_map[cpi->lst_fb_idx];
if (ref_index >= 0 && pool->frame_bufs[ref_index].ref_count > 0)
pool->frame_bufs[ref_index].ref_count--;
cm->ref_frame_map[cpi->lst_fb_idx] = cm->new_fb_idx;
pool->frame_bufs[cm->new_fb_idx].ref_count++;
} else {
if (cpi->lst_fb_idx == 0)
cpi->lst_fb_idx = 3;
else if (cpi->lst_fb_idx == 7)
cpi->lst_fb_idx = 0;
else
++cpi->lst_fb_idx;
ref_index = cm->ref_frame_map[cpi->lst_fb_idx];
if (ref_index >= 0 && pool->frame_bufs[ref_index].ref_count > 0)
pool->frame_bufs[ref_index].ref_count--;
ref_index = cm->ref_frame_map[cpi->lst_fb_idx];
cm->ref_frame_map[cpi->lst_fb_idx] = cm->new_fb_idx;
pool->frame_bufs[cm->new_fb_idx].ref_count++;
}
#else
ref_cnt_fb(pool->frame_bufs,
&cm->ref_frame_map[cpi->lst_fb_idx], cm->new_fb_idx);
#endif
if (!cpi->rc.is_src_frame_alt_ref)
memcpy(cpi->interp_filter_selected[LAST_FRAME],
cpi->interp_filter_selected[0],
sizeof(cpi->interp_filter_selected[0]));
}
#if CONFIG_FULL_BUFFER_TEST
// {
// int k;
// fprintf(stderr, "\nEecode frame index %d, is_show_frame %d, new_fb_idx %d\n",
// cm->current_video_frame, cm->show_frame, cm->new_fb_idx);
// for (k = 0; k < 8; ++k)
// fprintf(stderr, "%d ", cm->ref_frame_map[k]);
// fprintf(stderr, "\n");
// if (cm->frame_type == KEY_FRAME)
// fprintf(stderr, "key frame\n\n");
//
// for (k = 0; k < 16; ++k)
// fprintf(stderr, "%d ", pool->frame_bufs[cm->new_fb_idx].buf.y_buffer[k]);
// }
#endif
#if CONFIG_VP9_TEMPORAL_DENOISING
if (cpi->oxcf.noise_sensitivity > 0) {
vp9_denoiser_update_frame_info(&cpi->denoiser,
@@ -2834,6 +2786,7 @@ void vp9_scale_references(VP9_COMP *cpi) {
if (cm->new_fb_idx == INVALID_IDX)
return;
new_fb_ptr = &pool->frame_bufs[new_fb];
cm->cur_frame = &pool->frame_bufs[new_fb];
vp9_realloc_frame_buffer(&pool->frame_bufs[new_fb].buf,
cm->width, cm->height,
cm->subsampling_x, cm->subsampling_y,
@@ -3070,17 +3023,6 @@ static void set_frame_size(VP9_COMP *cpi) {
VP9EncoderConfig *const oxcf = &cpi->oxcf;
MACROBLOCKD *const xd = &cpi->td.mb.e_mbd;
#if CONFIG_INTERNAL_RESIZE
if (oxcf->pass == 2 && oxcf->resize_mode == RESIZE_DYNAMIC) {
if ((cm->current_video_frame % 15) == 3) {
cpi->resize_pending = 1;
cpi->rc.frame_size_selector = (cm->current_video_frame / 15) & 0x01;
} else {
cpi->resize_pending = 0;
}
}
#endif
if (oxcf->pass == 2 &&
oxcf->rc_mode == VPX_VBR &&
((oxcf->resize_mode == RESIZE_FIXED && cm->current_video_frame == 0) ||
@@ -3093,11 +3035,6 @@ static void set_frame_size(VP9_COMP *cpi) {
oxcf->scaled_frame_height);
}
#if CONFIG_INTERNAL_RESIZE
fprintf(stderr, "%d %d\n", oxcf->scaled_frame_width,
oxcf->scaled_frame_height);
#endif
if (oxcf->pass == 0 &&
oxcf->rc_mode == VPX_CBR &&
!cpi->use_svc &&
@@ -4260,26 +4197,6 @@ int vp9_get_compressed_data(VP9_COMP *cpi, unsigned int *frame_flags,
set_frame_size(cpi);
}
#if CONFIG_FULL_BUFFER_TEST
if (cm->current_video_frame > 12 && oxcf->pass == 2) {
int mod_idx = cm->current_video_frame & 0x3F;
if (mod_idx > 12 && mod_idx < 20) {
cpi->refresh_last_frame = 0;
if (cpi->common.frame_type == KEY_FRAME) {
cpi->lst_fb_idx = 0;
} else {
if (cpi->lst_fb_idx == 0)
cpi->lst_fb_idx = 3;
else if (cpi->lst_fb_idx == 7)
cpi->lst_fb_idx = 0;
else
++cpi->lst_fb_idx;
}
}
}
#endif
for (i = 0; i < MAX_REF_FRAMES; ++i)
cpi->scaled_ref_idx[i] = INVALID_IDX;

View File

@@ -50,6 +50,8 @@
extern "C" {
#endif
#define DEFAULT_GF_INTERVAL 10
typedef struct {
int nmvjointcost[MV_JOINTS];
int nmvcosts[2][MV_VALS];
@@ -217,9 +219,6 @@ typedef struct VP9EncoderConfig {
int arnr_max_frames;
int arnr_strength;
int min_gf_interval;
int max_gf_interval;
int tile_columns;
int tile_rows;

View File

@@ -1849,8 +1849,7 @@ static void define_gf_group(VP9_COMP *cpi, FIRSTPASS_STATS *this_frame) {
int64_t gf_group_bits;
double gf_group_error_left;
int gf_arf_bits;
const int is_key_frame = frame_is_intra_only(cm);
const int kf_or_arf_active = is_key_frame || rc->source_alt_ref_active;
int is_key_frame = frame_is_intra_only(cm);
// Reset the GF group data structures unless this is a key
// frame in which case it will already have been done.
@@ -1903,10 +1902,7 @@ static void define_gf_group(VP9_COMP *cpi, FIRSTPASS_STATS *this_frame) {
// bits to spare and are better with a smaller interval and smaller boost.
// At high Q when there are few bits to spare we are better with a longer
// interval to spread the cost of the GF.
active_max_gf_interval = rc->max_gf_interval - 4 + MIN(4, (int_lbq / 6));
if (active_max_gf_interval < active_min_gf_interval)
active_max_gf_interval = active_min_gf_interval;
active_max_gf_interval = 12 + MIN(4, (int_lbq / 6));
if (active_max_gf_interval > rc->max_gf_interval)
active_max_gf_interval = rc->max_gf_interval;
if (active_max_gf_interval < active_min_gf_interval)
@@ -1968,11 +1964,10 @@ static void define_gf_group(VP9_COMP *cpi, FIRSTPASS_STATS *this_frame) {
// Break out conditions.
if (
// Break at active_max_gf_interval unless almost totally static.
((i >= active_max_gf_interval + kf_or_arf_active) &&
(zero_motion_accumulator < 0.995)) ||
(i >= active_max_gf_interval && (zero_motion_accumulator < 0.995)) ||
(
// Don't break out with a very short interval.
(i >= active_min_gf_interval + kf_or_arf_active) &&
(i > active_min_gf_interval) &&
(!flash_detected) &&
((mv_ratio_accumulator > mv_ratio_accumulator_thresh) ||
(abs_mv_in_out_accumulator > 3.0) ||

View File

@@ -1179,7 +1179,7 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
sf, sf);
if (cm->use_prev_frame_mvs)
vp9_find_mv_refs(cm, xd, tile_info, xd->mi[0], ref_frame,
vp9_find_mv_refs(cm, xd, xd->mi[0], ref_frame,
candidates, mi_row, mi_col, NULL, NULL,
xd->mi[0]->mbmi.mode_context);
else
@@ -1623,11 +1623,9 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
}
void vp9_pick_inter_mode_sub8x8(VP9_COMP *cpi, MACROBLOCK *x,
TileDataEnc *tile_data,
int mi_row, int mi_col, RD_COST *rd_cost,
BLOCK_SIZE bsize, PICK_MODE_CONTEXT *ctx) {
VP9_COMMON *const cm = &cpi->common;
TileInfo *const tile_info = &tile_data->tile_info;
SPEED_FEATURES *const sf = &cpi->sf;
MACROBLOCKD *const xd = &x->e_mbd;
MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi;
@@ -1659,7 +1657,7 @@ void vp9_pick_inter_mode_sub8x8(VP9_COMP *cpi, MACROBLOCK *x,
&cm->frame_refs[ref_frame - 1].sf;
vp9_setup_pred_block(xd, yv12_mb[ref_frame], yv12, mi_row, mi_col,
sf, sf);
vp9_find_mv_refs(cm, xd, tile_info, xd->mi[0], ref_frame,
vp9_find_mv_refs(cm, xd, xd->mi[0], ref_frame,
candidates, mi_row, mi_col, NULL, NULL,
xd->mi[0]->mbmi.mode_context);
@@ -1733,7 +1731,7 @@ void vp9_pick_inter_mode_sub8x8(VP9_COMP *cpi, MACROBLOCK *x,
b_mv[ZEROMV].as_int = 0;
b_mv[NEWMV].as_int = INVALID_MV;
vp9_append_sub8x8_mvs_for_idx(cm, xd, tile_info, i, 0, mi_row, mi_col,
vp9_append_sub8x8_mvs_for_idx(cm, xd, i, 0, mi_row, mi_col,
&b_mv[NEARESTMV],
&b_mv[NEARMV],
xd->mi[0]->mbmi.mode_context);

View File

@@ -27,7 +27,6 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
PICK_MODE_CONTEXT *ctx);
void vp9_pick_inter_mode_sub8x8(VP9_COMP *cpi, MACROBLOCK *x,
TileDataEnc *tile_data,
int mi_row, int mi_col, RD_COST *rd_cost,
BLOCK_SIZE bsize,
PICK_MODE_CONTEXT *ctx);

View File

@@ -276,27 +276,6 @@ static void update_buffer_level(VP9_COMP *cpi, int encoded_frame_size) {
}
}
int vp9_rc_get_default_min_gf_interval(
int width, int height, double framerate) {
// Assume we do not need any constraint lower than 4K 20 fps
static const double factor_safe = 3840 * 2160 * 20.0;
const double factor = width * height * framerate;
if (factor <= factor_safe)
return MIN_GF_INTERVAL;
else
return (int)(MIN_GF_INTERVAL * factor / factor_safe + 0.5);
// Note this logic makes:
// 4K24: 5
// 4K30: 6
// 4K60: 12
}
int vp9_rc_get_default_max_gf_interval(double framerate, int min_gf_interval) {
int interval = MIN(MAX_GF_INTERVAL, (int)(framerate * 0.75));
return MAX(interval, min_gf_interval);
}
void vp9_rc_init(const VP9EncoderConfig *oxcf, int pass, RATE_CONTROL *rc) {
int i;
@@ -305,9 +284,9 @@ void vp9_rc_init(const VP9EncoderConfig *oxcf, int pass, RATE_CONTROL *rc) {
rc->avg_frame_qindex[INTER_FRAME] = oxcf->worst_allowed_q;
} else {
rc->avg_frame_qindex[KEY_FRAME] = (oxcf->worst_allowed_q +
oxcf->best_allowed_q) / 2;
oxcf->best_allowed_q) / 2;
rc->avg_frame_qindex[INTER_FRAME] = (oxcf->worst_allowed_q +
oxcf->best_allowed_q) / 2;
oxcf->best_allowed_q) / 2;
}
rc->last_q[KEY_FRAME] = oxcf->best_allowed_q;
@@ -325,6 +304,7 @@ void vp9_rc_init(const VP9EncoderConfig *oxcf, int pass, RATE_CONTROL *rc) {
rc->total_target_bits = 0;
rc->total_target_vs_actual = 0;
rc->baseline_gf_interval = DEFAULT_GF_INTERVAL;
rc->frames_since_key = 8; // Sensible default for first frame.
rc->this_key_frame_forced = 0;
rc->next_key_frame_forced = 0;
@@ -342,16 +322,6 @@ void vp9_rc_init(const VP9EncoderConfig *oxcf, int pass, RATE_CONTROL *rc) {
for (i = 0; i < RATE_FACTOR_LEVELS; ++i) {
rc->rate_correction_factors[i] = 1.0;
}
rc->min_gf_interval = oxcf->min_gf_interval;
rc->max_gf_interval = oxcf->max_gf_interval;
if (rc->min_gf_interval == 0)
rc->min_gf_interval = vp9_rc_get_default_min_gf_interval(
oxcf->width, oxcf->height, oxcf->init_framerate);
if (rc->max_gf_interval == 0)
rc->max_gf_interval = vp9_rc_get_default_max_gf_interval(
oxcf->init_framerate, rc->min_gf_interval);
rc->baseline_gf_interval = (rc->min_gf_interval + rc->max_gf_interval) / 2;
}
int vp9_rc_drop_frame(VP9_COMP *cpi) {
@@ -1412,7 +1382,7 @@ void vp9_rc_get_one_pass_vbr_params(VP9_COMP *cpi) {
cm->frame_type = INTER_FRAME;
}
if (rc->frames_till_gf_update_due == 0) {
rc->baseline_gf_interval = (rc->min_gf_interval + rc->max_gf_interval) / 2;
rc->baseline_gf_interval = DEFAULT_GF_INTERVAL;
rc->frames_till_gf_update_due = rc->baseline_gf_interval;
// NOTE: frames_till_gf_update_due must be <= frames_to_key.
if (rc->frames_till_gf_update_due > rc->frames_to_key) {
@@ -1606,8 +1576,7 @@ void vp9_rc_get_one_pass_cbr_params(VP9_COMP *cpi) {
if (cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ)
vp9_cyclic_refresh_set_golden_update(cpi);
else
rc->baseline_gf_interval =
(rc->min_gf_interval + rc->max_gf_interval) / 2;
rc->baseline_gf_interval = DEFAULT_GF_INTERVAL;
rc->frames_till_gf_update_due = rc->baseline_gf_interval;
// NOTE: frames_till_gf_update_due must be <= frames_to_key.
if (rc->frames_till_gf_update_due > rc->frames_to_key)
@@ -1680,19 +1649,20 @@ int vp9_compute_qdelta_by_rate(const RATE_CONTROL *rc, FRAME_TYPE frame_type,
return target_index - qindex;
}
#define MIN_GF_INTERVAL 4
#define MAX_GF_INTERVAL 16
void vp9_rc_set_gf_interval_range(const VP9_COMP *const cpi,
RATE_CONTROL *const rc) {
const VP9EncoderConfig *const oxcf = &cpi->oxcf;
// Set Maximum gf/arf interval
rc->max_gf_interval = oxcf->max_gf_interval;
rc->min_gf_interval = oxcf->min_gf_interval;
if (rc->min_gf_interval == 0)
rc->min_gf_interval = vp9_rc_get_default_min_gf_interval(
oxcf->width, oxcf->height, cpi->framerate);
if (rc->max_gf_interval == 0)
rc->max_gf_interval = vp9_rc_get_default_max_gf_interval(
cpi->framerate, rc->min_gf_interval);
// Set a minimum interval.
rc->min_gf_interval =
MIN(MAX_GF_INTERVAL, MAX(MIN_GF_INTERVAL, (int)(cpi->framerate * 0.125)));
// Set Maximum gf/arf interval.
rc->max_gf_interval =
MIN(MAX_GF_INTERVAL, (int)(cpi->framerate * 0.75));
// Round up to next even number if odd.
rc->max_gf_interval += (rc->max_gf_interval & 0x01);
// Extended interval for genuinely static scenes

View File

@@ -24,9 +24,6 @@ extern "C" {
// Bits Per MB at different Q (Multiplied by 512)
#define BPER_MB_NORMBITS 9
#define MIN_GF_INTERVAL 4
#define MAX_GF_INTERVAL 16
typedef enum {
INTER_NORMAL = 0,
INTER_HIGH = 1,
@@ -158,12 +155,6 @@ double vp9_convert_qindex_to_q(int qindex, vpx_bit_depth_t bit_depth);
void vp9_rc_init_minq_luts(void);
int vp9_rc_get_default_min_gf_interval(int width, int height, double framerate);
// Note vp9_rc_get_default_max_gf_interval() requires the min_gf_interval to
// be passed in to ensure that the max_gf_interval returned is at least as bis
// as that.
int vp9_rc_get_default_max_gf_interval(double framerate, int min_frame_rate);
// Generally at the high level, the following flow is expected
// to be enforced for rate control:
// First call per frame, one of:

View File

@@ -1359,25 +1359,11 @@ static int64_t encode_inter_mb_segment(VP9_COMP *cpi,
const InterpKernel *kernel = vp9_get_interp_kernel(mi->mbmi.interp_filter);
for (ref = 0; ref < 1 + is_compound; ++ref) {
const int bw = b_width_log2_lookup[BLOCK_8X8];
const int h = 4 * (i >> bw);
const int w = 4 * (i & ((1 << bw) - 1));
const struct scale_factors *sf = &xd->block_refs[ref]->sf;
int y_stride = pd->pre[ref].stride;
uint8_t *pre = pd->pre[ref].buf + (h * pd->pre[ref].stride + w);
if (vp9_is_scaled(sf)) {
const int x_start = (-xd->mb_to_left_edge >> (3 + pd->subsampling_x));
const int y_start = (-xd->mb_to_top_edge >> (3 + pd->subsampling_y));
y_stride = xd->block_refs[ref]->buf->y_stride;
pre = xd->block_refs[ref]->buf->y_buffer;
pre += scaled_buffer_offset(x_start + w, y_start + h,
y_stride, sf);
}
const uint8_t *pre = &pd->pre[ref].buf[vp9_raster_block_offset(BLOCK_8X8, i,
pd->pre[ref].stride)];
#if CONFIG_VP9_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
vp9_highbd_build_inter_predictor(pre, y_stride,
vp9_highbd_build_inter_predictor(pre, pd->pre[ref].stride,
dst, pd->dst.stride,
&mi->bmi[i].as_mv[ref].as_mv,
&xd->block_refs[ref]->sf, width, height,
@@ -1385,7 +1371,7 @@ static int64_t encode_inter_mb_segment(VP9_COMP *cpi,
mi_col * MI_SIZE + 4 * (i % 2),
mi_row * MI_SIZE + 4 * (i / 2), xd->bd);
} else {
vp9_build_inter_predictor(pre, y_stride,
vp9_build_inter_predictor(pre, pd->pre[ref].stride,
dst, pd->dst.stride,
&mi->bmi[i].as_mv[ref].as_mv,
&xd->block_refs[ref]->sf, width, height, ref,
@@ -1394,7 +1380,7 @@ static int64_t encode_inter_mb_segment(VP9_COMP *cpi,
mi_row * MI_SIZE + 4 * (i / 2));
}
#else
vp9_build_inter_predictor(pre, y_stride,
vp9_build_inter_predictor(pre, pd->pre[ref].stride,
dst, pd->dst.stride,
&mi->bmi[i].as_mv[ref].as_mv,
&xd->block_refs[ref]->sf, width, height, ref,
@@ -1746,7 +1732,6 @@ static void joint_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
}
static int64_t rd_pick_best_sub8x8_mode(VP9_COMP *cpi, MACROBLOCK *x,
const TileInfo * const tile,
int_mv *best_ref_mv,
int_mv *second_best_ref_mv,
int64_t best_rd, int *returntotrate,
@@ -1816,7 +1801,7 @@ static int64_t rd_pick_best_sub8x8_mode(VP9_COMP *cpi, MACROBLOCK *x,
for (ref = 0; ref < 1 + has_second_rf; ++ref) {
const MV_REFERENCE_FRAME frame = mbmi->ref_frame[ref];
frame_mv[ZEROMV][frame].as_int = 0;
vp9_append_sub8x8_mvs_for_idx(cm, xd, tile, i, ref, mi_row, mi_col,
vp9_append_sub8x8_mvs_for_idx(cm, xd, i, ref, mi_row, mi_col,
&frame_mv[NEARESTMV][frame],
&frame_mv[NEARMV][frame],
xd->mi[0]->mbmi.mode_context);
@@ -2213,7 +2198,6 @@ static void store_coding_context(MACROBLOCK *x, PICK_MODE_CONTEXT *ctx,
}
static void setup_buffer_inter(VP9_COMP *cpi, MACROBLOCK *x,
const TileInfo *const tile,
MV_REFERENCE_FRAME ref_frame,
BLOCK_SIZE block_size,
int mi_row, int mi_col,
@@ -2234,7 +2218,7 @@ static void setup_buffer_inter(VP9_COMP *cpi, MACROBLOCK *x,
vp9_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
vp9_find_mv_refs(cm, xd, tile, mi, ref_frame, candidates, mi_row, mi_col,
vp9_find_mv_refs(cm, xd, mi, ref_frame, candidates, mi_row, mi_col,
NULL, NULL, xd->mi[0]->mbmi.mode_context);
// Candidate refinement carried out at encoder and decoder
@@ -2996,7 +2980,7 @@ void vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi,
x->pred_mv_sad[ref_frame] = INT_MAX;
if (cpi->ref_frame_flags & flag_list[ref_frame]) {
assert(get_ref_frame_buffer(cpi, ref_frame) != NULL);
setup_buffer_inter(cpi, x, tile_info, ref_frame, bsize, mi_row, mi_col,
setup_buffer_inter(cpi, x, ref_frame, bsize, mi_row, mi_col,
frame_mv[NEARESTMV], frame_mv[NEARMV], yv12_mb);
}
frame_mv[NEWMV][ref_frame].as_int = INVALID_MV;
@@ -3728,7 +3712,6 @@ void vp9_rd_pick_inter_mode_sub8x8(VP9_COMP *cpi,
PICK_MODE_CONTEXT *ctx,
int64_t best_rd_so_far) {
VP9_COMMON *const cm = &cpi->common;
TileInfo *const tile_info = &tile_data->tile_info;
RD_OPT *const rd_opt = &cpi->rd;
SPEED_FEATURES *const sf = &cpi->sf;
MACROBLOCKD *const xd = &x->e_mbd;
@@ -3792,8 +3775,7 @@ void vp9_rd_pick_inter_mode_sub8x8(VP9_COMP *cpi,
for (ref_frame = LAST_FRAME; ref_frame <= ALTREF_FRAME; ref_frame++) {
if (cpi->ref_frame_flags & flag_list[ref_frame]) {
setup_buffer_inter(cpi, x, tile_info,
ref_frame, bsize, mi_row, mi_col,
setup_buffer_inter(cpi, x, ref_frame, bsize, mi_row, mi_col,
frame_mv[NEARESTMV], frame_mv[NEARMV],
yv12_mb);
} else {
@@ -3817,13 +3799,6 @@ void vp9_rd_pick_inter_mode_sub8x8(VP9_COMP *cpi,
int64_t total_sse = INT_MAX;
int early_term = 0;
struct buf_2d backup_yv12[2][MAX_MB_PLANE];
const YV12_BUFFER_CONFIG *scaled_ref_frame[2] = {
vp9_get_scaled_ref_frame(cpi, vp9_ref_order[ref_index].ref_frame[0]),
vp9_get_scaled_ref_frame(cpi, vp9_ref_order[ref_index].ref_frame[1])
};
int ref;
ref_frame = vp9_ref_order[ref_index].ref_frame[0];
second_ref_frame = vp9_ref_order[ref_index].ref_frame[1];
@@ -3879,6 +3854,16 @@ void vp9_rd_pick_inter_mode_sub8x8(VP9_COMP *cpi,
continue;
}
// TODO(jingning, jkoleszar): scaling reference frame not supported for
// sub8x8 blocks.
if (ref_frame > INTRA_FRAME &&
vp9_is_scaled(&cm->frame_refs[ref_frame - 1].sf))
continue;
if (second_ref_frame > INTRA_FRAME &&
vp9_is_scaled(&cm->frame_refs[second_ref_frame - 1].sf))
continue;
if (comp_pred)
mode_excluded = cm->reference_mode == SINGLE_REFERENCE;
else if (ref_frame != INTRA_FRAME)
@@ -3957,19 +3942,6 @@ void vp9_rd_pick_inter_mode_sub8x8(VP9_COMP *cpi,
int pred_exists = 0;
int uv_skippable;
for (ref = 0; ref < 2; ++ref) {
if (scaled_ref_frame[ref]) {
int i;
// Swap out the reference frame for a version that's been scaled to
// match the resolution of the current frame, allowing the existing
// motion search code to be used without additional modifications.
for (i = 0; i < MAX_MB_PLANE; i++)
backup_yv12[ref][i] = xd->plane[i].pre[ref];
vp9_setup_pre_planes(xd, ref, scaled_ref_frame[ref], mi_row, mi_col,
NULL);
}
}
this_rd_thresh = (ref_frame == LAST_FRAME) ?
rd_opt->threshes[segment_id][bsize][THR_LAST] :
rd_opt->threshes[segment_id][bsize][THR_ALTR];
@@ -3995,7 +3967,7 @@ void vp9_rd_pick_inter_mode_sub8x8(VP9_COMP *cpi,
int newbest, rs;
int64_t rs_rd;
mbmi->interp_filter = switchable_filter_index;
tmp_rd = rd_pick_best_sub8x8_mode(cpi, x, tile_info,
tmp_rd = rd_pick_best_sub8x8_mode(cpi, x,
&mbmi->ref_mvs[ref_frame][0],
second_ref, best_yrd, &rate,
&rate_y, &distortion,
@@ -4061,7 +4033,7 @@ void vp9_rd_pick_inter_mode_sub8x8(VP9_COMP *cpi,
if (!pred_exists) {
// Handles the special case when a filter that is not in the
// switchable list (bilinear, 6-tap) is indicated at the frame level
tmp_rd = rd_pick_best_sub8x8_mode(cpi, x, tile_info,
tmp_rd = rd_pick_best_sub8x8_mode(cpi, x,
&mbmi->ref_mvs[ref_frame][0],
second_ref, best_yrd, &rate, &rate_y,
&distortion, &skippable, &total_sse,
@@ -4103,17 +4075,8 @@ void vp9_rd_pick_inter_mode_sub8x8(VP9_COMP *cpi,
BLOCK_8X8);
memset(x->skip_txfm, 0, sizeof(x->skip_txfm));
if (!super_block_uvrd(cpi, x, &rate_uv, &distortion_uv, &uv_skippable,
&uv_sse, BLOCK_8X8, tmp_best_rdu)) {
for (ref = 0; ref < 2; ++ref) {
if (scaled_ref_frame[ref]) {
// Restore the prediction frame pointers to their unscaled versions.
int i;
for (i = 0; i < MAX_MB_PLANE; ++i)
xd->plane[i].pre[ref] = backup_yv12[ref][i];
}
}
&uv_sse, BLOCK_8X8, tmp_best_rdu))
continue;
}
rate2 += rate_uv;
distortion2 += distortion_uv;
@@ -4122,15 +4085,6 @@ void vp9_rd_pick_inter_mode_sub8x8(VP9_COMP *cpi,
}
}
for (ref = 0; ref < 2; ++ref) {
if (scaled_ref_frame[ref]) {
// Restore the prediction frame pointers to their unscaled versions.
int i;
for (i = 0; i < MAX_MB_PLANE; ++i)
xd->plane[i].pre[ref] = backup_yv12[ref][i];
}
}
if (cm->reference_mode == REFERENCE_MODE_SELECT)
rate2 += compmode_cost;

View File

@@ -48,9 +48,8 @@ static void set_good_speed_feature_framesize_dependent(VP9_COMP *cpi,
if (speed >= 1) {
if (MIN(cm->width, cm->height) >= 720) {
// sf->disable_split_mask = cm->show_frame ? DISABLE_ALL_SPLIT
// : DISABLE_ALL_INTER_SPLIT;
// sf->disable_split_mask = DISABLE_COMPOUND_SPLIT;
sf->disable_split_mask = cm->show_frame ? DISABLE_ALL_SPLIT
: DISABLE_ALL_INTER_SPLIT;
sf->partition_search_breakout_dist_thr = (1 << 23);
} else {
sf->disable_split_mask = DISABLE_COMPOUND_SPLIT;

View File

@@ -31,8 +31,6 @@ struct vp9_extracfg {
unsigned int tile_rows;
unsigned int arnr_max_frames;
unsigned int arnr_strength;
unsigned int min_gf_interval;
unsigned int max_gf_interval;
vp8e_tuning tuning;
unsigned int cq_level; // constrained quality level
unsigned int rc_max_intra_bitrate_pct;
@@ -57,8 +55,6 @@ static struct vp9_extracfg default_extra_cfg = {
0, // tile_rows
7, // arnr_max_frames
5, // arnr_strength
0, // min_gf_interval; 0 -> default decision
0, // max_gf_interval; 0 -> default decision
VP8_TUNE_PSNR, // tuning
10, // cq_level
0, // rc_max_intra_bitrate_pct
@@ -171,12 +167,6 @@ static vpx_codec_err_t validate_config(vpx_codec_alg_priv_t *ctx,
RANGE_CHECK_HI(cfg, rc_resize_up_thresh, 100);
RANGE_CHECK_HI(cfg, rc_resize_down_thresh, 100);
RANGE_CHECK(cfg, g_pass, VPX_RC_ONE_PASS, VPX_RC_LAST_PASS);
RANGE_CHECK(extra_cfg, min_gf_interval, 0, (MAX_LAG_BUFFERS - 1));
RANGE_CHECK(extra_cfg, max_gf_interval, 0, (MAX_LAG_BUFFERS - 1));
if (extra_cfg->min_gf_interval > 0 && extra_cfg->max_gf_interval > 0) {
RANGE_CHECK(extra_cfg, max_gf_interval, extra_cfg->min_gf_interval,
(MAX_LAG_BUFFERS - 1));
}
if (cfg->rc_resize_allowed == 1) {
RANGE_CHECK(cfg, rc_scaled_width, 0, cfg->g_w);
@@ -464,8 +454,6 @@ static vpx_codec_err_t set_encoder_config(
oxcf->color_space = extra_cfg->color_space;
oxcf->arnr_max_frames = extra_cfg->arnr_max_frames;
oxcf->arnr_strength = extra_cfg->arnr_strength;
oxcf->min_gf_interval = extra_cfg->min_gf_interval;
oxcf->max_gf_interval = extra_cfg->max_gf_interval;
oxcf->tuning = extra_cfg->tuning;
oxcf->content = extra_cfg->content;
@@ -739,20 +727,6 @@ static vpx_codec_err_t ctrl_set_aq_mode(vpx_codec_alg_priv_t *ctx,
return update_extra_cfg(ctx, &extra_cfg);
}
static vpx_codec_err_t ctrl_set_min_gf_interval(vpx_codec_alg_priv_t *ctx,
va_list args) {
struct vp9_extracfg extra_cfg = ctx->extra_cfg;
extra_cfg.min_gf_interval = CAST(VP9E_SET_MIN_GF_INTERVAL, args);
return update_extra_cfg(ctx, &extra_cfg);
}
static vpx_codec_err_t ctrl_set_max_gf_interval(vpx_codec_alg_priv_t *ctx,
va_list args) {
struct vp9_extracfg extra_cfg = ctx->extra_cfg;
extra_cfg.max_gf_interval = CAST(VP9E_SET_MAX_GF_INTERVAL, args);
return update_extra_cfg(ctx, &extra_cfg);
}
static vpx_codec_err_t ctrl_set_frame_periodic_boost(vpx_codec_alg_priv_t *ctx,
va_list args) {
struct vp9_extracfg extra_cfg = ctx->extra_cfg;
@@ -1470,8 +1444,6 @@ static vpx_codec_ctrl_fn_map_t encoder_ctrl_maps[] = {
{VP9E_SET_TUNE_CONTENT, ctrl_set_tune_content},
{VP9E_SET_COLOR_SPACE, ctrl_set_color_space},
{VP9E_SET_NOISE_SENSITIVITY, ctrl_set_noise_sensitivity},
{VP9E_SET_MIN_GF_INTERVAL, ctrl_set_min_gf_interval},
{VP9E_SET_MAX_GF_INTERVAL, ctrl_set_max_gf_interval},
// Getters
{VP8E_GET_LAST_QUANTIZER, ctrl_get_quantizer},

View File

@@ -518,22 +518,6 @@ enum vp8e_enc_control_id {
*/
VP9E_SET_TEMPORAL_LAYERING_MODE,
/*!\brief Codec control function to set minimum interval between GF/ARF frames
*
* By default the value is set as 4.
*
* Supported in codecs: VP9
*/
VP9E_SET_MIN_GF_INTERVAL,
/*!\brief Codec control function to set minimum interval between GF/ARF frames
*
* By default the value is set as 16.
*
* Supported in codecs: VP9
*/
VP9E_SET_MAX_GF_INTERVAL,
/*!\brief Codec control function to get an Active map back from the encoder.
*
* Supported in codecs: VP9
@@ -732,10 +716,6 @@ VPX_CTRL_USE_TYPE(VP9E_SET_TUNE_CONTENT, int) /* vp9e_tune_content */
VPX_CTRL_USE_TYPE(VP9E_SET_COLOR_SPACE, int)
VPX_CTRL_USE_TYPE(VP9E_SET_MIN_GF_INTERVAL, unsigned int)
VPX_CTRL_USE_TYPE(VP9E_SET_MAX_GF_INTERVAL, unsigned int)
VPX_CTRL_USE_TYPE(VP9E_GET_ACTIVEMAP, vpx_active_map_t *)
/*! @} - end defgroup vp8_encoder */
#ifdef __cplusplus

View File

@@ -396,12 +396,6 @@ static const arg_def_t gf_cbr_boost_pct = ARG_DEF(
NULL, "gf-cbr-boost", 1, "Boost for Golden Frame in CBR mode (pct)");
static const arg_def_t max_inter_rate_pct = ARG_DEF(
NULL, "max-inter-rate", 1, "Max P-frame bitrate (pct)");
static const arg_def_t min_gf_interval = ARG_DEF(
NULL, "min-gf-interval", 1,
"min gf/arf frame interval (default 0, indicating in-built behavior)");
static const arg_def_t max_gf_interval = ARG_DEF(
NULL, "max-gf-interval", 1,
"max gf/arf frame interval (default 0, indicating in-built behavior)");
static const struct arg_enum_list color_space_enum[] = {
{ "unknown", VPX_CS_UNKNOWN },
@@ -451,7 +445,6 @@ static const arg_def_t *vp9_args[] = {
&gf_cbr_boost_pct, &lossless,
&frame_parallel_decoding, &aq_mode, &frame_periodic_boost,
&noise_sens, &tune_content, &input_color_space,
&min_gf_interval, &max_gf_interval,
#if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH
&bitdeptharg, &inbitdeptharg,
#endif
@@ -467,7 +460,6 @@ static const int vp9_arg_ctrl_map[] = {
VP9E_SET_LOSSLESS, VP9E_SET_FRAME_PARALLEL_DECODING, VP9E_SET_AQ_MODE,
VP9E_SET_FRAME_PERIODIC_BOOST, VP9E_SET_NOISE_SENSITIVITY,
VP9E_SET_TUNE_CONTENT, VP9E_SET_COLOR_SPACE,
VP9E_SET_MIN_GF_INTERVAL, VP9E_SET_MAX_GF_INTERVAL,
0
};
#endif