Commit c1e511fd authored by Jerome Jiang's avatar Jerome Jiang

vp9 svc: Allow denoising next to highest resolution.

Denoise 2 spatial layes at most.

Add noise sensitivity level 2 for vp9 such that applications can control
whether to denoise the second highest spatial layer.

Add tests to cover this case.

Change-Id: Ic327d14b29adeba3f0dae547629f43b98d22997f
parent 14dbdd95
...@@ -32,13 +32,21 @@ static const char *exec_name; ...@@ -32,13 +32,21 @@ static const char *exec_name;
void usage_exit(void) { exit(EXIT_FAILURE); } void usage_exit(void) { exit(EXIT_FAILURE); }
// Denoiser states, for temporal denoising. // Denoiser states for vp8, for temporal denoising.
enum denoiserState { enum denoiserStateVp8 {
kDenoiserOff, kVp8DenoiserOff,
kDenoiserOnYOnly, kVp8DenoiserOnYOnly,
kDenoiserOnYUV, kVp8DenoiserOnYUV,
kDenoiserOnYUVAggressive, kVp8DenoiserOnYUVAggressive,
kDenoiserOnAdaptive kVp8DenoiserOnAdaptive
};
// Denoiser states for vp9, for temporal denoising.
enum denoiserStateVp9 {
kVp9DenoiserOff,
kVp9DenoiserOnYOnly,
// For SVC: denoise the top two spatial layers.
kVp9DenoiserOnYTwoSpatialLayers
}; };
static int mode_to_num_layers[13] = { 1, 2, 2, 3, 3, 3, 3, 5, 2, 3, 3, 3, 3 }; static int mode_to_num_layers[13] = { 1, 2, 2, 3, 3, 3, 3, 5, 2, 3, 3, 3, 3 };
...@@ -755,7 +763,7 @@ int main(int argc, char **argv) { ...@@ -755,7 +763,7 @@ int main(int argc, char **argv) {
if (strncmp(encoder->name, "vp8", 3) == 0) { if (strncmp(encoder->name, "vp8", 3) == 0) {
vpx_codec_control(&codec, VP8E_SET_CPUUSED, -speed); vpx_codec_control(&codec, VP8E_SET_CPUUSED, -speed);
vpx_codec_control(&codec, VP8E_SET_NOISE_SENSITIVITY, kDenoiserOff); vpx_codec_control(&codec, VP8E_SET_NOISE_SENSITIVITY, kVp8DenoiserOff);
vpx_codec_control(&codec, VP8E_SET_STATIC_THRESHOLD, 1); vpx_codec_control(&codec, VP8E_SET_STATIC_THRESHOLD, 1);
vpx_codec_control(&codec, VP8E_SET_GF_CBR_BOOST_PCT, 0); vpx_codec_control(&codec, VP8E_SET_GF_CBR_BOOST_PCT, 0);
#if VP8_ROI_MAP #if VP8_ROI_MAP
...@@ -772,7 +780,7 @@ int main(int argc, char **argv) { ...@@ -772,7 +780,7 @@ int main(int argc, char **argv) {
vpx_codec_control(&codec, VP9E_SET_GF_CBR_BOOST_PCT, 0); vpx_codec_control(&codec, VP9E_SET_GF_CBR_BOOST_PCT, 0);
vpx_codec_control(&codec, VP9E_SET_FRAME_PARALLEL_DECODING, 0); vpx_codec_control(&codec, VP9E_SET_FRAME_PARALLEL_DECODING, 0);
vpx_codec_control(&codec, VP9E_SET_FRAME_PERIODIC_BOOST, 0); vpx_codec_control(&codec, VP9E_SET_FRAME_PERIODIC_BOOST, 0);
vpx_codec_control(&codec, VP9E_SET_NOISE_SENSITIVITY, kDenoiserOff); vpx_codec_control(&codec, VP9E_SET_NOISE_SENSITIVITY, kVp9DenoiserOff);
vpx_codec_control(&codec, VP8E_SET_STATIC_THRESHOLD, 1); vpx_codec_control(&codec, VP8E_SET_STATIC_THRESHOLD, 1);
vpx_codec_control(&codec, VP9E_SET_TUNE_CONTENT, 0); vpx_codec_control(&codec, VP9E_SET_TUNE_CONTENT, 0);
vpx_codec_control(&codec, VP9E_SET_TILE_COLUMNS, (cfg.g_threads >> 1)); vpx_codec_control(&codec, VP9E_SET_TILE_COLUMNS, (cfg.g_threads >> 1));
......
...@@ -1449,24 +1449,29 @@ TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc2SL3TLDenoiserOn) { ...@@ -1449,24 +1449,29 @@ TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc2SL3TLDenoiserOn) {
::libvpx_test::Y4mVideoSource video("niklas_1280_720_30.y4m", 0, 300); ::libvpx_test::Y4mVideoSource video("niklas_1280_720_30.y4m", 0, 300);
// TODO(marpan): Check that effective_datarate for each layer hits the // TODO(marpan): Check that effective_datarate for each layer hits the
// layer target_bitrate. // layer target_bitrate.
for (int i = 600; i <= 1000; i += 200) { // For SVC, noise_sen = 1 means denoising only the top spatial layer
cfg_.rc_target_bitrate = i; // noise_sen = 2 means denoising the two top spatial layers.
ResetModel(); for (int noise_sen = 1; noise_sen <= 2; noise_sen++) {
denoiser_on_ = 1; for (int i = 600; i <= 1000; i += 200) {
assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers, cfg_.rc_target_bitrate = i;
cfg_.ts_number_layers, cfg_.temporal_layering_mode); ResetModel();
ASSERT_NO_FATAL_FAILURE(RunLoop(&video)); denoiser_on_ = noise_sen;
ASSERT_GE(cfg_.rc_target_bitrate, file_datarate_ * 0.78) assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers,
<< " The datarate for the file exceeds the target by too much!"; cfg_.ts_number_layers, cfg_.temporal_layering_mode);
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.15) ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
<< " The datarate for the file is lower than the target by too much!"; ASSERT_GE(cfg_.rc_target_bitrate, file_datarate_ * 0.78)
<< " The datarate for the file exceeds the target by too much!";
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.15)
<< " The datarate for the file is lower than the target by too much!";
#if CONFIG_VP9_DECODER #if CONFIG_VP9_DECODER
// Number of temporal layers > 1, so half of the frames in this SVC pattern // Number of temporal layers > 1, so half of the frames in this SVC
// will be non-reference frame and hence encoder will avoid loopfilter. // pattern
// Since frame dropper is off, we can expcet 150 (half of the sequence) // will be non-reference frame and hence encoder will avoid loopfilter.
// mismatched frames. // Since frame dropper is off, we can expcet 150 (half of the sequence)
EXPECT_EQ(static_cast<unsigned int>(150), GetMismatchFrames()); // mismatched frames.
EXPECT_EQ(static_cast<unsigned int>(150), GetMismatchFrames());
#endif #endif
}
} }
} }
......
This diff is collapsed.
...@@ -44,11 +44,12 @@ typedef enum vp9_denoiser_level { ...@@ -44,11 +44,12 @@ typedef enum vp9_denoiser_level {
typedef struct vp9_denoiser { typedef struct vp9_denoiser {
YV12_BUFFER_CONFIG *running_avg_y; YV12_BUFFER_CONFIG *running_avg_y;
YV12_BUFFER_CONFIG mc_running_avg_y; YV12_BUFFER_CONFIG *mc_running_avg_y;
YV12_BUFFER_CONFIG last_source; YV12_BUFFER_CONFIG last_source;
int frame_buffer_initialized; int frame_buffer_initialized;
int reset; int reset;
int num_ref_frames; int num_ref_frames;
int num_layers;
VP9_DENOISER_LEVEL denoising_level; VP9_DENOISER_LEVEL denoising_level;
VP9_DENOISER_LEVEL prev_denoising_level; VP9_DENOISER_LEVEL prev_denoising_level;
} VP9_DENOISER; } VP9_DENOISER;
...@@ -66,12 +67,13 @@ typedef struct { ...@@ -66,12 +67,13 @@ typedef struct {
} VP9_PICKMODE_CTX_DEN; } VP9_PICKMODE_CTX_DEN;
struct VP9_COMP; struct VP9_COMP;
struct SVC;
void vp9_denoiser_update_frame_info( void vp9_denoiser_update_frame_info(
VP9_DENOISER *denoiser, YV12_BUFFER_CONFIG src, FRAME_TYPE frame_type, VP9_DENOISER *denoiser, YV12_BUFFER_CONFIG src, FRAME_TYPE frame_type,
int refresh_alt_ref_frame, int refresh_golden_frame, int refresh_last_frame, int refresh_alt_ref_frame, int refresh_golden_frame, int refresh_last_frame,
int alt_fb_idx, int gld_fb_idx, int lst_fb_idx, int resized, int alt_fb_idx, int gld_fb_idx, int lst_fb_idx, int resized,
int svc_base_is_key); int svc_base_is_key, int second_spatial_layer);
void vp9_denoiser_denoise(struct VP9_COMP *cpi, MACROBLOCK *mb, int mi_row, void vp9_denoiser_denoise(struct VP9_COMP *cpi, MACROBLOCK *mb, int mi_row,
int mi_col, BLOCK_SIZE bs, PICK_MODE_CONTEXT *ctx, int mi_col, BLOCK_SIZE bs, PICK_MODE_CONTEXT *ctx,
...@@ -84,11 +86,13 @@ void vp9_denoiser_update_frame_stats(MODE_INFO *mi, unsigned int sse, ...@@ -84,11 +86,13 @@ void vp9_denoiser_update_frame_stats(MODE_INFO *mi, unsigned int sse,
PICK_MODE_CONTEXT *ctx); PICK_MODE_CONTEXT *ctx);
int vp9_denoiser_realloc_svc(VP9_COMMON *cm, VP9_DENOISER *denoiser, int vp9_denoiser_realloc_svc(VP9_COMMON *cm, VP9_DENOISER *denoiser,
int refresh_alt, int refresh_gld, int refresh_lst, int svc_buf_shift, int refresh_alt,
int alt_fb_idx, int gld_fb_idx, int lst_fb_idx); int refresh_gld, int refresh_lst, int alt_fb_idx,
int gld_fb_idx, int lst_fb_idx);
int vp9_denoiser_alloc(VP9_COMMON *cm, int use_svc, VP9_DENOISER *denoiser, int vp9_denoiser_alloc(VP9_COMMON *cm, struct SVC *svc, VP9_DENOISER *denoiser,
int width, int height, int ssx, int ssy, int use_svc, int noise_sen, int width, int height,
int ssx, int ssy,
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VP9_HIGHBITDEPTH
int use_highbitdepth, int use_highbitdepth,
#endif #endif
......
...@@ -2861,18 +2861,26 @@ void vp9_update_reference_frames(VP9_COMP *cpi) { ...@@ -2861,18 +2861,26 @@ void vp9_update_reference_frames(VP9_COMP *cpi) {
if (cpi->oxcf.noise_sensitivity > 0 && denoise_svc(cpi) && if (cpi->oxcf.noise_sensitivity > 0 && denoise_svc(cpi) &&
cpi->denoiser.denoising_level > kDenLowLow) { cpi->denoiser.denoising_level > kDenLowLow) {
int svc_base_is_key = 0; int svc_base_is_key = 0;
int denoise_svc_second_layer = 0;
if (cpi->use_svc) { if (cpi->use_svc) {
int realloc_fail = 0; int realloc_fail = 0;
const int svc_buf_shift =
cpi->svc.number_spatial_layers - cpi->svc.spatial_layer_id == 2
? cpi->denoiser.num_ref_frames
: 0;
int layer = LAYER_IDS_TO_IDX(cpi->svc.spatial_layer_id, int layer = LAYER_IDS_TO_IDX(cpi->svc.spatial_layer_id,
cpi->svc.temporal_layer_id, cpi->svc.temporal_layer_id,
cpi->svc.number_temporal_layers); cpi->svc.number_temporal_layers);
LAYER_CONTEXT *lc = &cpi->svc.layer_context[layer]; LAYER_CONTEXT *lc = &cpi->svc.layer_context[layer];
svc_base_is_key = lc->is_key_frame; svc_base_is_key = lc->is_key_frame;
denoise_svc_second_layer =
// Check if we need to allocate extra buffers in the denoiser for cpi->svc.number_spatial_layers - cpi->svc.spatial_layer_id == 2 ? 1
: 0;
// Check if we need to allocate extra buffers in the denoiser
// for
// refreshed frames. // refreshed frames.
realloc_fail = vp9_denoiser_realloc_svc( realloc_fail = vp9_denoiser_realloc_svc(
cm, &cpi->denoiser, cpi->refresh_alt_ref_frame, cm, &cpi->denoiser, svc_buf_shift, cpi->refresh_alt_ref_frame,
cpi->refresh_golden_frame, cpi->refresh_last_frame, cpi->alt_fb_idx, cpi->refresh_golden_frame, cpi->refresh_last_frame, cpi->alt_fb_idx,
cpi->gld_fb_idx, cpi->lst_fb_idx); cpi->gld_fb_idx, cpi->lst_fb_idx);
if (realloc_fail) if (realloc_fail)
...@@ -2883,7 +2891,8 @@ void vp9_update_reference_frames(VP9_COMP *cpi) { ...@@ -2883,7 +2891,8 @@ void vp9_update_reference_frames(VP9_COMP *cpi) {
&cpi->denoiser, *cpi->Source, cpi->common.frame_type, &cpi->denoiser, *cpi->Source, cpi->common.frame_type,
cpi->refresh_alt_ref_frame, cpi->refresh_golden_frame, cpi->refresh_alt_ref_frame, cpi->refresh_golden_frame,
cpi->refresh_last_frame, cpi->alt_fb_idx, cpi->gld_fb_idx, cpi->refresh_last_frame, cpi->alt_fb_idx, cpi->gld_fb_idx,
cpi->lst_fb_idx, cpi->resize_pending, svc_base_is_key); cpi->lst_fb_idx, cpi->resize_pending, svc_base_is_key,
denoise_svc_second_layer);
} }
#endif #endif
if (is_one_pass_cbr_svc(cpi)) { if (is_one_pass_cbr_svc(cpi)) {
...@@ -3318,8 +3327,9 @@ static void setup_denoiser_buffer(VP9_COMP *cpi) { ...@@ -3318,8 +3327,9 @@ static void setup_denoiser_buffer(VP9_COMP *cpi) {
VP9_COMMON *const cm = &cpi->common; VP9_COMMON *const cm = &cpi->common;
if (cpi->oxcf.noise_sensitivity > 0 && if (cpi->oxcf.noise_sensitivity > 0 &&
!cpi->denoiser.frame_buffer_initialized) { !cpi->denoiser.frame_buffer_initialized) {
if (vp9_denoiser_alloc(cm, cpi->use_svc, &cpi->denoiser, cm->width, if (vp9_denoiser_alloc(cm, &cpi->svc, &cpi->denoiser, cpi->use_svc,
cm->height, cm->subsampling_x, cm->subsampling_y, cpi->oxcf.noise_sensitivity, cm->width, cm->height,
cm->subsampling_x, cm->subsampling_y,
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VP9_HIGHBITDEPTH
cm->use_highbitdepth, cm->use_highbitdepth,
#endif #endif
......
...@@ -870,7 +870,7 @@ static INLINE int is_one_pass_cbr_svc(const struct VP9_COMP *const cpi) { ...@@ -870,7 +870,7 @@ static INLINE int is_one_pass_cbr_svc(const struct VP9_COMP *const cpi) {
static INLINE int denoise_svc(const struct VP9_COMP *const cpi) { static INLINE int denoise_svc(const struct VP9_COMP *const cpi) {
return (!cpi->use_svc || return (!cpi->use_svc ||
(cpi->use_svc && (cpi->use_svc &&
cpi->svc.spatial_layer_id == cpi->svc.number_spatial_layers - 1)); cpi->svc.spatial_layer_id >= cpi->svc.first_layer_denoise));
} }
#endif #endif
......
...@@ -21,6 +21,15 @@ ...@@ -21,6 +21,15 @@
#include "vp9/encoder/vp9_noise_estimate.h" #include "vp9/encoder/vp9_noise_estimate.h"
#include "vp9/encoder/vp9_encoder.h" #include "vp9/encoder/vp9_encoder.h"
#if CONFIG_VP9_TEMPORAL_DENOISING
// For SVC: only do noise estimation on top spatial layer.
static INLINE int noise_est_svc(const struct VP9_COMP *const cpi) {
return (!cpi->use_svc ||
(cpi->use_svc &&
cpi->svc.spatial_layer_id == cpi->svc.number_spatial_layers - 1));
}
#endif
void vp9_noise_estimate_init(NOISE_ESTIMATE *const ne, int width, int height) { void vp9_noise_estimate_init(NOISE_ESTIMATE *const ne, int width, int height) {
ne->enabled = 0; ne->enabled = 0;
ne->level = kLowLow; ne->level = kLowLow;
...@@ -45,7 +54,7 @@ static int enable_noise_estimation(VP9_COMP *const cpi) { ...@@ -45,7 +54,7 @@ static int enable_noise_estimation(VP9_COMP *const cpi) {
#endif #endif
// Enable noise estimation if denoising is on. // Enable noise estimation if denoising is on.
#if CONFIG_VP9_TEMPORAL_DENOISING #if CONFIG_VP9_TEMPORAL_DENOISING
if (cpi->oxcf.noise_sensitivity > 0 && denoise_svc(cpi) && if (cpi->oxcf.noise_sensitivity > 0 && noise_est_svc(cpi) &&
cpi->common.width >= 320 && cpi->common.height >= 180) cpi->common.width >= 320 && cpi->common.height >= 180)
return 1; return 1;
#endif #endif
...@@ -111,7 +120,7 @@ void vp9_update_noise_estimate(VP9_COMP *const cpi) { ...@@ -111,7 +120,7 @@ void vp9_update_noise_estimate(VP9_COMP *const cpi) {
// Estimate is between current source and last source. // Estimate is between current source and last source.
YV12_BUFFER_CONFIG *last_source = cpi->Last_Source; YV12_BUFFER_CONFIG *last_source = cpi->Last_Source;
#if CONFIG_VP9_TEMPORAL_DENOISING #if CONFIG_VP9_TEMPORAL_DENOISING
if (cpi->oxcf.noise_sensitivity > 0 && denoise_svc(cpi)) { if (cpi->oxcf.noise_sensitivity > 0 && noise_est_svc(cpi)) {
last_source = &cpi->denoiser.last_source; last_source = &cpi->denoiser.last_source;
// Tune these thresholds for different resolutions when denoising is // Tune these thresholds for different resolutions when denoising is
// enabled. // enabled.
...@@ -131,7 +140,7 @@ void vp9_update_noise_estimate(VP9_COMP *const cpi) { ...@@ -131,7 +140,7 @@ void vp9_update_noise_estimate(VP9_COMP *const cpi) {
(cpi->svc.number_spatial_layers == 1 && (cpi->svc.number_spatial_layers == 1 &&
(ne->last_w != cm->width || ne->last_h != cm->height))) { (ne->last_w != cm->width || ne->last_h != cm->height))) {
#if CONFIG_VP9_TEMPORAL_DENOISING #if CONFIG_VP9_TEMPORAL_DENOISING
if (cpi->oxcf.noise_sensitivity > 0 && denoise_svc(cpi)) if (cpi->oxcf.noise_sensitivity > 0 && noise_est_svc(cpi))
copy_frame(&cpi->denoiser.last_source, cpi->Source); copy_frame(&cpi->denoiser.last_source, cpi->Source);
#endif #endif
if (last_source != NULL) { if (last_source != NULL) {
...@@ -146,7 +155,7 @@ void vp9_update_noise_estimate(VP9_COMP *const cpi) { ...@@ -146,7 +155,7 @@ void vp9_update_noise_estimate(VP9_COMP *const cpi) {
ne->count = 0; ne->count = 0;
ne->num_frames_estimate = 10; ne->num_frames_estimate = 10;
#if CONFIG_VP9_TEMPORAL_DENOISING #if CONFIG_VP9_TEMPORAL_DENOISING
if (cpi->oxcf.noise_sensitivity > 0 && denoise_svc(cpi) && if (cpi->oxcf.noise_sensitivity > 0 && noise_est_svc(cpi) &&
cpi->svc.current_superframe > 1) { cpi->svc.current_superframe > 1) {
vp9_denoiser_set_noise_level(&cpi->denoiser, ne->level); vp9_denoiser_set_noise_level(&cpi->denoiser, ne->level);
copy_frame(&cpi->denoiser.last_source, cpi->Source); copy_frame(&cpi->denoiser.last_source, cpi->Source);
...@@ -257,14 +266,14 @@ void vp9_update_noise_estimate(VP9_COMP *const cpi) { ...@@ -257,14 +266,14 @@ void vp9_update_noise_estimate(VP9_COMP *const cpi) {
ne->count = 0; ne->count = 0;
ne->level = vp9_noise_estimate_extract_level(ne); ne->level = vp9_noise_estimate_extract_level(ne);
#if CONFIG_VP9_TEMPORAL_DENOISING #if CONFIG_VP9_TEMPORAL_DENOISING
if (cpi->oxcf.noise_sensitivity > 0 && denoise_svc(cpi)) if (cpi->oxcf.noise_sensitivity > 0 && noise_est_svc(cpi))
vp9_denoiser_set_noise_level(&cpi->denoiser, ne->level); vp9_denoiser_set_noise_level(&cpi->denoiser, ne->level);
#endif #endif
} }
} }
} }
#if CONFIG_VP9_TEMPORAL_DENOISING #if CONFIG_VP9_TEMPORAL_DENOISING
if (cpi->oxcf.noise_sensitivity > 0 && denoise_svc(cpi)) if (cpi->oxcf.noise_sensitivity > 0 && noise_est_svc(cpi))
copy_frame(&cpi->denoiser.last_source, cpi->Source); copy_frame(&cpi->denoiser.last_source, cpi->Source);
#endif #endif
} }
...@@ -37,6 +37,7 @@ void vp9_init_layer_context(VP9_COMP *const cpi) { ...@@ -37,6 +37,7 @@ void vp9_init_layer_context(VP9_COMP *const cpi) {
svc->scaled_one_half = 0; svc->scaled_one_half = 0;
svc->current_superframe = 0; svc->current_superframe = 0;
svc->non_reference_frame = 0; svc->non_reference_frame = 0;
for (i = 0; i < REF_FRAMES; ++i) svc->ref_frame_index[i] = -1; for (i = 0; i < REF_FRAMES; ++i) svc->ref_frame_index[i] = -1;
for (sl = 0; sl < oxcf->ss_number_layers; ++sl) { for (sl = 0; sl < oxcf->ss_number_layers; ++sl) {
svc->ext_frame_flags[sl] = 0; svc->ext_frame_flags[sl] = 0;
...@@ -389,9 +390,9 @@ int vp9_is_upper_layer_key_frame(const VP9_COMP *const cpi) { ...@@ -389,9 +390,9 @@ int vp9_is_upper_layer_key_frame(const VP9_COMP *const cpi) {
.is_key_frame; .is_key_frame;
} }
static void get_layer_resolution(const int width_org, const int height_org, void get_layer_resolution(const int width_org, const int height_org,
const int num, const int den, int *width_out, const int num, const int den, int *width_out,
int *height_out) { int *height_out) {
int w, h; int w, h;
if (width_out == NULL || height_out == NULL || den == 0) return; if (width_out == NULL || height_out == NULL || den == 0) return;
......
...@@ -49,7 +49,7 @@ typedef struct { ...@@ -49,7 +49,7 @@ typedef struct {
uint8_t speed; uint8_t speed;
} LAYER_CONTEXT; } LAYER_CONTEXT;
typedef struct { typedef struct SVC {
int spatial_layer_id; int spatial_layer_id;
int temporal_layer_id; int temporal_layer_id;
int number_spatial_layers; int number_spatial_layers;
...@@ -99,6 +99,8 @@ typedef struct { ...@@ -99,6 +99,8 @@ typedef struct {
BLOCK_SIZE *prev_partition_svc; BLOCK_SIZE *prev_partition_svc;
int mi_stride[VPX_MAX_LAYERS]; int mi_stride[VPX_MAX_LAYERS];
int first_layer_denoise;
} SVC; } SVC;
struct VP9_COMP; struct VP9_COMP;
...@@ -128,6 +130,10 @@ void vp9_save_layer_context(struct VP9_COMP *const cpi); ...@@ -128,6 +130,10 @@ void vp9_save_layer_context(struct VP9_COMP *const cpi);
// Initialize second pass rc for spatial svc. // Initialize second pass rc for spatial svc.
void vp9_init_second_pass_spatial_svc(struct VP9_COMP *cpi); void vp9_init_second_pass_spatial_svc(struct VP9_COMP *cpi);
void get_layer_resolution(const int width_org, const int height_org,
const int num, const int den, int *width_out,
int *height_out);
// Increment number of video frames in layer // Increment number of video frames in layer
void vp9_inc_frame_in_layer(struct VP9_COMP *const cpi); void vp9_inc_frame_in_layer(struct VP9_COMP *const cpi);
......
...@@ -408,7 +408,7 @@ enum vp8e_enc_control_id { ...@@ -408,7 +408,7 @@ enum vp8e_enc_control_id {
/*!\brief Codec control function to set noise sensitivity. /*!\brief Codec control function to set noise sensitivity.
* *
* 0: off, 1: On(YOnly) * 0: off, 1: On(YOnly), 2: For SVC only, on top two spatial layers(YOnly)
* *
* Supported in codecs: VP9 * Supported in codecs: VP9
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment