History

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.

Jerome Jiang committed 8 years ago

Commit c1e511f1 parent 14dbdd910 files · +210 −110Browse files

Showing the changes to examples (1 of 10 files). Show all

Unified · Split

examples/vpx_temporal_svc_encoder.c+17−9
@@ -32,13 +32,21 @@ static const char *exec_name; · 31 unmodified lines
3232
3333 void usage_exit(void) { exit(EXIT_FAILURE); }
3434
35−// Denoiser states, for temporal denoising.
36−enum denoiserState {
37− kDenoiserOff,
38− kDenoiserOnYOnly,
39− kDenoiserOnYUV,
40− kDenoiserOnYUVAggressive,
41− kDenoiserOnAdaptive
35+// Denoiser states for vp8, for temporal denoising.
36+enum denoiserStateVp8 {
37+ kVp8DenoiserOff,
38+ kVp8DenoiserOnYOnly,
39+ kVp8DenoiserOnYUV,
40+ kVp8DenoiserOnYUVAggressive,
41+ kVp8DenoiserOnAdaptive
42+};
43+
44+// Denoiser states for vp9, for temporal denoising.
45+enum denoiserStateVp9 {
46+ kVp9DenoiserOff,
47+ kVp9DenoiserOnYOnly,
48+ // For SVC: denoise the top two spatial layers.
49+ kVp9DenoiserOnYTwoSpatialLayers
4250 };
4351
4452 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) { · 710 unmodified lines
755763
756764 if (strncmp(encoder->name, "vp8", 3) == 0) {
757765 vpx_codec_control(&codec, VP8E_SET_CPUUSED, -speed);
758− vpx_codec_control(&codec, VP8E_SET_NOISE_SENSITIVITY, kDenoiserOff);
766+ vpx_codec_control(&codec, VP8E_SET_NOISE_SENSITIVITY, kVp8DenoiserOff);
759767 vpx_codec_control(&codec, VP8E_SET_STATIC_THRESHOLD, 1);
760768 vpx_codec_control(&codec, VP8E_SET_GF_CBR_BOOST_PCT, 0);
761769 #if VP8_ROI_MAP
@@ -772,7 +780,7 @@ int main(int argc, char **argv) { · 10 unmodified lines
772780 vpx_codec_control(&codec, VP9E_SET_GF_CBR_BOOST_PCT, 0);
773781 vpx_codec_control(&codec, VP9E_SET_FRAME_PARALLEL_DECODING, 0);
774782 vpx_codec_control(&codec, VP9E_SET_FRAME_PERIODIC_BOOST, 0);
775− vpx_codec_control(&codec, VP9E_SET_NOISE_SENSITIVITY, kDenoiserOff);
783+ vpx_codec_control(&codec, VP9E_SET_NOISE_SENSITIVITY, kVp9DenoiserOff);
776784 vpx_codec_control(&codec, VP8E_SET_STATIC_THRESHOLD, 1);
777785 vpx_codec_control(&codec, VP9E_SET_TUNE_CONTENT, 0);
778786 vpx_codec_control(&codec, VP9E_SET_TILE_COLUMNS, (cfg.g_threads >> 1));

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t