diff options
author | Tom Finegan <tomfinegan@google.com> | 2014-09-10 11:10:29 -0700 |
---|---|---|
committer | Tom Finegan <tomfinegan@google.com> | 2014-09-10 11:14:07 -0700 |
commit | 4e94dec35278db559168cad97323ec78cb1b8d07 (patch) | |
tree | ec1ec303c801e5e9664cda2fd1f79214d261e0d0 /examples | |
parent | 0e66848081c19e75bf68ace1ac8f93220c4af68e (diff) | |
download | libvpx-4e94dec35278db559168cad97323ec78cb1b8d07.tar.gz |
examples/twopass_encoder: Use good quality.
This speeds up the encode significantly. Also added a comment about using
best quality to keep new developers informed.
Change-Id: I04e8154d4b2c4cae07fe7cc9a71e707f649e9ed4
Diffstat (limited to 'examples')
-rw-r--r-- | examples/twopass_encoder.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/examples/twopass_encoder.c b/examples/twopass_encoder.c index 7a7653b2a..653ae9482 100644 --- a/examples/twopass_encoder.c +++ b/examples/twopass_encoder.c @@ -28,9 +28,8 @@ // 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 // ----------------------------- @@ -141,13 +140,13 @@ static vpx_fixed_buf_t pass0(vpx_image_t *raw, // 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)) @@ -181,11 +180,11 @@ static void pass1(vpx_image_t *raw, // 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"); |