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
Xiph.Org
aom-rav1e
Commits
4eafefe0
Commit
4eafefe0
authored
Sep 04, 2017
by
clang-format
Committed by
James Zern
Sep 04, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apply clang-format
Change-Id: If0b48a4ee1f7902d8c6154945ccef68a2b5aabb5
parent
a3a70c38
Changes
33
Hide whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
233 additions
and
200 deletions
+233
-200
aomenc.c
aomenc.c
+4
-4
av1/common/av1_loopfilter.c
av1/common/av1_loopfilter.c
+2
-2
av1/common/cdef.c
av1/common/cdef.c
+5
-4
av1/common/cdef.h
av1/common/cdef.h
+3
-3
av1/common/cdef_block.c
av1/common/cdef_block.c
+3
-2
av1/common/reconinter.c
av1/common/reconinter.c
+5
-5
av1/decoder/decodeframe.c
av1/decoder/decodeframe.c
+5
-4
av1/encoder/av1_quantize.c
av1/encoder/av1_quantize.c
+8
-7
av1/encoder/bgsprite.c
av1/encoder/bgsprite.c
+1
-1
av1/encoder/bitstream.c
av1/encoder/bitstream.c
+7
-5
av1/encoder/encodemb.c
av1/encoder/encodemb.c
+18
-16
av1/encoder/encodemv.c
av1/encoder/encodemv.c
+4
-3
av1/encoder/encoder.c
av1/encoder/encoder.c
+6
-4
av1/encoder/ethread.c
av1/encoder/ethread.c
+6
-4
av1/encoder/rdopt.c
av1/encoder/rdopt.c
+22
-18
av1/encoder/tokenize.c
av1/encoder/tokenize.c
+1
-1
test/av1_quantize_test.cc
test/av1_quantize_test.cc
+2
-2
test/boolcoder_test.cc
test/boolcoder_test.cc
+2
-2
test/datarate_test.cc
test/datarate_test.cc
+2
-2
test/dct16x16_test.cc
test/dct16x16_test.cc
+2
-2
test/decode_test_driver.cc
test/decode_test_driver.cc
+4
-4
test/fdct8x8_test.cc
test/fdct8x8_test.cc
+2
-2
test/hiprec_convolve_test_util.cc
test/hiprec_convolve_test_util.cc
+6
-6
test/ivf_video_source.h
test/ivf_video_source.h
+2
-2
test/minmax_test.cc
test/minmax_test.cc
+4
-4
test/quantize_func_test.cc
test/quantize_func_test.cc
+2
-2
test/register_state_check.h
test/register_state_check.h
+2
-2
test/resize_test.cc
test/resize_test.cc
+8
-8
test/simd_cmp_impl.h
test/simd_cmp_impl.h
+4
-4
test/webm_video_source.h
test/webm_video_source.h
+2
-2
test/y4m_video_source.h
test/y4m_video_source.h
+2
-2
test/yuv_video_source.h
test/yuv_video_source.h
+2
-2
y4minput.c
y4minput.c
+85
-69
No files found.
aomenc.c
View file @
4eafefe0
...
...
@@ -482,8 +482,8 @@ static const struct arg_enum_list color_space_enum[] = {
};
static
const
arg_def_t
input_color_space
=
ARG_DEF_ENUM
(
NULL
,
"color-space"
,
1
,
"The color space of input content:"
,
color_space_enum
);
ARG_DEF_ENUM
(
NULL
,
"color-space"
,
1
,
"The color space of input content:"
,
color_space_enum
);
static
const
struct
arg_enum_list
transfer_function_enum
[]
=
{
{
"unknown"
,
AOM_TF_UNKNOWN
},
...
...
@@ -494,8 +494,8 @@ static const struct arg_enum_list transfer_function_enum[] = {
};
static
const
arg_def_t
input_transfer_function
=
ARG_DEF_ENUM
(
NULL
,
"transfer-function"
,
1
,
"The transfer function of input content:"
,
transfer_function_enum
);
NULL
,
"transfer-function"
,
1
,
"The transfer function of input content:"
,
transfer_function_enum
);
static
const
struct
arg_enum_list
chroma_sample_position_enum
[]
=
{
{
"unknown"
,
AOM_CSP_UNKNOWN
},
...
...
av1/common/av1_loopfilter.c
View file @
4eafefe0
...
...
@@ -3344,8 +3344,8 @@ void av1_loop_filter_rows(YV12_BUFFER_CONFIG *frame_buffer, AV1_COMMON *cm,
MODE_INFO
**
mi
=
cm
->
mi_grid_visible
+
mi_row
*
cm
->
mi_stride
;
#if CONFIG_VAR_TX
for
(
int
i
=
0
;
i
<
MAX_MB_PLANE
;
++
i
)
memset
(
cm
->
left_txfm_context
[
i
],
TX_32X32
,
MAX_MIB_SIZE
<<
TX_UNIT_HIGH_LOG2
);
memset
(
cm
->
left_txfm_context
[
i
],
TX_32X32
,
MAX_MIB_SIZE
<<
TX_UNIT_HIGH_LOG2
);
#endif // CONFIG_VAR_TX
for
(
mi_col
=
0
;
mi_col
<
cm
->
mi_cols
;
mi_col
+=
cm
->
mib_size
)
{
av1_setup_dst_planes
(
planes
,
cm
->
sb_size
,
frame_buffer
,
mi_row
,
mi_col
);
...
...
av1/common/cdef.c
View file @
4eafefe0
...
...
@@ -394,13 +394,14 @@ void av1_cdef_frame(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
if
(
cm
->
use_highbitdepth
)
{
cdef_filter_fb
(
#if CONFIG_CDEF_SINGLEPASS
NULL
,
&
CONVERT_TO_SHORTPTR
(
xd
->
plane
[
pli
].
dst
.
buf
)
NULL
,
&
CONVERT_TO_SHORTPTR
(
xd
->
plane
[
pli
].
dst
.
buf
)
#else
(
uint8_t
*
)
&
CONVERT_TO_SHORTPTR
(
xd
->
plane
[
pli
].
dst
.
buf
)
#endif
[
xd
->
plane
[
pli
].
dst
.
stride
*
(
MI_SIZE_64X64
*
fbr
<<
mi_high_l2
[
pli
])
+
(
fbc
*
MI_SIZE_64X64
<<
mi_wide_l2
[
pli
])],
[
xd
->
plane
[
pli
].
dst
.
stride
*
(
MI_SIZE_64X64
*
fbr
<<
mi_high_l2
[
pli
])
+
(
fbc
*
MI_SIZE_64X64
<<
mi_wide_l2
[
pli
])],
#if CONFIG_CDEF_SINGLEPASS
xd
->
plane
[
pli
].
dst
.
stride
,
#else
...
...
av1/common/cdef.h
View file @
4eafefe0
...
...
@@ -27,9 +27,9 @@ static INLINE int sign(int i) { return i < 0 ? -1 : 1; }
static
INLINE
int
constrain
(
int
diff
,
int
threshold
,
unsigned
int
damping
)
{
return
threshold
?
sign
(
diff
)
*
AOMMIN
(
abs
(
diff
)
,
AOMMAX
(
0
,
threshold
-
(
abs
(
diff
)
>>
AOMMIN
(
abs
(
diff
),
AOMMAX
(
0
,
threshold
-
(
abs
(
diff
)
>>
(
damping
-
get_msb
(
threshold
)))))
:
0
;
}
...
...
av1/common/cdef_block.c
View file @
4eafefe0
...
...
@@ -572,8 +572,9 @@ void cdef_filter_fb(uint8_t *dst8, uint16_t *dst16, int dstride, uint16_t *in,
pri_damping
,
sec_damping
,
bsize
,
(
256
<<
coeff_shift
)
-
1
);
else
cdef_filter_block
(
NULL
,
&
dst16
[
dirinit
?
bi
<<
(
bsizex
+
bsizey
)
:
(
by
<<
bsizey
)
*
dstride
+
(
bx
<<
bsizex
)],
NULL
,
&
dst16
[
dirinit
?
bi
<<
(
bsizex
+
bsizey
)
:
(
by
<<
bsizey
)
*
dstride
+
(
bx
<<
bsizex
)],
dirinit
?
1
<<
bsizex
:
dstride
,
&
in
[(
by
*
CDEF_BSTRIDE
<<
bsizey
)
+
(
bx
<<
bsizex
)],
(
pli
?
t
:
adjust_strength
(
t
,
var
[
by
][
bx
])),
s
,
t
?
dir
[
by
][
bx
]
:
0
,
...
...
av1/common/reconinter.c
View file @
4eafefe0
...
...
@@ -1650,11 +1650,11 @@ static INLINE void build_inter_predictors(
if
(
conv_params
.
do_post_rounding
)
{
#if CONFIG_HIGHBITDEPTH
if
(
xd
->
cur_buf
->
flags
&
YV12_FLAG_HIGHBITDEPTH
)
av1_highbd_convolve_rounding
(
tmp_dst
,
MAX_SB_SIZE
,
dst
,
dst_buf
->
stride
,
w
,
h
,
FILTER_BITS
*
2
+
is_compound
-
conv_params
.
round_0
-
conv_params
.
round_1
,
xd
->
bd
);
av1_highbd_convolve_rounding
(
tmp_dst
,
MAX_SB_SIZE
,
dst
,
dst_buf
->
stride
,
w
,
h
,
FILTER_BITS
*
2
+
is_compound
-
conv_params
.
round_0
-
conv_params
.
round_1
,
xd
->
bd
);
else
#endif // CONFIG_HIGHBITDEPTH
#if CONFIG_EXT_INTER && CONFIG_COMPOUND_SINGLEREF
...
...
av1/decoder/decodeframe.c
View file @
4eafefe0
...
...
@@ -341,10 +341,11 @@ static int av1_pvq_decode_helper(MACROBLOCKD *xd, tran_low_t *ref_coeff,
pvq_dc_quant
=
1
;
else
{
if
(
use_activity_masking
)
pvq_dc_quant
=
OD_MAXI
(
1
,
(
quant
[
0
]
<<
(
OD_COEFF_SHIFT
-
3
)
>>
hbd_downshift
)
*
dec
->
state
.
pvq_qm_q4
[
pli
][
od_qm_get_index
(
bs
,
0
)]
>>
4
);
pvq_dc_quant
=
OD_MAXI
(
1
,
(
quant
[
0
]
<<
(
OD_COEFF_SHIFT
-
3
)
>>
hbd_downshift
)
*
dec
->
state
.
pvq_qm_q4
[
pli
][
od_qm_get_index
(
bs
,
0
)]
>>
4
);
else
pvq_dc_quant
=
OD_MAXI
(
1
,
quant
[
0
]
<<
(
OD_COEFF_SHIFT
-
3
)
>>
hbd_downshift
);
...
...
av1/encoder/av1_quantize.c
View file @
4eafefe0
...
...
@@ -1618,15 +1618,16 @@ void av1_init_plane_quantizers(const AV1_COMP *cpi, MACROBLOCK *x,
#if CONFIG_DELTA_Q
#if CONFIG_EXT_DELTA_Q
int
current_q_index
=
AOMMAX
(
0
,
AOMMIN
(
QINDEX_RANGE
-
1
,
cpi
->
oxcf
.
deltaq_mode
!=
NO_DELTA_Q
?
cm
->
base_qindex
+
xd
->
delta_qindex
:
cm
->
base_qindex
));
int
current_q_index
=
AOMMAX
(
0
,
AOMMIN
(
QINDEX_RANGE
-
1
,
cpi
->
oxcf
.
deltaq_mode
!=
NO_DELTA_Q
?
cm
->
base_qindex
+
xd
->
delta_qindex
:
cm
->
base_qindex
));
#else
int
current_q_index
=
AOMMAX
(
0
,
AOMMIN
(
QINDEX_RANGE
-
1
,
cm
->
delta_q_present_flag
?
cm
->
base_qindex
+
xd
->
delta_qindex
:
cm
->
base_qindex
));
0
,
AOMMIN
(
QINDEX_RANGE
-
1
,
cm
->
delta_q_present_flag
?
cm
->
base_qindex
+
xd
->
delta_qindex
:
cm
->
base_qindex
));
#endif
const
int
qindex
=
av1_get_qindex
(
&
cm
->
seg
,
segment_id
,
current_q_index
);
#else
...
...
av1/encoder/bgsprite.c
View file @
4eafefe0
...
...
@@ -1072,7 +1072,7 @@ static void stitch_images(AV1_COMP *cpi, YV12_BUFFER_CONFIG **const frames,
build_mask
(
x_min
[
center_idx
],
y_min
[
center_idx
],
x_offset
,
y_offset
,
x_block_width
,
y_block_height
,
N_1
,
(
const
YuvPixelGaussian
**
)
gauss
,
(
YV12_BUFFER_CONFIG
*
const
)
frames
[
center_idx
],
panorama
,
mask
);
(
YV12_BUFFER_CONFIG
*
const
)
frames
[
center_idx
],
panorama
,
mask
);
YV12_BUFFER_CONFIG
temporal_arf
;
memset
(
&
temporal_arf
,
0
,
sizeof
(
temporal_arf
));
...
...
av1/encoder/bitstream.c
View file @
4eafefe0
...
...
@@ -3122,9 +3122,10 @@ static void write_modes_sb(AV1_COMP *const cpi, const TileInfo *const tile,
width
+=
width_step
)
{
if
(
!
sb_all_skip
(
cm
,
mi_row
+
height
,
mi_col
+
width
))
aom_write_literal
(
w
,
cm
->
mi_grid_visible
[(
mi_row
+
height
)
*
cm
->
mi_stride
+
(
mi_col
+
width
)]
->
mbmi
.
cdef_strength
,
w
,
cm
->
mi_grid_visible
[(
mi_row
+
height
)
*
cm
->
mi_stride
+
(
mi_col
+
width
)]
->
mbmi
.
cdef_strength
,
cm
->
cdef_bits
);
}
}
...
...
@@ -3252,8 +3253,9 @@ static void encode_restoration_mode(AV1_COMMON *cm,
int
s
=
AOMMIN
(
cm
->
subsampling_x
,
cm
->
subsampling_y
);
if
(
s
&&
(
cm
->
rst_info
[
1
].
frame_restoration_type
!=
RESTORE_NONE
||
cm
->
rst_info
[
2
].
frame_restoration_type
!=
RESTORE_NONE
))
{
aom_wb_write_bit
(
wb
,
cm
->
rst_info
[
1
].
restoration_tilesize
!=
cm
->
rst_info
[
0
].
restoration_tilesize
);
aom_wb_write_bit
(
wb
,
cm
->
rst_info
[
1
].
restoration_tilesize
!=
cm
->
rst_info
[
0
].
restoration_tilesize
);
assert
(
cm
->
rst_info
[
1
].
restoration_tilesize
==
cm
->
rst_info
[
0
].
restoration_tilesize
||
cm
->
rst_info
[
1
].
restoration_tilesize
==
...
...
av1/encoder/encodemb.c
View file @
4eafefe0
...
...
@@ -1168,10 +1168,11 @@ PVQ_SKIP_TYPE av1_pvq_encode_helper(MACROBLOCK *x, tran_low_t *const coeff,
// DC quantizer for PVQ
if
(
use_activity_masking
)
pvq_dc_quant
=
OD_MAXI
(
1
,
(
quant
[
0
]
<<
(
OD_COEFF_SHIFT
-
3
)
>>
hbd_downshift
)
*
daala_enc
->
state
.
pvq_qm_q4
[
plane
][
od_qm_get_index
(
tx_size
,
0
)]
>>
4
);
OD_MAXI
(
1
,
(
quant
[
0
]
<<
(
OD_COEFF_SHIFT
-
3
)
>>
hbd_downshift
)
*
daala_enc
->
state
.
pvq_qm_q4
[
plane
][
od_qm_get_index
(
tx_size
,
0
)]
>>
4
);
else
pvq_dc_quant
=
OD_MAXI
(
1
,
quant
[
0
]
<<
(
OD_COEFF_SHIFT
-
3
)
>>
hbd_downshift
);
...
...
@@ -1205,18 +1206,19 @@ PVQ_SKIP_TYPE av1_pvq_encode_helper(MACROBLOCK *x, tran_low_t *const coeff,
out_int32
[
0
]
=
OD_DIV_R0
(
in_int32
[
0
]
-
ref_int32
[
0
],
pvq_dc_quant
);
}
ac_dc_coded
=
od_pvq_encode
(
daala_enc
,
ref_int32
,
in_int32
,
out_int32
,
OD_MAXI
(
1
,
quant
[
0
]
<<
(
OD_COEFF_SHIFT
-
3
)
>>
hbd_downshift
),
// scale/quantizer
OD_MAXI
(
1
,
quant
[
1
]
<<
(
OD_COEFF_SHIFT
-
3
)
>>
hbd_downshift
),
// scale/quantizer
plane
,
tx_size
,
OD_PVQ_BETA
[
use_activity_masking
][
plane
][
tx_size
],
0
,
// is_keyframe,
daala_enc
->
state
.
qm
+
off
,
daala_enc
->
state
.
qm_inv
+
off
,
speed
,
// speed
pvq_info
);
ac_dc_coded
=
od_pvq_encode
(
daala_enc
,
ref_int32
,
in_int32
,
out_int32
,
OD_MAXI
(
1
,
quant
[
0
]
<<
(
OD_COEFF_SHIFT
-
3
)
>>
hbd_downshift
),
// scale/quantizer
OD_MAXI
(
1
,
quant
[
1
]
<<
(
OD_COEFF_SHIFT
-
3
)
>>
hbd_downshift
),
// scale/quantizer
plane
,
tx_size
,
OD_PVQ_BETA
[
use_activity_masking
][
plane
][
tx_size
],
0
,
// is_keyframe,
daala_enc
->
state
.
qm
+
off
,
daala_enc
->
state
.
qm_inv
+
off
,
speed
,
// speed
pvq_info
);
// Encode residue of DC coeff, if required.
if
(
!
has_dc_skip
||
out_int32
[
0
])
{
...
...
av1/encoder/encodemv.c
View file @
4eafefe0
...
...
@@ -70,9 +70,10 @@ static void encode_mv_component(aom_writer *w, int comp, nmv_component *mvcomp,
if
(
precision
>
MV_SUBPEL_NONE
)
#endif // CONFIG_INTRABC
{
aom_write_symbol
(
w
,
fr
,
mv_class
==
MV_CLASS_0
?
mvcomp
->
class0_fp_cdf
[
d
]
:
mvcomp
->
fp_cdf
,
MV_FP_SIZE
);
aom_write_symbol
(
w
,
fr
,
mv_class
==
MV_CLASS_0
?
mvcomp
->
class0_fp_cdf
[
d
]
:
mvcomp
->
fp_cdf
,
MV_FP_SIZE
);
}
// High precision bit
...
...
av1/encoder/encoder.c
View file @
4eafefe0
...
...
@@ -2574,12 +2574,14 @@ AV1_COMP *av1_create_compressor(AV1EncoderConfig *oxcf,
#endif
CHECK_MEM_ERROR
(
cm
,
cpi
->
td
.
mb
.
above_pred_buf
,
(
uint8_t
*
)
aom_memalign
(
16
,
buf_scaler
*
MAX_MB_PLANE
*
MAX_SB_SQUARE
*
sizeof
(
*
cpi
->
td
.
mb
.
above_pred_buf
)));
(
uint8_t
*
)
aom_memalign
(
16
,
buf_scaler
*
MAX_MB_PLANE
*
MAX_SB_SQUARE
*
sizeof
(
*
cpi
->
td
.
mb
.
above_pred_buf
)));
CHECK_MEM_ERROR
(
cm
,
cpi
->
td
.
mb
.
left_pred_buf
,
(
uint8_t
*
)
aom_memalign
(
16
,
buf_scaler
*
MAX_MB_PLANE
*
MAX_SB_SQUARE
*
sizeof
(
*
cpi
->
td
.
mb
.
left_pred_buf
)));
(
uint8_t
*
)
aom_memalign
(
16
,
buf_scaler
*
MAX_MB_PLANE
*
MAX_SB_SQUARE
*
sizeof
(
*
cpi
->
td
.
mb
.
left_pred_buf
)));
CHECK_MEM_ERROR
(
cm
,
cpi
->
td
.
mb
.
wsrc_buf
,
(
int32_t
*
)
aom_memalign
(
...
...
av1/encoder/ethread.c
View file @
4eafefe0
...
...
@@ -96,12 +96,14 @@ void av1_encode_tiles_mt(AV1_COMP *cpi) {
#endif
CHECK_MEM_ERROR
(
cm
,
thread_data
->
td
->
above_pred_buf
,
(
uint8_t
*
)
aom_memalign
(
16
,
buf_scaler
*
MAX_MB_PLANE
*
MAX_SB_SQUARE
*
sizeof
(
*
thread_data
->
td
->
above_pred_buf
)));
16
,
buf_scaler
*
MAX_MB_PLANE
*
MAX_SB_SQUARE
*
sizeof
(
*
thread_data
->
td
->
above_pred_buf
)));
CHECK_MEM_ERROR
(
cm
,
thread_data
->
td
->
left_pred_buf
,
(
uint8_t
*
)
aom_memalign
(
16
,
buf_scaler
*
MAX_MB_PLANE
*
MAX_SB_SQUARE
*
sizeof
(
*
thread_data
->
td
->
left_pred_buf
)));
16
,
buf_scaler
*
MAX_MB_PLANE
*
MAX_SB_SQUARE
*
sizeof
(
*
thread_data
->
td
->
left_pred_buf
)));
CHECK_MEM_ERROR
(
cm
,
thread_data
->
td
->
wsrc_buf
,
(
int32_t
*
)
aom_memalign
(
...
...
av1/encoder/rdopt.c
View file @
4eafefe0
...
...
@@ -6240,9 +6240,9 @@ static void joint_motion_search(const AV1_COMP *cpi, MACROBLOCK *x,
assert(frame_comp_mv);
}
assert(has_second_ref(mbmi) || is_inter_singleref_comp_mode(mbmi->mode));
const int refs[2] = { mbmi->ref_frame[0],
has_second_ref(mbmi)
? mbmi->ref_frame[1]
: mbmi->ref_frame[0] };
const int refs[2] = { mbmi->ref_frame[0],
has_second_ref(mbmi)
? mbmi->ref_frame[1]
: mbmi->ref_frame[0] };
#else
assert(has_second_ref(mbmi));
const int refs[2] = { mbmi->ref_frame[0], mbmi->ref_frame[1] };
...
...
@@ -11101,10 +11101,11 @@ void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data,
x->rdmult, rate2 + av1_cost_bit(av1_get_skip_prob(cm, xd), 0),
distortion2);
else
tmp_ref_rd = RDCOST(
x->rdmult, rate2 + av1_cost_bit(av1_get_skip_prob(cm, xd), 1) -
rate_y - rate_uv,
total_sse);
tmp_ref_rd =
RDCOST(x->rdmult,
rate2 + av1_cost_bit(av1_get_skip_prob(cm, xd), 1) -
rate_y - rate_uv,
total_sse);
}
#if CONFIG_VAR_TX
for (i = 0; i < MAX_MB_PLANE; ++i)
...
...
@@ -11277,16 +11278,18 @@ void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data,
if (RDCOST(x->rdmult, tmp_rd_stats_y.rate + tmp_rd_stats_uv.rate,
tmp_rd_stats.dist) <
RDCOST(x->rdmult, 0, tmp_rd_stats.sse))
tmp_alt_rd = RDCOST(
x->rdmult, tmp_rd_stats.rate +
av1_cost_bit(av1_get_skip_prob(cm, xd), 0),
tmp_rd_stats.dist);
tmp_alt_rd =
RDCOST(x->rdmult,
tmp_rd_stats.rate +
av1_cost_bit(av1_get_skip_prob(cm, xd), 0),
tmp_rd_stats.dist);
else
tmp_alt_rd = RDCOST(
x->rdmult, tmp_rd_stats.rate +
av1_cost_bit(av1_get_skip_prob(cm, xd), 1) -
tmp_rd_stats_y.rate - tmp_rd_stats_uv.rate,
tmp_rd_stats.sse);
tmp_alt_rd =
RDCOST(x->rdmult,
tmp_rd_stats.rate +
av1_cost_bit(av1_get_skip_prob(cm, xd), 1) -
tmp_rd_stats_y.rate - tmp_rd_stats_uv.rate,
tmp_rd_stats.sse);
#endif // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION
}
...
...
@@ -12573,8 +12576,9 @@ void av1_check_ncobmc_rd(const struct AV1_COMP *cpi, struct macroblock *x,
}
if (rd_causal >
RDCOST(x->rdmult, rd_stats_y.rate + rd_stats_uv.rate +
av1_cost_bit(cm->fc->motion_mode_prob[bsize][0], 1),
RDCOST(x->rdmult,
rd_stats_y.rate + rd_stats_uv.rate +
av1_cost_bit(cm->fc->motion_mode_prob[bsize][0], 1),
(rd_stats_y.dist + rd_stats_uv.dist))) {
x->skip = skip_blk;
} else {
...
...
av1/encoder/tokenize.c
View file @
4eafefe0
...
...
@@ -464,7 +464,7 @@ static void tokenize_pvq(int plane, int block, int blk_row, int blk_col,
assert
(
block
<
MAX_PVQ_BLOCKS_IN_SB
);
pvq_info
=
&
x
->
pvq
[
block
][
plane
];
add_pvq_block
((
AV1_COMMON
*
const
)
cm
,
x
,
pvq_info
);
add_pvq_block
((
AV1_COMMON
*
const
)
cm
,
x
,
pvq_info
);
}
#endif // CONFIG_PVQ
...
...
test/av1_quantize_test.cc
View file @
4eafefe0
...
...
@@ -99,8 +99,8 @@ class AV1QuantizeTest : public ::testing::TestWithParam<QuantizeFuncParams> {
for
(
int
j
=
0
;
j
<
count
;
++
j
)
{
err_count
+=
(
ref_qcoeff_ptr
[
j
]
!=
qcoeff_ptr
[
j
])
|
(
ref_dqcoeff_ptr
[
j
]
!=
dqcoeff_ptr
[
j
]);
EXPECT_EQ
(
ref_qcoeff_ptr
[
j
],
qcoeff_ptr
[
j
])
<<
"qcoeff error: i = "
<<
i
<<
" j = "
<<
j
<<
"
\n
"
;
EXPECT_EQ
(
ref_qcoeff_ptr
[
j
],
qcoeff_ptr
[
j
])
<<
"qcoeff error: i = "
<<
i
<<
" j = "
<<
j
<<
"
\n
"
;
EXPECT_EQ
(
ref_dqcoeff_ptr
[
j
],
dqcoeff_ptr
[
j
])
<<
"dqcoeff error: i = "
<<
i
<<
" j = "
<<
j
<<
"
\n
"
;
}
...
...
test/boolcoder_test.cc
View file @
4eafefe0
...
...
@@ -116,8 +116,8 @@ TEST(AV1, TestTell) {
aom_read
(
&
br
,
p
,
NULL
);
uint32_t
tell
=
aom_reader_tell
(
&
br
);
uint32_t
tell_frac
=
aom_reader_tell_frac
(
&
br
);
GTEST_ASSERT_GE
(
tell
,
last_tell
)
<<
"tell: "
<<
tell
<<
", last_tell: "
<<
last_tell
;
GTEST_ASSERT_GE
(
tell
,
last_tell
)
<<
"tell: "
<<
tell
<<
", last_tell: "
<<
last_tell
;
GTEST_ASSERT_GE
(
tell_frac
,
last_tell_frac
)
<<
"tell_frac: "
<<
tell_frac
<<
", last_tell_frac: "
<<
last_tell_frac
;
...
...
test/datarate_test.cc
View file @
4eafefe0
...
...
@@ -89,8 +89,8 @@ class DatarateTestLarge
duration
*
timebase_
*
cfg_
.
rc_target_bitrate
*
1000
);
// Buffer should not go negative.
ASSERT_GE
(
bits_in_buffer_model_
,
0
)
<<
"Buffer Underrun at frame "
<<
pkt
->
data
.
frame
.
pts
;
ASSERT_GE
(
bits_in_buffer_model_
,
0
)
<<
"Buffer Underrun at frame "
<<
pkt
->
data
.
frame
.
pts
;
const
size_t
frame_size_in_bits
=
pkt
->
data
.
frame
.
sz
*
8
;
...
...
test/dct16x16_test.cc
View file @
4eafefe0
...
...
@@ -510,8 +510,8 @@ class Trans16x16TestBase {
const
int
diff
=
dst
[
j
]
-
src
[
j
];
#endif // CONFIG_HIGHBITDEPTH
const
uint32_t
error
=
diff
*
diff
;
EXPECT_GE
(
1u
,
error
)
<<
"Error: 16x16 IDCT has error "
<<
error
<<
" at index "
<<
j
;
EXPECT_GE
(
1u
,
error
)
<<
"Error: 16x16 IDCT has error "
<<
error
<<
" at index "
<<
j
;
}
}
}
...
...
test/decode_test_driver.cc
View file @
4eafefe0
...
...
@@ -60,13 +60,13 @@ void DecoderTest::HandlePeekResult(Decoder *const decoder,
* pass it is not a keyframe, so we only expect AOM_CODEC_OK on the first
* frame, which must be a keyframe. */
if
(
video
->
frame_number
()
==
0
)
ASSERT_EQ
(
AOM_CODEC_OK
,
res_peek
)
<<
"Peek return failed: "
<<
aom_codec_err_to_string
(
res_peek
);
ASSERT_EQ
(
AOM_CODEC_OK
,
res_peek
)
<<
"Peek return failed: "
<<
aom_codec_err_to_string
(
res_peek
);
}
else
{
/* The Av1 implementation of PeekStream returns an error only if the
* data passed to it isn't a valid Av1 chunk. */
ASSERT_EQ
(
AOM_CODEC_OK
,
res_peek
)
<<
"Peek return failed: "
<<
aom_codec_err_to_string
(
res_peek
);
ASSERT_EQ
(
AOM_CODEC_OK
,
res_peek
)
<<
"Peek return failed: "
<<
aom_codec_err_to_string
(
res_peek
);
}
}
...
...
test/fdct8x8_test.cc
View file @
4eafefe0
...
...
@@ -485,8 +485,8 @@ class FwdTrans8x8TestBase {
const
int
diff
=
dst
[
j
]
-
ref
[
j
];
#endif
const
uint32_t
error
=
diff
*
diff
;
EXPECT_EQ
(
0u
,
error
)
<<
"Error: 8x8 IDCT has error "
<<
error
<<
" at index "
<<
j
;
EXPECT_EQ
(
0u
,
error
)
<<
"Error: 8x8 IDCT has error "
<<
error
<<
" at index "
<<
j
;
}
}
}
...
...
test/hiprec_convolve_test_util.cc
View file @
4eafefe0
...
...
@@ -100,9 +100,9 @@ void AV1HiprecConvolveTest::RunCheckOutput(hiprec_convolve_func test_impl) {
vkernel
,
16
,
out_w
,
out_h
);
for
(
j
=
0
;
j
<
out_w
*
out_h
;
++
j
)
ASSERT_EQ
(
output
[
j
],
output2
[
j
])
<<
"Pixel mismatch at index "
<<
j
<<
" = ("
<<
(
j
%
out_w
)
<<
", "
<<
(
j
/
out_w
)
<<
") on iteration "
<<
i
;
ASSERT_EQ
(
output
[
j
],
output2
[
j
])
<<
"Pixel mismatch at index "
<<
j
<<
" = ("
<<
(
j
%
out_w
)
<<
", "
<<
(
j
/
out_w
)
<<
") on iteration "
<<
i
;
}
delete
[]
input_
;
delete
[]
output
;
...
...
@@ -175,9 +175,9 @@ void AV1HighbdHiprecConvolveTest::RunCheckOutput(
hkernel
,
16
,
vkernel
,
16
,
out_w
,
out_h
,
bd
);
for
(
j
=
0
;
j
<
out_w
*
out_h
;
++
j
)
ASSERT_EQ
(
output
[
j
],
output2
[
j
])
<<
"Pixel mismatch at index "
<<
j
<<
" = ("
<<
(
j
%
out_w
)
<<
", "
<<
(
j
/
out_w
)
<<
") on iteration "
<<
i
;
ASSERT_EQ
(
output
[
j
],
output2
[
j
])
<<
"Pixel mismatch at index "
<<
j
<<
" = ("
<<
(
j
%
out_w
)
<<
", "
<<
(
j
/
out_w
)
<<
") on iteration "
<<
i
;
}
delete
[]
input
;
delete
[]
output
;
...
...
test/ivf_video_source.h
View file @
4eafefe0
...
...
@@ -48,8 +48,8 @@ class IVFVideoSource : public CompressedVideoSource {
virtual
void
Begin
()
{
input_file_
=
OpenTestDataFile
(
file_name_
);
ASSERT_TRUE
(
input_file_
!=
NULL
)
<<
"Input file open failed. Filename: "
<<
file_name_
;
ASSERT_TRUE
(
input_file_
!=
NULL
)
<<
"Input file open failed. Filename: "
<<
file_name_
;
// Read file header
uint8_t
file_hdr
[
kIvfFileHdrSize
];
...
...
test/minmax_test.cc
View file @
4eafefe0
...
...
@@ -108,10 +108,10 @@ TEST_P(MinMaxTest, CompareReferenceAndVaryStride) {
int
min_ref
,
max_ref
,
min
,
max
;
reference_minmax
(
a
,
a_stride
,
b
,
b_stride
,
&
min_ref
,
&
max_ref
);
ASM_REGISTER_STATE_CHECK
(
mm_func_
(
a
,
a_stride
,
b
,
b_stride
,
&
min
,
&
max
));
EXPECT_EQ
(
max_ref
,
max
)
<<
"when a_stride = "
<<
a_stride
<<
" and b_stride = "
<<
b_stride
;
EXPECT_EQ
(
min_ref
,
min
)
<<
"when a_stride = "
<<
a_stride
<<
" and b_stride = "
<<
b_stride
;
EXPECT_EQ
(
max_ref
,
max
)
<<
"when a_stride = "
<<
a_stride
<<
" and b_stride = "
<<
b_stride
;
EXPECT_EQ
(
min_ref
,
min
)
<<
"when a_stride = "
<<
a_stride
<<
" and b_stride = "
<<
b_stride
;
}
}
}
...
...
test/quantize_func_test.cc
View file @
4eafefe0
...
...
@@ -157,8 +157,8 @@ class QuantizeTest : public ::testing::TestWithParam<QuantizeParam> {
<<
" Q: "
<<
q
<<
" coeff: "
<<
coeff_ptr
[
j
];
}
ASSERT_EQ
(
eob
[
0
],
eob
[
1
])
<<
"eobs mismatch on test: "
<<
i
<<
" Q: "
<<
q
;
ASSERT_EQ
(
eob
[
0
],
eob
[
1
])
<<
"eobs mismatch on test: "
<<
i
<<
" Q: "
<<
q
;
}
}
...
...
test/register_state_check.h
View file @
4eafefe0
...
...
@@ -119,8 +119,8 @@ class RegisterStateCheck {
int64_t
post_store
[
8
];
aom_push_neon
(
post_store
);
for
(
int
i
=
0
;
i
<
8
;
++
i
)
{
EXPECT_EQ
(
pre_store_
[
i
],
post_store
[
i
])
<<
"d"
<<
i
+
8
<<
" has been modified"
;
EXPECT_EQ
(
pre_store_
[
i
],
post_store
[
i
])
<<
"d"
<<
i
+
8
<<
" has been modified"
;
}
return
!
testing
::
Test
::
HasNonfatalFailure
();
}
...
...
test/resize_test.cc
View file @
4eafefe0
...
...
@@ -298,10 +298,10 @@ TEST_P(ResizeTest, TestExternalResizeWorks) {
unsigned
int
expected_h
;
ScaleForFrameNumber
(
frame
,
kInitialWidth
,
kInitialHeight
,
&
expected_w
,
&
expected_h
,
0
);
EXPECT_EQ
(
expected_w
,
info
->
w
)
<<
"Frame "
<<
frame
<<
" had unexpected width"
;
EXPECT_EQ
(
expected_h
,
info
->
h
)
<<
"Frame "
<<
frame
<<
" had unexpected height"
;
EXPECT_EQ
(
expected_w
,
info
->
w
)
<<
"Frame "
<<
frame
<<
" had unexpected width"
;
EXPECT_EQ
(
expected_h
,
info
->
h
)
<<
"Frame "
<<
frame
<<
" had unexpected height"
;
}
}
...
...
@@ -509,10 +509,10 @@ TEST_P(ResizeRealtimeTest, DISABLED_TestExternalResizeWorks) {
unsigned
int
expected_h
;
ScaleForFrameNumber
(
frame
,
kInitialWidth
,
kInitialHeight
,
&
expected_w
,
&
expected_h
,
1
);
EXPECT_EQ
(
expected_w
,
info
->
w
)
<<
"Frame "
<<
frame
<<
" had unexpected width"
;
EXPECT_EQ
(
expected_h
,
info
->
h
)
<<
"Frame "
<<
frame
<<
" had unexpected height"
;
EXPECT_EQ
(
expected_w
,
info
->
w
)
<<
"Frame "
<<
frame
<<
" had unexpected width"
;
EXPECT_EQ
(
expected_h
,
info
->
h
)
<<
"Frame "
<<
frame
<<
" had unexpected height"
;
EXPECT_EQ
(
static_cast
<
unsigned
int
>
(
0
),
GetMismatchFrames
());
}
}
...
...
test/simd_cmp_impl.h
View file @
4eafefe0
...
...
@@ -371,10 +371,10 @@ typedef struct {
fptr
simd
;
}
mapping
;
#define MAP(name) \
{ \
#name,
reinterpret_cast < fptr > (c_##name),
\
reinterpret_cast < fptr > (name) \
#define MAP(name)
\
{
\
#name,
\
reinterpret_cast < fptr > (c_##name),
reinterpret_cast < fptr > (name) \
}
const
mapping
m
[]
=
{
MAP
(
v64_sad_u8
),
...
...
test/webm_video_source.h
View file @
4eafefe0
...
...
@@ -41,8 +41,8 @@ class WebMVideoSource : public CompressedVideoSource {
virtual
void
Begin
()
{
aom_ctx_
->
file
=
OpenTestDataFile
(
file_name_
);
ASSERT_TRUE
(
aom_ctx_
->
file
!=
NULL
)
<<
"Input file open failed. Filename: "
<<
file_name_
;
ASSERT_TRUE
(
aom_ctx_
->
file
!=
NULL
)
<<
"Input file open failed. Filename: "
<<
file_name_
;
ASSERT_EQ
(
file_is_webm
(
webm_ctx_
,
aom_ctx_
),
1
)
<<
"file is not WebM"
;
...
...
test/y4m_video_source.h
View file @
4eafefe0
...
...
@@ -35,8 +35,8 @@ class Y4mVideoSource : public VideoSource {
virtual
void
OpenSource
()
{
CloseSource
();
input_file_
=
OpenTestDataFile
(
file_name_
);
ASSERT_TRUE
(
input_file_
!=
NULL
)
<<
"Input file open failed. Filename: "
<<
file_name_
;
ASSERT_TRUE
(
input_file_
!=
NULL
)
<<
"Input file open failed. Filename: "
<<
file_name_
;
}
virtual
void
ReadSourceToStart
()
{
...
...
test/yuv_video_source.h
View file @
4eafefe0
...
...
@@ -44,8 +44,8 @@ class YUVVideoSource : public VideoSource {
virtual
void
Begin
()
{
if
(
input_file_
)
fclose
(
input_file_
);
input_file_
=
OpenTestDataFile
(
file_name_
);
ASSERT_TRUE
(
input_file_
!=
NULL
)
<<
"Input file open failed. Filename: "
<<
file_name_
;
ASSERT_TRUE
(
input_file_
!=
NULL
)
<<
"Input file open failed. Filename: "
<<
file_name_
;
if
(
start_
)
fseek
(
input_file_
,
static_cast
<
unsigned
>
(
raw_size_
)
*
start_
,
SEEK_SET
);
...
...
y4minput.c
View file @
4eafefe0
...
...
@@ -190,26 +190,29 @@ static void y4m_42xmpeg2_42xjpeg_helper(unsigned char *_dst,
window.*/
for
(
x
=
0
;
x
<
OC_MINI
(
_c_w
,
2
);
x
++
)
{
_dst
[
x
]
=
(
unsigned
char
)
OC_CLAMPI
(
0
,
(
4
*
_src
[
0
]
-
17
*
_src
[
OC_MAXI
(
x
-
1
,
0
)]
+
114
*
_src
[
x
]
+
35
*
_src
[
OC_MINI
(
x
+
1
,
_c_w
-
1
)]
-
9
*
_src
[
OC_MINI
(
x
+
2
,
_c_w
-
1
)]
+
_src
[
OC_MINI
(
x
+
3
,
_c_w
-
1
)]
+
64
)
>>
7
,
0
,