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
32 32
33void usage_exit(void) { exit(EXIT_FAILURE); }33void usage_exit(void) { exit(EXIT_FAILURE); }
34 34
35// Denoiser states, for temporal denoising.35// Denoiser states for vp8, for temporal denoising.
36enum denoiserState {36enum denoiserStateVp8 {
37 kDenoiserOff,37 kVp8DenoiserOff,
38 kDenoiserOnYOnly,38 kVp8DenoiserOnYOnly,
39 kDenoiserOnYUV,39 kVp8DenoiserOnYUV,
40 kDenoiserOnYUVAggressive,40 kVp8DenoiserOnYUVAggressive,
41 kDenoiserOnAdaptive41 kVp8DenoiserOnAdaptive
42};
43
44// Denoiser states for vp9, for temporal denoising.
45enum denoiserStateVp9 {
46 kVp9DenoiserOff,
47 kVp9DenoiserOnYOnly,
48 // For SVC: denoise the top two spatial layers.
49 kVp9DenoiserOnYTwoSpatialLayers
42};50};
43 51
44static int mode_to_num_layers[13] = { 1, 2, 2, 3, 3, 3, 3, 5, 2, 3, 3, 3, 3 };52static 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
755 763
756 if (strncmp(encoder->name, "vp8", 3) == 0) {764 if (strncmp(encoder->name, "vp8", 3) == 0) {
757 vpx_codec_control(&codec, VP8E_SET_CPUUSED, -speed);765 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);
759 vpx_codec_control(&codec, VP8E_SET_STATIC_THRESHOLD, 1);767 vpx_codec_control(&codec, VP8E_SET_STATIC_THRESHOLD, 1);
760 vpx_codec_control(&codec, VP8E_SET_GF_CBR_BOOST_PCT, 0);768 vpx_codec_control(&codec, VP8E_SET_GF_CBR_BOOST_PCT, 0);
761#if VP8_ROI_MAP769#if VP8_ROI_MAP
@@ -772,7 +780,7 @@ int main(int argc, char **argv) { · 10 unmodified lines
772 vpx_codec_control(&codec, VP9E_SET_GF_CBR_BOOST_PCT, 0);780 vpx_codec_control(&codec, VP9E_SET_GF_CBR_BOOST_PCT, 0);
773 vpx_codec_control(&codec, VP9E_SET_FRAME_PARALLEL_DECODING, 0);781 vpx_codec_control(&codec, VP9E_SET_FRAME_PARALLEL_DECODING, 0);
774 vpx_codec_control(&codec, VP9E_SET_FRAME_PERIODIC_BOOST, 0);782 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);
776 vpx_codec_control(&codec, VP8E_SET_STATIC_THRESHOLD, 1);784 vpx_codec_control(&codec, VP8E_SET_STATIC_THRESHOLD, 1);
777 vpx_codec_control(&codec, VP9E_SET_TUNE_CONTENT, 0);785 vpx_codec_control(&codec, VP9E_SET_TUNE_CONTENT, 0);
778 vpx_codec_control(&codec, VP9E_SET_TILE_COLUMNS, (cfg.g_threads >> 1));786 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