From bbcc64772580c8a979288791afa02d30bc476d2e Mon Sep 17 00:00:00 2001 From: trav90 Date: Fri, 19 Oct 2018 21:52:15 -0500 Subject: Update aom to v1.0.0 Update aom to commit id d14c5bb4f336ef1842046089849dee4a301fbbf0. --- third_party/aom/examples/twopass_encoder.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'third_party/aom/examples/twopass_encoder.c') 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 #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"); -- cgit v1.2.3