diff options
author | trav90 <travawine@palemoon.org> | 2018-10-19 21:52:15 -0500 |
---|---|---|
committer | trav90 <travawine@palemoon.org> | 2018-10-19 21:52:20 -0500 |
commit | bbcc64772580c8a979288791afa02d30bc476d2e (patch) | |
tree | 437ce94c3fdd7497508e5b55de06c6d011678597 /third_party/aom/examples/twopass_encoder.c | |
parent | 14805f6ddbfb173c327768fff9f81f40ce5e81b0 (diff) | |
download | UXP-bbcc64772580c8a979288791afa02d30bc476d2e.tar UXP-bbcc64772580c8a979288791afa02d30bc476d2e.tar.gz UXP-bbcc64772580c8a979288791afa02d30bc476d2e.tar.lz UXP-bbcc64772580c8a979288791afa02d30bc476d2e.tar.xz UXP-bbcc64772580c8a979288791afa02d30bc476d2e.zip |
Update aom to v1.0.0
Update aom to commit id d14c5bb4f336ef1842046089849dee4a301fbbf0.
Diffstat (limited to 'third_party/aom/examples/twopass_encoder.c')
-rw-r--r-- | third_party/aom/examples/twopass_encoder.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/third_party/aom/examples/twopass_encoder.c b/third_party/aom/examples/twopass_encoder.c index e767bb5d7..1b134cce0 100644 --- a/third_party/aom/examples/twopass_encoder.c +++ b/third_party/aom/examples/twopass_encoder.c @@ -52,9 +52,8 @@ #include <string.h> #include "aom/aom_encoder.h" - -#include "../tools_common.h" -#include "../video_writer.h" +#include "common/tools_common.h" +#include "common/video_writer.h" static const char *exec_name; @@ -68,13 +67,12 @@ void usage_exit(void) { static int get_frame_stats(aom_codec_ctx_t *ctx, const aom_image_t *img, aom_codec_pts_t pts, unsigned int duration, - aom_enc_frame_flags_t flags, unsigned int deadline, + aom_enc_frame_flags_t flags, aom_fixed_buf_t *stats) { int got_pkts = 0; aom_codec_iter_t iter = NULL; const aom_codec_cx_pkt_t *pkt = NULL; - const aom_codec_err_t res = - aom_codec_encode(ctx, img, pts, duration, flags, deadline); + const aom_codec_err_t res = aom_codec_encode(ctx, img, pts, duration, flags); if (res != AOM_CODEC_OK) die_codec(ctx, "Failed to get frame stats."); while ((pkt = aom_codec_get_cx_data(ctx, &iter)) != NULL) { @@ -94,13 +92,11 @@ static int get_frame_stats(aom_codec_ctx_t *ctx, const aom_image_t *img, static int encode_frame(aom_codec_ctx_t *ctx, const aom_image_t *img, aom_codec_pts_t pts, unsigned int duration, - aom_enc_frame_flags_t flags, unsigned int deadline, - AvxVideoWriter *writer) { + aom_enc_frame_flags_t flags, AvxVideoWriter *writer) { int got_pkts = 0; aom_codec_iter_t iter = NULL; const aom_codec_cx_pkt_t *pkt = NULL; - const aom_codec_err_t res = - aom_codec_encode(ctx, img, pts, duration, flags, deadline); + const aom_codec_err_t res = aom_codec_encode(ctx, img, pts, duration, flags); if (res != AOM_CODEC_OK) die_codec(ctx, "Failed to encode frame."); while ((pkt = aom_codec_get_cx_data(ctx, &iter)) != NULL) { @@ -133,13 +129,11 @@ static aom_fixed_buf_t pass0(aom_image_t *raw, FILE *infile, // Calculate frame statistics. while (aom_img_read(raw, infile) && frame_count < limit) { ++frame_count; - get_frame_stats(&codec, raw, frame_count, 1, 0, AOM_DL_GOOD_QUALITY, - &stats); + get_frame_stats(&codec, raw, frame_count, 1, 0, &stats); } // Flush encoder. - while (get_frame_stats(&codec, NULL, frame_count, 1, 0, AOM_DL_GOOD_QUALITY, - &stats)) { + while (get_frame_stats(&codec, NULL, frame_count, 1, 0, &stats)) { } printf("Pass 0 complete. Processed %d frames.\n", frame_count); @@ -168,11 +162,11 @@ static void pass1(aom_image_t *raw, FILE *infile, const char *outfile_name, // Encode frames. while (aom_img_read(raw, infile) && frame_count < limit) { ++frame_count; - encode_frame(&codec, raw, frame_count, 1, 0, AOM_DL_GOOD_QUALITY, writer); + encode_frame(&codec, raw, frame_count, 1, 0, writer); } // Flush encoder. - while (encode_frame(&codec, NULL, -1, 1, 0, AOM_DL_GOOD_QUALITY, writer)) { + while (encode_frame(&codec, NULL, -1, 1, 0, writer)) { } printf("\n"); |