Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
aom-rav1e
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yushin Cho
aom-rav1e
Commits
5082a369
Commit
5082a369
authored
Mar 29, 2016
by
Adrian Grange
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change "Vpx" to "Avx"
Change-Id: I0d1e439b75eb749dd80a86474ac5f494478d0360
parent
7df44f17
Changes
32
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
223 additions
and
223 deletions
+223
-223
aomdec.c
aomdec.c
+10
-10
aomenc.c
aomenc.c
+21
-21
aomenc.h
aomenc.h
+3
-3
examples/aom_temporal_svc_encoder.c
examples/aom_temporal_svc_encoder.c
+3
-3
examples/decode_to_md5.c
examples/decode_to_md5.c
+3
-3
examples/decode_with_drops.c
examples/decode_with_drops.c
+3
-3
examples/set_maps.c
examples/set_maps.c
+4
-4
examples/simple_decoder.c
examples/simple_decoder.c
+4
-4
examples/simple_encoder.c
examples/simple_encoder.c
+4
-4
examples/twopass_encoder.c
examples/twopass_encoder.c
+6
-6
ivfdec.c
ivfdec.c
+1
-1
ivfdec.h
ivfdec.h
+1
-1
test/encoder_parms_get_to_decoder.cc
test/encoder_parms_get_to_decoder.cc
+5
-5
test/test_intra_pred_speed.cc
test/test_intra_pred_speed.cc
+7
-7
test/variance_test.cc
test/variance_test.cc
+69
-69
test/webm_video_source.h
test/webm_video_source.h
+2
-2
test/y4m_test.cc
test/y4m_test.cc
+1
-1
tools_common.c
tools_common.c
+11
-11
tools_common.h
tools_common.h
+12
-12
video_common.h
video_common.h
+2
-2
video_reader.c
video_reader.c
+9
-9
video_reader.h
video_reader.h
+10
-10
video_writer.c
video_writer.c
+9
-9
video_writer.h
video_writer.h
+10
-10
warnings.c
warnings.c
+1
-1
warnings.h
warnings.h
+2
-2
webmdec.cc
webmdec.cc
+3
-3
webmdec.h
webmdec.h
+3
-3
webmenc.cc
webmenc.cc
+1
-1
webmenc.h
webmenc.h
+1
-1
y4menc.c
y4menc.c
+1
-1
y4menc.h
y4menc.h
+1
-1
No files found.
aomdec.c
View file @
5082a369
...
...
@@ -43,8 +43,8 @@
static
const
char
*
exec_name
;
struct
Vp
xDecInputContext
{
struct
Vp
xInputContext
*
aom_input_ctx
;
struct
Av
xDecInputContext
{
struct
Av
xInputContext
*
aom_input_ctx
;
struct
WebmInputContext
*
webm_ctx
;
};
...
...
@@ -160,7 +160,7 @@ void usage_exit(void) {
fprintf
(
stderr
,
"
\n
Included decoders:
\n\n
"
);
for
(
i
=
0
;
i
<
get_aom_decoder_count
();
++
i
)
{
const
Vp
xInterface
*
const
decoder
=
get_aom_decoder_by_index
(
i
);
const
Av
xInterface
*
const
decoder
=
get_aom_decoder_by_index
(
i
);
fprintf
(
stderr
,
" %-6s - %s
\n
"
,
decoder
->
name
,
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,
return
0
;
}
static
int
read_frame
(
struct
Vp
xDecInputContext
*
input
,
uint8_t
**
buf
,
static
int
read_frame
(
struct
Av
xDecInputContext
*
input
,
uint8_t
**
buf
,
size_t
*
bytes_in_buffer
,
size_t
*
buffer_size
)
{
switch
(
input
->
aom_input_ctx
->
file_type
)
{
#if CONFIG_WEBM_IO
...
...
@@ -273,7 +273,7 @@ static void write_image_file(const aom_image_t *img, const int planes[3],
}
}
static
int
file_is_raw
(
struct
Vp
xInputContext
*
input
)
{
static
int
file_is_raw
(
struct
Av
xInputContext
*
input
)
{
uint8_t
buf
[
32
];
int
is_raw
=
0
;
aom_codec_stream_info_t
si
;
...
...
@@ -285,7 +285,7 @@ static int file_is_raw(struct VpxInputContext *input) {
if
(
mem_get_le32
(
buf
)
<
256
*
1024
*
1024
)
{
for
(
i
=
0
;
i
<
get_aom_decoder_count
();
++
i
)
{
const
Vp
xInterface
*
const
decoder
=
get_aom_decoder_by_index
(
i
);
const
Av
xInterface
*
const
decoder
=
get_aom_decoder_by_index
(
i
);
if
(
!
aom_codec_peek_stream_info
(
decoder
->
codec_interface
(),
buf
+
4
,
32
-
4
,
&
si
))
{
is_raw
=
1
;
...
...
@@ -476,8 +476,8 @@ static int main_loop(int argc, const char **argv_) {
int
arg_skip
=
0
;
int
ec_enabled
=
0
;
int
keep_going
=
0
;
const
Vp
xInterface
*
interface
=
NULL
;
const
Vp
xInterface
*
fourcc_interface
=
NULL
;
const
Av
xInterface
*
interface
=
NULL
;
const
Av
xInterface
*
fourcc_interface
=
NULL
;
uint64_t
dx_time
=
0
;
struct
arg
arg
;
char
**
argv
,
**
argi
,
**
argj
;
...
...
@@ -508,8 +508,8 @@ static int main_loop(int argc, const char **argv_) {
MD5Context
md5_ctx
;
unsigned
char
md5_digest
[
16
];
struct
Vp
xDecInputContext
input
=
{
NULL
,
NULL
};
struct
Vp
xInputContext
aom_input_ctx
;
struct
Av
xDecInputContext
input
=
{
NULL
,
NULL
};
struct
Av
xInputContext
aom_input_ctx
;
#if CONFIG_WEBM_IO
struct
WebmInputContext
webm_ctx
;
memset
(
&
(
webm_ctx
),
0
,
sizeof
(
webm_ctx
));
...
...
aomenc.c
View file @
5082a369
...
...
@@ -96,7 +96,7 @@ static void warn_or_exit_on_error(aom_codec_ctx_t *ctx, int fatal,
va_end
(
ap
);
}
static
int
read_frame
(
struct
Vp
xInputContext
*
input_ctx
,
aom_image_t
*
img
)
{
static
int
read_frame
(
struct
Av
xInputContext
*
input_ctx
,
aom_image_t
*
img
)
{
FILE
*
f
=
input_ctx
->
file
;
y4m_input
*
y4m
=
&
input_ctx
->
y4m
;
int
shortread
=
0
;
...
...
@@ -501,7 +501,7 @@ void usage_exit(void) {
fprintf
(
stderr
,
"
\n
Included encoders:
\n\n
"
);
for
(
i
=
0
;
i
<
num_encoder
;
++
i
)
{
const
Vp
xInterface
*
const
encoder
=
get_aom_encoder_by_index
(
i
);
const
Av
xInterface
*
const
encoder
=
get_aom_encoder_by_index
(
i
);
const
char
*
defstr
=
(
i
==
(
num_encoder
-
1
))
?
"(default)"
:
""
;
fprintf
(
stderr
,
" %-6s - %s %s
\n
"
,
encoder
->
name
,
aom_codec_iface_name
(
encoder
->
codec_interface
()),
defstr
);
...
...
@@ -804,7 +804,7 @@ static void validate_positive_rational(const char *msg,
if
(
!
rat
->
den
)
die
(
"Error: %s has zero denominator
\n
"
,
msg
);
}
static
void
parse_global_config
(
struct
Vp
xEncoderConfig
*
global
,
char
**
argv
)
{
static
void
parse_global_config
(
struct
Av
xEncoderConfig
*
global
,
char
**
argv
)
{
char
**
argi
,
**
argj
;
struct
arg
arg
;
const
int
num_encoder
=
get_aom_encoder_count
();
...
...
@@ -917,7 +917,7 @@ static void parse_global_config(struct VpxEncoderConfig *global, char **argv) {
}
}
static
void
open_input_file
(
struct
Vp
xInputContext
*
input
)
{
static
void
open_input_file
(
struct
Av
xInputContext
*
input
)
{
/* Parse certain options from the input file, if possible */
input
->
file
=
strcmp
(
input
->
filename
,
"-"
)
?
fopen
(
input
->
filename
,
"rb"
)
:
set_binary_mode
(
stdin
);
...
...
@@ -963,12 +963,12 @@ static void open_input_file(struct VpxInputContext *input) {
}
}
static
void
close_input_file
(
struct
Vp
xInputContext
*
input
)
{
static
void
close_input_file
(
struct
Av
xInputContext
*
input
)
{
fclose
(
input
->
file
);
if
(
input
->
file_type
==
FILE_TYPE_Y4M
)
y4m_input_close
(
&
input
->
y4m
);
}
static
struct
stream_state
*
new_stream
(
struct
Vp
xEncoderConfig
*
global
,
static
struct
stream_state
*
new_stream
(
struct
Av
xEncoderConfig
*
global
,
struct
stream_state
*
prev
)
{
struct
stream_state
*
stream
;
...
...
@@ -1024,7 +1024,7 @@ static struct stream_state *new_stream(struct VpxEncoderConfig *global,
return
stream
;
}
static
int
parse_stream_params
(
struct
Vp
xEncoderConfig
*
global
,
static
int
parse_stream_params
(
struct
Av
xEncoderConfig
*
global
,
struct
stream_state
*
stream
,
char
**
argv
)
{
char
**
argi
,
**
argj
;
struct
arg
arg
;
...
...
@@ -1211,7 +1211,7 @@ static int parse_stream_params(struct VpxEncoderConfig *global,
} while (0)
static
void
validate_stream_config
(
const
struct
stream_state
*
stream
,
const
struct
Vp
xEncoderConfig
*
global
)
{
const
struct
Av
xEncoderConfig
*
global
)
{
const
struct
stream_state
*
streami
;
(
void
)
global
;
...
...
@@ -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
,
struct
Vp
xEncoderConfig
*
global
)
{
struct
Av
xEncoderConfig
*
global
)
{
/* Use a max keyframe interval of 5 seconds, if none was
* specified on the command line.
*/
...
...
@@ -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
,
struct
Vp
xEncoderConfig
*
global
,
struct
Vp
xInputContext
*
input
)
{
struct
Av
xEncoderConfig
*
global
,
struct
Av
xInputContext
*
input
)
{
#define SHOW(field) \
fprintf(stderr, " %-28s = %d\n", #field, stream->config.cfg.field)
...
...
@@ -1368,8 +1368,8 @@ static void show_stream_config(struct stream_state *stream,
}
static
void
open_output_file
(
struct
stream_state
*
stream
,
struct
Vp
xEncoderConfig
*
global
,
const
struct
Vp
xRational
*
pixel_aspect_ratio
)
{
struct
Av
xEncoderConfig
*
global
,
const
struct
Av
xRational
*
pixel_aspect_ratio
)
{
const
char
*
fn
=
stream
->
config
.
out_fn
;
const
struct
aom_codec_enc_cfg
*
const
cfg
=
&
stream
->
config
.
cfg
;
...
...
@@ -1418,7 +1418,7 @@ static void close_output_file(struct stream_state *stream,
}
static
void
setup_pass
(
struct
stream_state
*
stream
,
struct
Vp
xEncoderConfig
*
global
,
int
pass
)
{
struct
Av
xEncoderConfig
*
global
,
int
pass
)
{
if
(
stream
->
config
.
stats_fn
)
{
if
(
!
stats_open_file
(
&
stream
->
stats
,
stream
->
config
.
stats_fn
,
pass
))
fatal
(
"Failed to open statistics store"
);
...
...
@@ -1455,7 +1455,7 @@ static void setup_pass(struct stream_state *stream,
}
static
void
initialize_encoder
(
struct
stream_state
*
stream
,
struct
Vp
xEncoderConfig
*
global
)
{
struct
Av
xEncoderConfig
*
global
)
{
int
i
;
int
flags
=
0
;
...
...
@@ -1485,14 +1485,14 @@ static void initialize_encoder(struct stream_state *stream,
#if CONFIG_DECODERS
if
(
global
->
test_decode
!=
TEST_DECODE_OFF
)
{
const
Vp
xInterface
*
decoder
=
get_aom_decoder_by_name
(
global
->
codec
->
name
);
const
Av
xInterface
*
decoder
=
get_aom_decoder_by_name
(
global
->
codec
->
name
);
aom_codec_dec_init
(
&
stream
->
decoder
,
decoder
->
codec_interface
(),
NULL
,
0
);
}
#endif
}
static
void
encode_frame
(
struct
stream_state
*
stream
,
struct
Vp
xEncoderConfig
*
global
,
struct
aom_image
*
img
,
struct
Av
xEncoderConfig
*
global
,
struct
aom_image
*
img
,
unsigned
int
frames_in
)
{
aom_codec_pts_t
frame_start
,
next_frame_start
;
struct
aom_codec_enc_cfg
*
cfg
=
&
stream
->
config
.
cfg
;
...
...
@@ -1591,7 +1591,7 @@ static void update_quantizer_histogram(struct stream_state *stream) {
}
static
void
get_cx_data
(
struct
stream_state
*
stream
,
struct
Vp
xEncoderConfig
*
global
,
int
*
got_data
)
{
struct
Av
xEncoderConfig
*
global
,
int
*
got_data
)
{
const
aom_codec_cx_pkt_t
*
pkt
;
const
struct
aom_codec_enc_cfg
*
cfg
=
&
stream
->
config
.
cfg
;
aom_codec_iter_t
iter
=
NULL
;
...
...
@@ -1709,7 +1709,7 @@ static float usec_to_fps(uint64_t usec, unsigned int frames) {
static
void
test_decode
(
struct
stream_state
*
stream
,
enum
TestDecodeFatality
fatal
,
const
Vp
xInterface
*
codec
)
{
const
Av
xInterface
*
codec
)
{
aom_image_t
enc_img
,
dec_img
;
struct
av1_ref_frame
ref_enc
,
ref_dec
;
...
...
@@ -1795,8 +1795,8 @@ int main(int argc, const char **argv_) {
#endif
int
frame_avail
,
got_data
;
struct
Vp
xInputContext
input
;
struct
Vp
xEncoderConfig
global
;
struct
Av
xInputContext
input
;
struct
Av
xEncoderConfig
global
;
struct
stream_state
*
streams
=
NULL
;
char
**
argv
,
**
argi
;
uint64_t
cx_time
=
0
;
...
...
aomenc.h
View file @
5082a369
...
...
@@ -31,11 +31,11 @@ typedef enum {
YV12
,
// 4:2:0 with uv flipped, only 8-bit depth
}
ColorInputType
;
struct
Vp
xInterface
;
struct
Av
xInterface
;
/* Configuration elements common to all streams. */
struct
Vp
xEncoderConfig
{
const
struct
Vp
xInterface
*
codec
;
struct
Av
xEncoderConfig
{
const
struct
Av
xInterface
*
codec
;
int
passes
;
int
pass
;
int
usage
;
...
...
examples/aom_temporal_svc_encoder.c
View file @
5082a369
...
...
@@ -463,7 +463,7 @@ static void set_temporal_layer_pattern(int layering_mode,
}
int
main
(
int
argc
,
char
**
argv
)
{
Vp
xVideoWriter
*
outfile
[
AOM_TS_MAX_LAYERS
]
=
{
NULL
};
Av
xVideoWriter
*
outfile
[
AOM_TS_MAX_LAYERS
]
=
{
NULL
};
aom_codec_ctx_t
codec
;
aom_codec_enc_cfg_t
cfg
;
int
frame_cnt
=
0
;
...
...
@@ -486,7 +486,7 @@ int main(int argc, char **argv) {
#else
aom_svc_layer_id_t
layer_id
=
{
0
};
#endif
const
Vp
xInterface
*
encoder
=
NULL
;
const
Av
xInterface
*
encoder
=
NULL
;
FILE
*
infile
=
NULL
;
struct
RateControlMetrics
rc
;
int64_t
cx_time
=
0
;
...
...
@@ -650,7 +650,7 @@ int main(int argc, char **argv) {
// Open an output file for each stream.
for
(
i
=
0
;
i
<
cfg
.
ts_number_layers
;
++
i
)
{
char
file_name
[
PATH_MAX
];
Vp
xVideoInfo
info
;
Av
xVideoInfo
info
;
info
.
codec_fourcc
=
encoder
->
fourcc
;
info
.
frame_width
=
cfg
.
g_w
;
info
.
frame_height
=
cfg
.
g_h
;
...
...
examples/decode_to_md5.c
View file @
5082a369
...
...
@@ -80,9 +80,9 @@ int main(int argc, char **argv) {
int
frame_cnt
=
0
;
FILE
*
outfile
=
NULL
;
aom_codec_ctx_t
codec
;
Vp
xVideoReader
*
reader
=
NULL
;
const
Vp
xVideoInfo
*
info
=
NULL
;
const
Vp
xInterface
*
decoder
=
NULL
;
Av
xVideoReader
*
reader
=
NULL
;
const
Av
xVideoInfo
*
info
=
NULL
;
const
Av
xInterface
*
decoder
=
NULL
;
exec_name
=
argv
[
0
];
...
...
examples/decode_with_drops.c
View file @
5082a369
...
...
@@ -75,9 +75,9 @@ int main(int argc, char **argv) {
int
frame_cnt
=
0
;
FILE
*
outfile
=
NULL
;
aom_codec_ctx_t
codec
;
const
Vp
xInterface
*
decoder
=
NULL
;
Vp
xVideoReader
*
reader
=
NULL
;
const
Vp
xVideoInfo
*
info
=
NULL
;
const
Av
xInterface
*
decoder
=
NULL
;
Av
xVideoReader
*
reader
=
NULL
;
const
Av
xVideoInfo
*
info
=
NULL
;
int
n
=
0
;
int
m
=
0
;
int
is_range
=
0
;
...
...
examples/set_maps.c
View file @
5082a369
...
...
@@ -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
,
int
frame_index
,
Vp
xVideoWriter
*
writer
)
{
int
frame_index
,
Av
xVideoWriter
*
writer
)
{
int
got_pkts
=
0
;
aom_codec_iter_t
iter
=
NULL
;
const
aom_codec_cx_pkt_t
*
pkt
=
NULL
;
...
...
@@ -158,9 +158,9 @@ int main(int argc, char **argv) {
int
frame_count
=
0
;
aom_image_t
raw
;
aom_codec_err_t
res
;
Vp
xVideoInfo
info
;
Vp
xVideoWriter
*
writer
=
NULL
;
const
Vp
xInterface
*
encoder
=
NULL
;
Av
xVideoInfo
info
;
Av
xVideoWriter
*
writer
=
NULL
;
const
Av
xInterface
*
encoder
=
NULL
;
const
int
fps
=
2
;
// TODO(dkovalev) add command line argument
const
double
bits_per_pixel_per_frame
=
0
.
067
;
...
...
examples/simple_decoder.c
View file @
5082a369
...
...
@@ -34,7 +34,7 @@
// Initializing The Codec
// ----------------------
// The libaom decoder is initialized by the call to aom_codec_dec_init().
// Determining the codec interface to use is handled by
Vp
xVideoReader and the
// Determining the codec interface to use is handled by
Av
xVideoReader and the
// 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
// 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) {
int
frame_cnt
=
0
;
FILE
*
outfile
=
NULL
;
aom_codec_ctx_t
codec
;
Vp
xVideoReader
*
reader
=
NULL
;
const
Vp
xInterface
*
decoder
=
NULL
;
const
Vp
xVideoInfo
*
info
=
NULL
;
Av
xVideoReader
*
reader
=
NULL
;
const
Av
xInterface
*
decoder
=
NULL
;
const
Av
xVideoInfo
*
info
=
NULL
;
exec_name
=
argv
[
0
];
...
...
examples/simple_encoder.c
View file @
5082a369
...
...
@@ -117,7 +117,7 @@ void usage_exit(void) {
}
static
int
encode_frame
(
aom_codec_ctx_t
*
codec
,
aom_image_t
*
img
,
int
frame_index
,
int
flags
,
Vp
xVideoWriter
*
writer
)
{
int
frame_index
,
int
flags
,
Av
xVideoWriter
*
writer
)
{
int
got_pkts
=
0
;
aom_codec_iter_t
iter
=
NULL
;
const
aom_codec_cx_pkt_t
*
pkt
=
NULL
;
...
...
@@ -150,9 +150,9 @@ int main(int argc, char **argv) {
int
frame_count
=
0
;
aom_image_t
raw
;
aom_codec_err_t
res
;
Vp
xVideoInfo
info
=
{
0
};
Vp
xVideoWriter
*
writer
=
NULL
;
const
Vp
xInterface
*
encoder
=
NULL
;
Av
xVideoInfo
info
=
{
0
};
Av
xVideoWriter
*
writer
=
NULL
;
const
Av
xInterface
*
encoder
=
NULL
;
const
int
fps
=
30
;
// TODO(dkovalev) add command line argument
const
int
bitrate
=
200
;
// kbit/s TODO(dkovalev) add command line argument
int
keyframe_interval
=
0
;
...
...
examples/twopass_encoder.c
View file @
5082a369
...
...
@@ -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
,
aom_codec_pts_t
pts
,
unsigned
int
duration
,
aom_enc_frame_flags_t
flags
,
unsigned
int
deadline
,
Vp
xVideoWriter
*
writer
)
{
Av
xVideoWriter
*
writer
)
{
int
got_pkts
=
0
;
aom_codec_iter_t
iter
=
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,
}
static
aom_fixed_buf_t
pass0
(
aom_image_t
*
raw
,
FILE
*
infile
,
const
Vp
xInterface
*
encoder
,
const
Av
xInterface
*
encoder
,
const
aom_codec_enc_cfg_t
*
cfg
)
{
aom_codec_ctx_t
codec
;
int
frame_count
=
0
;
...
...
@@ -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
,
const
Vp
xInterface
*
encoder
,
const
aom_codec_enc_cfg_t
*
cfg
)
{
Vp
xVideoInfo
info
=
{
encoder
->
fourcc
,
const
Av
xInterface
*
encoder
,
const
aom_codec_enc_cfg_t
*
cfg
)
{
Av
xVideoInfo
info
=
{
encoder
->
fourcc
,
cfg
->
g_w
,
cfg
->
g_h
,
{
cfg
->
g_timebase
.
num
,
cfg
->
g_timebase
.
den
}
};
Vp
xVideoWriter
*
writer
=
NULL
;
Av
xVideoWriter
*
writer
=
NULL
;
aom_codec_ctx_t
codec
;
int
frame_count
=
0
;
...
...
@@ -191,7 +191,7 @@ int main(int argc, char **argv) {
aom_codec_err_t
res
;
aom_fixed_buf_t
stats
;
const
Vp
xInterface
*
encoder
=
NULL
;
const
Av
xInterface
*
encoder
=
NULL
;
const
int
fps
=
30
;
// 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
];
...
...
ivfdec.c
View file @
5082a369
...
...
@@ -38,7 +38,7 @@ static void fix_framerate(int *num, int *den) {
}
}
int
file_is_ivf
(
struct
Vp
xInputContext
*
input_ctx
)
{
int
file_is_ivf
(
struct
Av
xInputContext
*
input_ctx
)
{
char
raw_hdr
[
32
];
int
is_ivf
=
0
;
...
...
ivfdec.h
View file @
5082a369
...
...
@@ -17,7 +17,7 @@
extern
"C"
{
#endif
int
file_is_ivf
(
struct
Vp
xInputContext
*
input
);
int
file_is_ivf
(
struct
Av
xInputContext
*
input
);
int
ivf_read_frame
(
FILE
*
infile
,
uint8_t
**
buffer
,
size_t
*
bytes_read
,
size_t
*
buffer_size
);
...
...
test/encoder_parms_get_to_decoder.cc
View file @
5082a369
...
...
@@ -54,15 +54,15 @@ const EncodeParameters kAV1EncodeParameterSet[] = {
// TODO(JBB): Test profiles (requires more work).
};
class
Vp
xEncoderParmsGetToDecoder
class
Av
xEncoderParmsGetToDecoder
:
public
::
libaom_test
::
EncoderTest
,
public
::
libaom_test
::
CodecTestWith2Params
<
EncodeParameters
,
EncodePerfTestVideo
>
{
protected:
Vp
xEncoderParmsGetToDecoder
()
Av
xEncoderParmsGetToDecoder
()
:
EncoderTest
(
GET_PARAM
(
0
)),
encode_parms
(
GET_PARAM
(
1
))
{}
virtual
~
Vp
xEncoderParmsGetToDecoder
()
{}
virtual
~
Av
xEncoderParmsGetToDecoder
()
{}
virtual
void
SetUp
()
{
InitializeConfig
();
...
...
@@ -134,7 +134,7 @@ class VpxEncoderParmsGetToDecoder
EncodeParameters
encode_parms
;
};
TEST_P
(
Vp
xEncoderParmsGetToDecoder
,
BitstreamParms
)
{
TEST_P
(
Av
xEncoderParmsGetToDecoder
,
BitstreamParms
)
{
init_flags_
=
AOM_CODEC_USE_PSNR
;
libaom_test
::
VideoSource
*
const
video
=
...
...
@@ -145,7 +145,7 @@ TEST_P(VpxEncoderParmsGetToDecoder, BitstreamParms) {
delete
video
;
}
AV1_INSTANTIATE_TEST_CASE
(
Vp
xEncoderParmsGetToDecoder
,
AV1_INSTANTIATE_TEST_CASE
(
Av
xEncoderParmsGetToDecoder
,
::
testing
::
ValuesIn
(
kAV1EncodeParameterSet
),
::
testing
::
ValuesIn
(
kAV1EncodePerfTestVectors
));
}
// namespace
test/test_intra_pred_speed.cc
View file @
5082a369
...
...
@@ -28,7 +28,7 @@
namespace
{
typedef
void
(
*
Vp
xPredFunc
)(
uint8_t
*
dst
,
ptrdiff_t
y_stride
,
typedef
void
(
*
Av
xPredFunc
)(
uint8_t
*
dst
,
ptrdiff_t
y_stride
,
const
uint8_t
*
above
,
const
uint8_t
*
left
);
const
int
kNumAv1IntraPredFuncs
=
13
;
...
...
@@ -38,7 +38,7 @@ const char *kAv1IntraPredNames[kNumAv1IntraPredFuncs] = {
"D207_PRED"
,
"D63_PRED"
,
"TM_PRED"
};
void
TestIntraPred
(
const
char
name
[],
Vp
xPredFunc
const
*
pred_funcs
,
void
TestIntraPred
(
const
char
name
[],
Av
xPredFunc
const
*
pred_funcs
,
const
char
*
const
pred_func_names
[],
int
num_funcs
,
const
char
*
const
signatures
[],
int
block_size
,
int
num_pixels_per_test
)
{
...
...
@@ -81,7 +81,7 @@ void TestIntraPred(const char name[], VpxPredFunc const *pred_funcs,
}
}
void
TestIntraPred4
(
Vp
xPredFunc
const
*
pred_funcs
)
{
void
TestIntraPred4
(
Av
xPredFunc
const
*
pred_funcs
)
{
static
const
int
kNumAv1IntraFuncs
=
13
;
static
const
char
*
const
kSignatures
[
kNumAv1IntraFuncs
]
=
{
"4334156168b34ab599d9b5b30f522fe9"
,
"bc4649d5ba47c7ff178d92e475960fb0"
,
...
...
@@ -96,7 +96,7 @@ void TestIntraPred4(VpxPredFunc const *pred_funcs) {
kSignatures
,
4
,
4
*
4
*
kNumAv1IntraFuncs
);
}
void
TestIntraPred8
(
Vp
xPredFunc
const
*
pred_funcs
)
{
void
TestIntraPred8
(
Av
xPredFunc
const
*
pred_funcs
)
{
static
const
int
kNumAv1IntraFuncs
=
13
;
static
const
char
*
const
kSignatures
[
kNumAv1IntraFuncs
]
=
{
"7694ddeeefed887faf9d339d18850928"
,
"7d726b1213591b99f736be6dec65065b"
,
...
...
@@ -111,7 +111,7 @@ void TestIntraPred8(VpxPredFunc const *pred_funcs) {
kSignatures
,
8
,
8
*
8
*
kNumAv1IntraFuncs
);
}
void
TestIntraPred16
(
Vp
xPredFunc
const
*
pred_funcs
)
{
void
TestIntraPred16
(
Av
xPredFunc
const
*
pred_funcs
)
{
static
const
int
kNumAv1IntraFuncs
=
13
;
static
const
char
*
const
kSignatures
[
kNumAv1IntraFuncs
]
=
{
"b40dbb555d5d16a043dc361e6694fe53"
,
"fb08118cee3b6405d64c1fd68be878c6"
,
...
...
@@ -126,7 +126,7 @@ void TestIntraPred16(VpxPredFunc const *pred_funcs) {
kSignatures
,
16
,
16
*
16
*
kNumAv1IntraFuncs
);
}
void
TestIntraPred32
(
Vp
xPredFunc
const
*
pred_funcs
)
{
void
TestIntraPred32
(
Av
xPredFunc
const
*
pred_funcs
)
{
static
const
int
kNumAv1IntraFuncs
=
13
;
static
const
char
*
const
kSignatures
[
kNumAv1IntraFuncs
]
=
{
"558541656d84f9ae7896db655826febe"
,
"b3587a1f9a01495fa38c8cd3c8e2a1bf"
,
...
...
@@ -148,7 +148,7 @@ void TestIntraPred32(VpxPredFunc const *pred_funcs) {
#define INTRA_PRED_TEST(arch, test_func, dc, dc_left, dc_top, dc_128, v, h, \
d45, d135, d117, d153, d207, d63, tm) \
TEST(arch, test_func) { \
static const
Vp
xPredFunc aom_intra_pred[] = { \
static const
Av
xPredFunc aom_intra_pred[] = { \
dc, dc_left, dc_top, dc_128, v, h, d45, d135, d117, d153, d207, d63, tm \
}; \
test_func(aom_intra_pred); \
...
...
test/variance_test.cc
View file @
5082a369
...
...
@@ -708,41 +708,41 @@ void SubpelVarianceTest<SubpixAvgVarMxNFunc>::RefTest() {
}
}
typedef
MseTest
<
Get4x4SseFunc
>
Vp
xSseTest
;
typedef
MseTest
<
VarianceMxNFunc
>
Vp
xMseTest
;
typedef
VarianceTest
<
VarianceMxNFunc
>
Vp
xVarianceTest
;
typedef
SubpelVarianceTest
<
SubpixVarMxNFunc
>
Vp
xSubpelVarianceTest
;
typedef
SubpelVarianceTest
<
SubpixAvgVarMxNFunc
>
Vp
xSubpelAvgVarianceTest
;
TEST_P
(
Vp
xSseTest
,
Ref_sse
)
{
RefTest_sse
();
}
TEST_P
(
Vp
xSseTest
,
Max_sse
)
{
MaxTest_sse
();
}
TEST_P
(
Vp
xMseTest
,
Ref_mse
)
{
RefTest_mse
();
}
TEST_P
(
Vp
xMseTest
,
Max_mse
)
{
MaxTest_mse
();
}
TEST_P
(
Vp
xVarianceTest
,
Zero
)
{
ZeroTest
();
}
TEST_P
(
Vp
xVarianceTest
,
Ref
)
{
RefTest
();
}
TEST_P
(
Vp
xVarianceTest
,
RefStride
)
{
RefStrideTest
();
}
TEST_P
(
Vp
xVarianceTest
,
OneQuarter
)
{
OneQuarterTest
();
}
typedef
MseTest
<
Get4x4SseFunc
>
Av
xSseTest
;
typedef
MseTest
<
VarianceMxNFunc
>
Av
xMseTest
;
typedef
VarianceTest
<
VarianceMxNFunc
>
Av
xVarianceTest
;
typedef
SubpelVarianceTest
<
SubpixVarMxNFunc
>
Av
xSubpelVarianceTest
;
typedef
SubpelVarianceTest
<
SubpixAvgVarMxNFunc
>
Av
xSubpelAvgVarianceTest
;
TEST_P
(
Av
xSseTest
,
Ref_sse
)
{
RefTest_sse
();
}
TEST_P
(
Av
xSseTest
,
Max_sse
)
{
MaxTest_sse
();
}
TEST_P
(
Av
xMseTest
,
Ref_mse
)
{
RefTest_mse
();
}
TEST_P
(
Av
xMseTest
,
Max_mse
)
{
MaxTest_mse
();
}
TEST_P
(
Av
xVarianceTest
,
Zero
)
{
ZeroTest
();
}
TEST_P
(
Av
xVarianceTest
,
Ref
)
{
RefTest
();
}
TEST_P
(
Av
xVarianceTest
,
RefStride
)
{
RefStrideTest
();
}
TEST_P
(
Av
xVarianceTest
,
OneQuarter
)
{
OneQuarterTest
();
}
TEST_P
(
SumOfSquaresTest
,
Const
)
{
ConstTest
();
}
TEST_P
(
SumOfSquaresTest
,
Ref
)
{
RefTest
();
}
TEST_P
(
Vp
xSubpelVarianceTest
,
Ref
)
{
RefTest
();
}
TEST_P
(
Vp
xSubpelVarianceTest
,
ExtremeRef
)
{
ExtremeRefTest
();
}
TEST_P
(
Vp
xSubpelAvgVarianceTest
,
Ref
)
{
RefTest
();
}
TEST_P
(
Av
xSubpelVarianceTest
,
Ref
)
{
RefTest
();
}
TEST_P
(
Av
xSubpelVarianceTest
,
ExtremeRef
)
{
ExtremeRefTest
();
}
TEST_P
(
Av
xSubpelAvgVarianceTest
,
Ref
)
{
RefTest
();
}
INSTANTIATE_TEST_CASE_P
(
C
,
SumOfSquaresTest
,
::
testing
::
Values
(
aom_get_mb_ss_c
));
INSTANTIATE_TEST_CASE_P
(
C
,
Vp
xSseTest
,
INSTANTIATE_TEST_CASE_P
(
C
,
Av
xSseTest
,
::
testing
::
Values
(
make_tuple
(
2
,
2
,
&
aom_get4x4sse_cs_c
)));
INSTANTIATE_TEST_CASE_P
(
C
,
Vp
xMseTest
,
INSTANTIATE_TEST_CASE_P
(
C
,
Av
xMseTest
,
::
testing
::
Values
(
make_tuple
(
4
,
4
,
&
aom_mse16x16_c
),
make_tuple
(
4
,
3
,
&
aom_mse16x8_c
),
make_tuple
(
3
,
4
,
&
aom_mse8x16_c
),
make_tuple
(
3
,
3
,
&
aom_mse8x8_c
)));
INSTANTIATE_TEST_CASE_P
(
C
,
Vp
xVarianceTest
,
C
,
Av
xVarianceTest
,
::
testing
::
Values
(
make_tuple
(
6
,
6
,
&
aom_variance64x64_c
,
0
),
make_tuple
(
6
,
5
,
&
aom_variance64x32_c
,
0
),
make_tuple
(
5
,
6
,
&
aom_variance32x64_c
,
0
),
...
...
@@ -758,7 +758,7 @@ INSTANTIATE_TEST_CASE_P(
make_tuple
(
2
,
2
,
&
aom_variance4x4_c
,
0
)));
INSTANTIATE_TEST_CASE_P
(
C
,
Vp
xSubpelVarianceTest
,
C
,
Av
xSubpelVarianceTest
,
::
testing
::
Values
(
make_tuple
(
6
,
6
,
&
aom_sub_pixel_variance64x64_c
,
0
),
make_tuple
(
6
,
5
,
&
aom_sub_pixel_variance64x32_c
,
0
),
make_tuple
(
5
,
6
,
&
aom_sub_pixel_variance32x64_c
,
0
),
...
...
@@ -774,7 +774,7 @@ INSTANTIATE_TEST_CASE_P(
make_tuple
(
2
,
2
,
&
aom_sub_pixel_variance4x4_c
,
0
)));
INSTANTIATE_TEST_CASE_P
(
C
,
Vp
xSubpelAvgVarianceTest
,
C
,
Av
xSubpelAvgVarianceTest
,
::
testing
::
Values
(
make_tuple
(
6
,
6
,
&
aom_sub_pixel_avg_variance64x64_c
,
0
),
make_tuple
(
6
,
5
,
&
aom_sub_pixel_avg_variance64x32_c
,
0
),
make_tuple
(
5
,
6
,
&
aom_sub_pixel_avg_variance32x64_c
,
0
),
...
...
@@ -790,24 +790,24 @@ INSTANTIATE_TEST_CASE_P(
make_tuple
(
2
,
2
,
&
aom_sub_pixel_avg_variance4x4_c
,
0
)));
#if CONFIG_AOM_HIGHBITDEPTH
typedef
MseTest
<
VarianceMxNFunc
>
Vp
xHBDMseTest
;
typedef
VarianceTest
<
VarianceMxNFunc
>
Vp
xHBDVarianceTest
;
typedef
SubpelVarianceTest
<
SubpixVarMxNFunc
>
Vp
xHBDSubpelVarianceTest
;
typedef
SubpelVarianceTest
<
SubpixAvgVarMxNFunc
>
Vp
xHBDSubpelAvgVarianceTest
;
TEST_P
(
Vp
xHBDMseTest
,
Ref_mse
)
{
RefTest_mse
();
}
TEST_P
(
Vp
xHBDMseTest
,
Max_mse
)
{
MaxTest_mse
();
}