Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: source/libvpx/examples/vpx_temporal_svc_encoder.c

Issue 394353005: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/examples/vp8cx_set_ref.c ('k') | source/libvpx/test/active_map_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/examples/vpx_temporal_svc_encoder.c
===================================================================
--- source/libvpx/examples/vpx_temporal_svc_encoder.c (revision 284462)
+++ source/libvpx/examples/vpx_temporal_svc_encoder.c (working copy)
@@ -32,6 +32,14 @@
exit(EXIT_FAILURE);
}
+// Denoiser states, for temporal denoising.
+enum denoiserState {
+ kDenoiserOff,
+ kDenoiserOnYOnly,
+ kDenoiserOnYUV,
+ kDenoiserOnYUVAggressive // Aggressive mode not implemented currently.
+};
+
static int mode_to_num_layers[12] = {1, 2, 2, 3, 3, 3, 3, 5, 2, 3, 3, 3};
// For rate control encoding stats.
@@ -466,7 +474,7 @@
if (!encoder)
die("Unsupported codec.");
- printf("Using %s\n", vpx_codec_iface_name(encoder->interface()));
+ printf("Using %s\n", vpx_codec_iface_name(encoder->codec_interface()));
width = strtol(argv[4], NULL, 0);
height = strtol(argv[5], NULL, 0);
@@ -488,7 +496,7 @@
}
// Populate encoder configuration.
- res = vpx_codec_enc_config_default(encoder->interface(), &cfg, 0);
+ res = vpx_codec_enc_config_default(encoder->codec_interface(), &cfg, 0);
if (res) {
printf("Failed to get config: %s\n", vpx_codec_err_to_string(res));
return EXIT_FAILURE;
@@ -566,12 +574,12 @@
cfg.ss_number_layers = 1;
// Initialize codec.
- if (vpx_codec_enc_init(&codec, encoder->interface(), &cfg, 0))
+ if (vpx_codec_enc_init(&codec, encoder->codec_interface(), &cfg, 0))
die_codec(&codec, "Failed to initialize encoder");
if (strncmp(encoder->name, "vp8", 3) == 0) {
vpx_codec_control(&codec, VP8E_SET_CPUUSED, -speed);
- vpx_codec_control(&codec, VP8E_SET_NOISE_SENSITIVITY, 1);
+ vpx_codec_control(&codec, VP8E_SET_NOISE_SENSITIVITY, kDenoiserOnYOnly);
} else if (strncmp(encoder->name, "vp9", 3) == 0) {
vpx_codec_control(&codec, VP8E_SET_CPUUSED, speed);
vpx_codec_control(&codec, VP9E_SET_AQ_MODE, 3);
« no previous file with comments | « source/libvpx/examples/vp8cx_set_ref.c ('k') | source/libvpx/test/active_map_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698