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

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

Issue 592203002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 3 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/simple_encoder.c ('k') | source/libvpx/examples/vp8_multi_resolution_encoder.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/examples/twopass_encoder.c
===================================================================
--- source/libvpx/examples/twopass_encoder.c (revision 292072)
+++ source/libvpx/examples/twopass_encoder.c (working copy)
@@ -28,10 +28,9 @@
// Encoding A Frame
// ----------------
// Encoding a frame in two pass mode is identical to the simple encoder
-// example, except the deadline is set to VPX_DL_BEST_QUALITY to get the
-// best quality possible. VPX_DL_GOOD_QUALITY could also be used.
+// example. To increase the quality while sacrificing encoding speed,
+// VPX_DL_BEST_QUALITY can be used in place of VPX_DL_GOOD_QUALITY.
//
-//
// Processing Statistics Packets
// -----------------------------
// Each packet of type `VPX_CODEC_CX_FRAME_PKT` contains the encoded data
@@ -52,7 +51,6 @@
#include <stdlib.h>
#include <string.h>
-#define VPX_CODEC_DISABLE_COMPAT 1
#include "vpx/vpx_encoder.h"
#include "./tools_common.h"
@@ -142,13 +140,13 @@
// Calculate frame statistics.
while (vpx_img_read(raw, infile)) {
++frame_count;
- get_frame_stats(&codec, raw, frame_count, 1, 0, VPX_DL_BEST_QUALITY,
+ get_frame_stats(&codec, raw, frame_count, 1, 0, VPX_DL_GOOD_QUALITY,
&stats);
}
// Flush encoder.
while (get_frame_stats(&codec, NULL, frame_count, 1, 0,
- VPX_DL_BEST_QUALITY, &stats)) {}
+ VPX_DL_GOOD_QUALITY, &stats)) {}
printf("Pass 0 complete. Processed %d frames.\n", frame_count);
if (vpx_codec_destroy(&codec))
@@ -182,11 +180,11 @@
// Encode frames.
while (vpx_img_read(raw, infile)) {
++frame_count;
- encode_frame(&codec, raw, frame_count, 1, 0, VPX_DL_BEST_QUALITY, writer);
+ encode_frame(&codec, raw, frame_count, 1, 0, VPX_DL_GOOD_QUALITY, writer);
}
// Flush encoder.
- while (encode_frame(&codec, NULL, -1, 1, 0, VPX_DL_BEST_QUALITY, writer)) {}
+ while (encode_frame(&codec, NULL, -1, 1, 0, VPX_DL_GOOD_QUALITY, writer)) {}
printf("\n");
« no previous file with comments | « source/libvpx/examples/simple_encoder.c ('k') | source/libvpx/examples/vp8_multi_resolution_encoder.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698