Commit 5082a369 authored by Adrian Grange's avatar Adrian Grange

Change "Vpx" to "Avx"

Change-Id: I0d1e439b75eb749dd80a86474ac5f494478d0360
parent 7df44f17
...@@ -43,8 +43,8 @@ ...@@ -43,8 +43,8 @@
static const char *exec_name; static const char *exec_name;
struct VpxDecInputContext { struct AvxDecInputContext {
struct VpxInputContext *aom_input_ctx; struct AvxInputContext *aom_input_ctx;
struct WebmInputContext *webm_ctx; struct WebmInputContext *webm_ctx;
}; };
...@@ -160,7 +160,7 @@ void usage_exit(void) { ...@@ -160,7 +160,7 @@ void usage_exit(void) {
fprintf(stderr, "\nIncluded decoders:\n\n"); fprintf(stderr, "\nIncluded decoders:\n\n");
for (i = 0; i < get_aom_decoder_count(); ++i) { for (i = 0; i < get_aom_decoder_count(); ++i) {
const VpxInterface *const decoder = get_aom_decoder_by_index(i); const AvxInterface *const decoder = get_aom_decoder_by_index(i);
fprintf(stderr, " %-6s - %s\n", decoder->name, fprintf(stderr, " %-6s - %s\n", decoder->name,
aom_codec_iface_name(decoder->codec_interface())); aom_codec_iface_name(decoder->codec_interface()));
} }
...@@ -213,7 +213,7 @@ static int raw_read_frame(FILE *infile, uint8_t **buffer, size_t *bytes_read, ...@@ -213,7 +213,7 @@ static int raw_read_frame(FILE *infile, uint8_t **buffer, size_t *bytes_read,
return 0; return 0;
} }
static int read_frame(struct VpxDecInputContext *input, uint8_t **buf, static int read_frame(struct AvxDecInputContext *input, uint8_t **buf,
size_t *bytes_in_buffer, size_t *buffer_size) { size_t *bytes_in_buffer, size_t *buffer_size) {
switch (input->aom_input_ctx->file_type) { switch (input->aom_input_ctx->file_type) {
#if CONFIG_WEBM_IO #if CONFIG_WEBM_IO
...@@ -273,7 +273,7 @@ static void write_image_file(const aom_image_t *img, const int planes[3], ...@@ -273,7 +273,7 @@ static void write_image_file(const aom_image_t *img, const int planes[3],
} }
} }
static int file_is_raw(struct VpxInputContext *input) { static int file_is_raw(struct AvxInputContext *input) {
uint8_t buf[32]; uint8_t buf[32];
int is_raw = 0; int is_raw = 0;
aom_codec_stream_info_t si; aom_codec_stream_info_t si;
...@@ -285,7 +285,7 @@ static int file_is_raw(struct VpxInputContext *input) { ...@@ -285,7 +285,7 @@ static int file_is_raw(struct VpxInputContext *input) {
if (mem_get_le32(buf) < 256 * 1024 * 1024) { if (mem_get_le32(buf) < 256 * 1024 * 1024) {
for (i = 0; i < get_aom_decoder_count(); ++i) { for (i = 0; i < get_aom_decoder_count(); ++i) {
const VpxInterface *const decoder = get_aom_decoder_by_index(i); const AvxInterface *const decoder = get_aom_decoder_by_index(i);
if (!aom_codec_peek_stream_info(decoder->codec_interface(), buf + 4, if (!aom_codec_peek_stream_info(decoder->codec_interface(), buf + 4,
32 - 4, &si)) { 32 - 4, &si)) {
is_raw = 1; is_raw = 1;
...@@ -476,8 +476,8 @@ static int main_loop(int argc, const char **argv_) { ...@@ -476,8 +476,8 @@ static int main_loop(int argc, const char **argv_) {
int arg_skip = 0; int arg_skip = 0;
int ec_enabled = 0; int ec_enabled = 0;
int keep_going = 0; int keep_going = 0;
const VpxInterface *interface = NULL; const AvxInterface *interface = NULL;
const VpxInterface *fourcc_interface = NULL; const AvxInterface *fourcc_interface = NULL;
uint64_t dx_time = 0; uint64_t dx_time = 0;
struct arg arg; struct arg arg;
char **argv, **argi, **argj; char **argv, **argi, **argj;
...@@ -508,8 +508,8 @@ static int main_loop(int argc, const char **argv_) { ...@@ -508,8 +508,8 @@ static int main_loop(int argc, const char **argv_) {
MD5Context md5_ctx; MD5Context md5_ctx;
unsigned char md5_digest[16]; unsigned char md5_digest[16];
struct VpxDecInputContext input = { NULL, NULL }; struct AvxDecInputContext input = { NULL, NULL };
struct VpxInputContext aom_input_ctx; struct AvxInputContext aom_input_ctx;
#if CONFIG_WEBM_IO #if CONFIG_WEBM_IO
struct WebmInputContext webm_ctx; struct WebmInputContext webm_ctx;
memset(&(webm_ctx), 0, sizeof(webm_ctx)); memset(&(webm_ctx), 0, sizeof(webm_ctx));
......
...@@ -96,7 +96,7 @@ static void warn_or_exit_on_error(aom_codec_ctx_t *ctx, int fatal, ...@@ -96,7 +96,7 @@ static void warn_or_exit_on_error(aom_codec_ctx_t *ctx, int fatal,
va_end(ap); va_end(ap);
} }
static int read_frame(struct VpxInputContext *input_ctx, aom_image_t *img) { static int read_frame(struct AvxInputContext *input_ctx, aom_image_t *img) {
FILE *f = input_ctx->file; FILE *f = input_ctx->file;
y4m_input *y4m = &input_ctx->y4m; y4m_input *y4m = &input_ctx->y4m;
int shortread = 0; int shortread = 0;
...@@ -501,7 +501,7 @@ void usage_exit(void) { ...@@ -501,7 +501,7 @@ void usage_exit(void) {
fprintf(stderr, "\nIncluded encoders:\n\n"); fprintf(stderr, "\nIncluded encoders:\n\n");
for (i = 0; i < num_encoder; ++i) { for (i = 0; i < num_encoder; ++i) {
const VpxInterface *const encoder = get_aom_encoder_by_index(i); const AvxInterface *const encoder = get_aom_encoder_by_index(i);
const char *defstr = (i == (num_encoder - 1)) ? "(default)" : ""; const char *defstr = (i == (num_encoder - 1)) ? "(default)" : "";
fprintf(stderr, " %-6s - %s %s\n", encoder->name, fprintf(stderr, " %-6s - %s %s\n", encoder->name,
aom_codec_iface_name(encoder->codec_interface()), defstr); aom_codec_iface_name(encoder->codec_interface()), defstr);
...@@ -804,7 +804,7 @@ static void validate_positive_rational(const char *msg, ...@@ -804,7 +804,7 @@ static void validate_positive_rational(const char *msg,
if (!rat->den) die("Error: %s has zero denominator\n", msg); if (!rat->den) die("Error: %s has zero denominator\n", msg);
} }
static void parse_global_config(struct VpxEncoderConfig *global, char **argv) { static void parse_global_config(struct AvxEncoderConfig *global, char **argv) {
char **argi, **argj; char **argi, **argj;
struct arg arg; struct arg arg;
const int num_encoder = get_aom_encoder_count(); const int num_encoder = get_aom_encoder_count();
...@@ -917,7 +917,7 @@ static void parse_global_config(struct VpxEncoderConfig *global, char **argv) { ...@@ -917,7 +917,7 @@ static void parse_global_config(struct VpxEncoderConfig *global, char **argv) {
} }
} }
static void open_input_file(struct VpxInputContext *input) { static void open_input_file(struct AvxInputContext *input) {
/* Parse certain options from the input file, if possible */ /* Parse certain options from the input file, if possible */
input->file = strcmp(input->filename, "-") ? fopen(input->filename, "rb") input->file = strcmp(input->filename, "-") ? fopen(input->filename, "rb")
: set_binary_mode(stdin); : set_binary_mode(stdin);
...@@ -963,12 +963,12 @@ static void open_input_file(struct VpxInputContext *input) { ...@@ -963,12 +963,12 @@ static void open_input_file(struct VpxInputContext *input) {
} }
} }
static void close_input_file(struct VpxInputContext *input) { static void close_input_file(struct AvxInputContext *input) {
fclose(input->file); fclose(input->file);
if (input->file_type == FILE_TYPE_Y4M) y4m_input_close(&input->y4m); if (input->file_type == FILE_TYPE_Y4M) y4m_input_close(&input->y4m);
} }
static struct stream_state *new_stream(struct VpxEncoderConfig *global, static struct stream_state *new_stream(struct AvxEncoderConfig *global,
struct stream_state *prev) { struct stream_state *prev) {
struct stream_state *stream; struct stream_state *stream;
...@@ -1024,7 +1024,7 @@ static struct stream_state *new_stream(struct VpxEncoderConfig *global, ...@@ -1024,7 +1024,7 @@ static struct stream_state *new_stream(struct VpxEncoderConfig *global,
return stream; return stream;
} }
static int parse_stream_params(struct VpxEncoderConfig *global, static int parse_stream_params(struct AvxEncoderConfig *global,
struct stream_state *stream, char **argv) { struct stream_state *stream, char **argv) {
char **argi, **argj; char **argi, **argj;
struct arg arg; struct arg arg;
...@@ -1211,7 +1211,7 @@ static int parse_stream_params(struct VpxEncoderConfig *global, ...@@ -1211,7 +1211,7 @@ static int parse_stream_params(struct VpxEncoderConfig *global,
} while (0) } while (0)
static void validate_stream_config(const struct stream_state *stream, static void validate_stream_config(const struct stream_state *stream,
const struct VpxEncoderConfig *global) { const struct AvxEncoderConfig *global) {
const struct stream_state *streami; const struct stream_state *streami;
(void)global; (void)global;
...@@ -1280,7 +1280,7 @@ static void set_stream_dimensions(struct stream_state *stream, unsigned int w, ...@@ -1280,7 +1280,7 @@ static void set_stream_dimensions(struct stream_state *stream, unsigned int w,
} }
static void set_default_kf_interval(struct stream_state *stream, static void set_default_kf_interval(struct stream_state *stream,
struct VpxEncoderConfig *global) { struct AvxEncoderConfig *global) {
/* Use a max keyframe interval of 5 seconds, if none was /* Use a max keyframe interval of 5 seconds, if none was
* specified on the command line. * specified on the command line.
*/ */
...@@ -1315,8 +1315,8 @@ static const char *image_format_to_string(aom_img_fmt_t f) { ...@@ -1315,8 +1315,8 @@ static const char *image_format_to_string(aom_img_fmt_t f) {
} }
static void show_stream_config(struct stream_state *stream, static void show_stream_config(struct stream_state *stream,
struct VpxEncoderConfig *global, struct AvxEncoderConfig *global,
struct VpxInputContext *input) { struct AvxInputContext *input) {
#define SHOW(field) \ #define SHOW(field) \
fprintf(stderr, " %-28s = %d\n", #field, stream->config.cfg.field) fprintf(stderr, " %-28s = %d\n", #field, stream->config.cfg.field)
...@@ -1368,8 +1368,8 @@ static void show_stream_config(struct stream_state *stream, ...@@ -1368,8 +1368,8 @@ static void show_stream_config(struct stream_state *stream,
} }
static void open_output_file(struct stream_state *stream, static void open_output_file(struct stream_state *stream,
struct VpxEncoderConfig *global, struct AvxEncoderConfig *global,
const struct VpxRational *pixel_aspect_ratio) { const struct AvxRational *pixel_aspect_ratio) {
const char *fn = stream->config.out_fn; const char *fn = stream->config.out_fn;
const struct aom_codec_enc_cfg *const cfg = &stream->config.cfg; const struct aom_codec_enc_cfg *const cfg = &stream->config.cfg;
...@@ -1418,7 +1418,7 @@ static void close_output_file(struct stream_state *stream, ...@@ -1418,7 +1418,7 @@ static void close_output_file(struct stream_state *stream,
} }
static void setup_pass(struct stream_state *stream, static void setup_pass(struct stream_state *stream,
struct VpxEncoderConfig *global, int pass) { struct AvxEncoderConfig *global, int pass) {
if (stream->config.stats_fn) { if (stream->config.stats_fn) {
if (!stats_open_file(&stream->stats, stream->config.stats_fn, pass)) if (!stats_open_file(&stream->stats, stream->config.stats_fn, pass))
fatal("Failed to open statistics store"); fatal("Failed to open statistics store");
...@@ -1455,7 +1455,7 @@ static void setup_pass(struct stream_state *stream, ...@@ -1455,7 +1455,7 @@ static void setup_pass(struct stream_state *stream,
} }
static void initialize_encoder(struct stream_state *stream, static void initialize_encoder(struct stream_state *stream,
struct VpxEncoderConfig *global) { struct AvxEncoderConfig *global) {
int i; int i;
int flags = 0; int flags = 0;
...@@ -1485,14 +1485,14 @@ static void initialize_encoder(struct stream_state *stream, ...@@ -1485,14 +1485,14 @@ static void initialize_encoder(struct stream_state *stream,
#if CONFIG_DECODERS #if CONFIG_DECODERS
if (global->test_decode != TEST_DECODE_OFF) { if (global->test_decode != TEST_DECODE_OFF) {
const VpxInterface *decoder = get_aom_decoder_by_name(global->codec->name); const AvxInterface *decoder = get_aom_decoder_by_name(global->codec->name);
aom_codec_dec_init(&stream->decoder, decoder->codec_interface(), NULL, 0); aom_codec_dec_init(&stream->decoder, decoder->codec_interface(), NULL, 0);
} }
#endif #endif
} }
static void encode_frame(struct stream_state *stream, static void encode_frame(struct stream_state *stream,
struct VpxEncoderConfig *global, struct aom_image *img, struct AvxEncoderConfig *global, struct aom_image *img,
unsigned int frames_in) { unsigned int frames_in) {
aom_codec_pts_t frame_start, next_frame_start; aom_codec_pts_t frame_start, next_frame_start;
struct aom_codec_enc_cfg *cfg = &stream->config.cfg; struct aom_codec_enc_cfg *cfg = &stream->config.cfg;
...@@ -1591,7 +1591,7 @@ static void update_quantizer_histogram(struct stream_state *stream) { ...@@ -1591,7 +1591,7 @@ static void update_quantizer_histogram(struct stream_state *stream) {
} }
static void get_cx_data(struct stream_state *stream, static void get_cx_data(struct stream_state *stream,
struct VpxEncoderConfig *global, int *got_data) { struct AvxEncoderConfig *global, int *got_data) {
const aom_codec_cx_pkt_t *pkt; const aom_codec_cx_pkt_t *pkt;
const struct aom_codec_enc_cfg *cfg = &stream->config.cfg; const struct aom_codec_enc_cfg *cfg = &stream->config.cfg;
aom_codec_iter_t iter = NULL; aom_codec_iter_t iter = NULL;
...@@ -1709,7 +1709,7 @@ static float usec_to_fps(uint64_t usec, unsigned int frames) { ...@@ -1709,7 +1709,7 @@ static float usec_to_fps(uint64_t usec, unsigned int frames) {
static void test_decode(struct stream_state *stream, static void test_decode(struct stream_state *stream,
enum TestDecodeFatality fatal, enum TestDecodeFatality fatal,
const VpxInterface *codec) { const AvxInterface *codec) {
aom_image_t enc_img, dec_img; aom_image_t enc_img, dec_img;
struct av1_ref_frame ref_enc, ref_dec; struct av1_ref_frame ref_enc, ref_dec;
...@@ -1795,8 +1795,8 @@ int main(int argc, const char **argv_) { ...@@ -1795,8 +1795,8 @@ int main(int argc, const char **argv_) {
#endif #endif
int frame_avail, got_data; int frame_avail, got_data;
struct VpxInputContext input; struct AvxInputContext input;
struct VpxEncoderConfig global; struct AvxEncoderConfig global;
struct stream_state *streams = NULL; struct stream_state *streams = NULL;
char **argv, **argi; char **argv, **argi;
uint64_t cx_time = 0; uint64_t cx_time = 0;
......
...@@ -31,11 +31,11 @@ typedef enum { ...@@ -31,11 +31,11 @@ typedef enum {
YV12, // 4:2:0 with uv flipped, only 8-bit depth YV12, // 4:2:0 with uv flipped, only 8-bit depth
} ColorInputType; } ColorInputType;
struct VpxInterface; struct AvxInterface;
/* Configuration elements common to all streams. */ /* Configuration elements common to all streams. */
struct VpxEncoderConfig { struct AvxEncoderConfig {
const struct VpxInterface *codec; const struct AvxInterface *codec;
int passes; int passes;
int pass; int pass;
int usage; int usage;
......
...@@ -463,7 +463,7 @@ static void set_temporal_layer_pattern(int layering_mode, ...@@ -463,7 +463,7 @@ static void set_temporal_layer_pattern(int layering_mode,
} }
int main(int argc, char **argv) { int main(int argc, char **argv) {
VpxVideoWriter *outfile[AOM_TS_MAX_LAYERS] = { NULL }; AvxVideoWriter *outfile[AOM_TS_MAX_LAYERS] = { NULL };
aom_codec_ctx_t codec; aom_codec_ctx_t codec;
aom_codec_enc_cfg_t cfg; aom_codec_enc_cfg_t cfg;
int frame_cnt = 0; int frame_cnt = 0;
...@@ -486,7 +486,7 @@ int main(int argc, char **argv) { ...@@ -486,7 +486,7 @@ int main(int argc, char **argv) {
#else #else
aom_svc_layer_id_t layer_id = { 0 }; aom_svc_layer_id_t layer_id = { 0 };
#endif #endif
const VpxInterface *encoder = NULL; const AvxInterface *encoder = NULL;
FILE *infile = NULL; FILE *infile = NULL;
struct RateControlMetrics rc; struct RateControlMetrics rc;
int64_t cx_time = 0; int64_t cx_time = 0;
...@@ -650,7 +650,7 @@ int main(int argc, char **argv) { ...@@ -650,7 +650,7 @@ int main(int argc, char **argv) {
// Open an output file for each stream. // Open an output file for each stream.
for (i = 0; i < cfg.ts_number_layers; ++i) { for (i = 0; i < cfg.ts_number_layers; ++i) {
char file_name[PATH_MAX]; char file_name[PATH_MAX];
VpxVideoInfo info; AvxVideoInfo info;
info.codec_fourcc = encoder->fourcc; info.codec_fourcc = encoder->fourcc;
info.frame_width = cfg.g_w; info.frame_width = cfg.g_w;
info.frame_height = cfg.g_h; info.frame_height = cfg.g_h;
......
...@@ -80,9 +80,9 @@ int main(int argc, char **argv) { ...@@ -80,9 +80,9 @@ int main(int argc, char **argv) {
int frame_cnt = 0; int frame_cnt = 0;
FILE *outfile = NULL; FILE *outfile = NULL;
aom_codec_ctx_t codec; aom_codec_ctx_t codec;
VpxVideoReader *reader = NULL; AvxVideoReader *reader = NULL;
const VpxVideoInfo *info = NULL; const AvxVideoInfo *info = NULL;
const VpxInterface *decoder = NULL; const AvxInterface *decoder = NULL;
exec_name = argv[0]; exec_name = argv[0];
......
...@@ -75,9 +75,9 @@ int main(int argc, char **argv) { ...@@ -75,9 +75,9 @@ int main(int argc, char **argv) {
int frame_cnt = 0; int frame_cnt = 0;
FILE *outfile = NULL; FILE *outfile = NULL;
aom_codec_ctx_t codec; aom_codec_ctx_t codec;
const VpxInterface *decoder = NULL; const AvxInterface *decoder = NULL;
VpxVideoReader *reader = NULL; AvxVideoReader *reader = NULL;
const VpxVideoInfo *info = NULL; const AvxVideoInfo *info = NULL;
int n = 0; int n = 0;
int m = 0; int m = 0;
int is_range = 0; int is_range = 0;
......
...@@ -124,7 +124,7 @@ static void unset_active_map(const aom_codec_enc_cfg_t *cfg, ...@@ -124,7 +124,7 @@ static void unset_active_map(const aom_codec_enc_cfg_t *cfg,
} }
static int encode_frame(aom_codec_ctx_t *codec, aom_image_t *img, static int encode_frame(aom_codec_ctx_t *codec, aom_image_t *img,
int frame_index, VpxVideoWriter *writer) { int frame_index, AvxVideoWriter *writer) {
int got_pkts = 0; int got_pkts = 0;
aom_codec_iter_t iter = NULL; aom_codec_iter_t iter = NULL;
const aom_codec_cx_pkt_t *pkt = NULL; const aom_codec_cx_pkt_t *pkt = NULL;
...@@ -158,9 +158,9 @@ int main(int argc, char **argv) { ...@@ -158,9 +158,9 @@ int main(int argc, char **argv) {
int frame_count = 0; int frame_count = 0;
aom_image_t raw; aom_image_t raw;
aom_codec_err_t res; aom_codec_err_t res;
VpxVideoInfo info; AvxVideoInfo info;
VpxVideoWriter *writer = NULL; AvxVideoWriter *writer = NULL;
const VpxInterface *encoder = NULL; const AvxInterface *encoder = NULL;
const int fps = 2; // TODO(dkovalev) add command line argument const int fps = 2; // TODO(dkovalev) add command line argument
const double bits_per_pixel_per_frame = 0.067; const double bits_per_pixel_per_frame = 0.067;
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
// Initializing The Codec // Initializing The Codec
// ---------------------- // ----------------------
// The libaom decoder is initialized by the call to aom_codec_dec_init(). // The libaom decoder is initialized by the call to aom_codec_dec_init().
// Determining the codec interface to use is handled by VpxVideoReader and the // Determining the codec interface to use is handled by AvxVideoReader and the
// functions prefixed with aom_video_reader_. Discussion of those functions is // functions prefixed with aom_video_reader_. Discussion of those functions is
// beyond the scope of this example, but the main gist is to open the input file // beyond the scope of this example, but the main gist is to open the input file
// and parse just enough of it to determine if it's a VPx file and which VPx // and parse just enough of it to determine if it's a VPx file and which VPx
...@@ -97,9 +97,9 @@ int main(int argc, char **argv) { ...@@ -97,9 +97,9 @@ int main(int argc, char **argv) {
int frame_cnt = 0; int frame_cnt = 0;
FILE *outfile = NULL; FILE *outfile = NULL;
aom_codec_ctx_t codec; aom_codec_ctx_t codec;
VpxVideoReader *reader = NULL; AvxVideoReader *reader = NULL;
const VpxInterface *decoder = NULL; const AvxInterface *decoder = NULL;
const VpxVideoInfo *info = NULL; const AvxVideoInfo *info = NULL;
exec_name = argv[0]; exec_name = argv[0];
......
...@@ -117,7 +117,7 @@ void usage_exit(void) { ...@@ -117,7 +117,7 @@ void usage_exit(void) {
} }
static int encode_frame(aom_codec_ctx_t *codec, aom_image_t *img, static int encode_frame(aom_codec_ctx_t *codec, aom_image_t *img,
int frame_index, int flags, VpxVideoWriter *writer) { int frame_index, int flags, AvxVideoWriter *writer) {
int got_pkts = 0; int got_pkts = 0;
aom_codec_iter_t iter = NULL; aom_codec_iter_t iter = NULL;
const aom_codec_cx_pkt_t *pkt = NULL; const aom_codec_cx_pkt_t *pkt = NULL;
...@@ -150,9 +150,9 @@ int main(int argc, char **argv) { ...@@ -150,9 +150,9 @@ int main(int argc, char **argv) {
int frame_count = 0; int frame_count = 0;
aom_image_t raw; aom_image_t raw;
aom_codec_err_t res; aom_codec_err_t res;
VpxVideoInfo info = { 0 }; AvxVideoInfo info = { 0 };
VpxVideoWriter *writer = NULL; AvxVideoWriter *writer = NULL;
const VpxInterface *encoder = NULL; const AvxInterface *encoder = NULL;
const int fps = 30; // TODO(dkovalev) add command line argument const int fps = 30; // TODO(dkovalev) add command line argument
const int bitrate = 200; // kbit/s TODO(dkovalev) add command line argument const int bitrate = 200; // kbit/s TODO(dkovalev) add command line argument
int keyframe_interval = 0; int keyframe_interval = 0;
......
...@@ -94,7 +94,7 @@ static int get_frame_stats(aom_codec_ctx_t *ctx, const aom_image_t *img, ...@@ -94,7 +94,7 @@ 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, static int encode_frame(aom_codec_ctx_t *ctx, const aom_image_t *img,
aom_codec_pts_t pts, unsigned int duration, aom_codec_pts_t pts, unsigned int duration,
aom_enc_frame_flags_t flags, unsigned int deadline, aom_enc_frame_flags_t flags, unsigned int deadline,
VpxVideoWriter *writer) { AvxVideoWriter *writer) {
int got_pkts = 0; int got_pkts = 0;
aom_codec_iter_t iter = NULL; aom_codec_iter_t iter = NULL;
const aom_codec_cx_pkt_t *pkt = NULL; const aom_codec_cx_pkt_t *pkt = NULL;
...@@ -120,7 +120,7 @@ static int encode_frame(aom_codec_ctx_t *ctx, const aom_image_t *img, ...@@ -120,7 +120,7 @@ static int encode_frame(aom_codec_ctx_t *ctx, const aom_image_t *img,
} }
static aom_fixed_buf_t pass0(aom_image_t *raw, FILE *infile, static aom_fixed_buf_t pass0(aom_image_t *raw, FILE *infile,
const VpxInterface *encoder, const AvxInterface *encoder,
const aom_codec_enc_cfg_t *cfg) { const aom_codec_enc_cfg_t *cfg) {
aom_codec_ctx_t codec; aom_codec_ctx_t codec;
int frame_count = 0; int frame_count = 0;
...@@ -148,12 +148,12 @@ static aom_fixed_buf_t pass0(aom_image_t *raw, FILE *infile, ...@@ -148,12 +148,12 @@ static aom_fixed_buf_t pass0(aom_image_t *raw, FILE *infile,
} }
static void pass1(aom_image_t *raw, FILE *infile, const char *outfile_name, static void pass1(aom_image_t *raw, FILE *infile, const char *outfile_name,
const VpxInterface *encoder, const aom_codec_enc_cfg_t *cfg) { const AvxInterface *encoder, const aom_codec_enc_cfg_t *cfg) {
VpxVideoInfo info = { encoder->fourcc, AvxVideoInfo info = { encoder->fourcc,
cfg->g_w, cfg->g_w,
cfg->g_h, cfg->g_h,
{ cfg->g_timebase.num, cfg->g_timebase.den } }; { cfg->g_timebase.num, cfg->g_timebase.den } };
VpxVideoWriter *writer = NULL; AvxVideoWriter *writer = NULL;
aom_codec_ctx_t codec; aom_codec_ctx_t codec;
int frame_count = 0; int frame_count = 0;
...@@ -191,7 +191,7 @@ int main(int argc, char **argv) { ...@@ -191,7 +191,7 @@ int main(int argc, char **argv) {
aom_codec_err_t res; aom_codec_err_t res;
aom_fixed_buf_t stats; aom_fixed_buf_t stats;
const VpxInterface *encoder = NULL; const AvxInterface *encoder = NULL;
const int fps = 30; // TODO(dkovalev) add command line argument const int fps = 30; // TODO(dkovalev) add command line argument
const int bitrate = 200; // kbit/s TODO(dkovalev) add command line argument const int bitrate = 200; // kbit/s TODO(dkovalev) add command line argument
const char *const codec_arg = argv[1]; const char *const codec_arg = argv[1];
......
...@@ -38,7 +38,7 @@ static void fix_framerate(int *num, int *den) { ...@@ -38,7 +38,7 @@ static void fix_framerate(int *num, int *den) {
} }
} }
int file_is_ivf(struct VpxInputContext *input_ctx) { int file_is_ivf(struct AvxInputContext *input_ctx) {
char raw_hdr[32]; char raw_hdr[32];
int is_ivf = 0; int is_ivf = 0;
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
extern "C" { extern "C" {
#endif #endif
int file_is_ivf(struct VpxInputContext *input); int file_is_ivf(struct AvxInputContext *input);
int ivf_read_frame(FILE *infile, uint8_t **buffer, size_t *bytes_read, int ivf_read_frame(FILE *infile, uint8_t **buffer, size_t *bytes_read,
size_t *buffer_size); size_t *buffer_size);
......
...@@ -54,15 +54,15 @@ const EncodeParameters kAV1EncodeParameterSet[] = { ...@@ -54,15 +54,15 @@ const EncodeParameters kAV1EncodeParameterSet[] = {
// TODO(JBB): Test profiles (requires more work). // TODO(JBB): Test profiles (requires more work).
}; };
class VpxEncoderParmsGetToDecoder class AvxEncoderParmsGetToDecoder
: public ::libaom_test::EncoderTest, : public ::libaom_test::EncoderTest,
public ::libaom_test::CodecTestWith2Params<EncodeParameters, public ::libaom_test::CodecTestWith2Params<EncodeParameters,