Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
aom-rav1e
Commits
54c8e5da
Commit
54c8e5da
authored
May 02, 2016
by
clang-format
Committed by
Yaowu Xu
May 02, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply Clang-format
Change-Id: Iaa3ca871a8106a8e57bbc40f4743cf934c98dcbf
parent
f87b0f9c
Changes
97
Hide whitespace changes
Inline
Side-by-side
Showing
97 changed files
with
438 additions
and
491 deletions
+438
-491
aom/aom.h
aom/aom.h
+0
-1
aom/aomcx.h
aom/aomcx.h
+0
-1
aom/aomdx.h
aom/aomdx.h
+2
-3
av1/common/blockd.h
av1/common/blockd.h
+7
-7
av1/common/clpf.h
av1/common/clpf.h
+1
-1
av1/common/common.h
av1/common/common.h
+2
-2
av1/common/dering.h
av1/common/dering.h
+2
-3
av1/common/entropy.h
av1/common/entropy.h
+1
-1
av1/common/entropymode.h
av1/common/entropymode.h
+5
-5
av1/common/enums.h
av1/common/enums.h
+8
-8
av1/common/frame_buffers.h
av1/common/frame_buffers.h
+1
-1
av1/common/idct.h
av1/common/idct.h
+18
-18
av1/common/loopfilter.h
av1/common/loopfilter.h
+13
-13
av1/common/mvref_common.h
av1/common/mvref_common.h
+14
-18
av1/common/od_dering.h
av1/common/od_dering.h
+29
-23
av1/common/odintrin.h
av1/common/odintrin.h
+16
-15
av1/common/onyxc_int.h
av1/common/onyxc_int.h
+3
-5
av1/common/pred_common.h
av1/common/pred_common.h
+8
-9
av1/common/quant_common.h
av1/common/quant_common.h
+1
-1
av1/common/reconinter.h
av1/common/reconinter.h
+15
-15
av1/common/reconintra.h
av1/common/reconintra.h
+3
-3
av1/common/scale.h
av1/common/scale.h
+3
-3
av1/common/seg_common.h
av1/common/seg_common.h
+2
-2
av1/common/thread_common.h
av1/common/thread_common.h
+7
-7
av1/common/tile_common.h
av1/common/tile_common.h
+2
-2
av1/decoder/decodeframe.h
av1/decoder/decodeframe.h
+2
-2
av1/decoder/decodemv.h
av1/decoder/decodemv.h
+1
-1
av1/decoder/decoder.h
av1/decoder/decoder.h
+8
-8
av1/decoder/detokenize.h
av1/decoder/detokenize.h
+2
-2
av1/decoder/dthread.h
av1/decoder/dthread.h
+2
-2
av1/encoder/aq_complexity.h
av1/encoder/aq_complexity.h
+2
-2
av1/encoder/aq_cyclicrefresh.h
av1/encoder/aq_cyclicrefresh.h
+5
-5
av1/encoder/block.h
av1/encoder/block.h
+1
-1
av1/encoder/encodeframe.h
av1/encoder/encodeframe.h
+4
-4
av1/encoder/encodemb.h
av1/encoder/encodemb.h
+6
-7
av1/encoder/encodemv.h
av1/encoder/encodemv.h
+3
-3
av1/encoder/encoder.h
av1/encoder/encoder.h
+13
-13
av1/encoder/extend.h
av1/encoder/extend.h
+3
-3
av1/encoder/firstpass.h
av1/encoder/firstpass.h
+2
-3
av1/encoder/lookahead.h
av1/encoder/lookahead.h
+10
-11
av1/encoder/mcomp.h
av1/encoder/mcomp.h
+28
-28
av1/encoder/picklpf.h
av1/encoder/picklpf.h
+1
-1
av1/encoder/quantize.h
av1/encoder/quantize.h
+1
-1
av1/encoder/ratectrl.h
av1/encoder/ratectrl.h
+15
-17
av1/encoder/rd.h
av1/encoder/rd.h
+18
-20
av1/encoder/rdopt.h
av1/encoder/rdopt.h
+15
-15
av1/encoder/resize.h
av1/encoder/resize.h
+31
-31
av1/encoder/segmentation.h
av1/encoder/segmentation.h
+3
-3
av1/encoder/subexp.h
av1/encoder/subexp.h
+7
-8
av1/encoder/tokenize.h
av1/encoder/tokenize.h
+3
-4
av1/encoder/treewriter.h
av1/encoder/treewriter.h
+6
-6
test/active_map_refresh_test.cc
test/active_map_refresh_test.cc
+2
-2
test/active_map_test.cc
test/active_map_test.cc
+2
-2
test/aq_segment_test.cc
test/aq_segment_test.cc
+3
-3
test/arf_freq_test.cc
test/arf_freq_test.cc
+4
-5
test/av1_dct_test.cc
test/av1_dct_test.cc
+1
-2
test/av1_inv_txfm_test.cc
test/av1_inv_txfm_test.cc
+1
-2
test/avg_test.cc
test/avg_test.cc
+0
-1
test/boolcoder_test.cc
test/boolcoder_test.cc
+0
-1
test/borders_test.cc
test/borders_test.cc
+1
-1
test/codec_factory.h
test/codec_factory.h
+5
-5
test/convolve_test.cc
test/convolve_test.cc
+0
-1
test/cpu_speed_test.cc
test/cpu_speed_test.cc
+3
-3
test/datarate_test.cc
test/datarate_test.cc
+3
-3
test/dct16x16_test.cc
test/dct16x16_test.cc
+20
-25
test/dct32x32_test.cc
test/dct32x32_test.cc
+0
-1
test/decode_api_test.cc
test/decode_api_test.cc
+0
-1
test/decode_perf_test.cc
test/decode_perf_test.cc
+1
-2
test/decode_test_driver.cc
test/decode_test_driver.cc
+0
-1
test/denoiser_sse2_test.cc
test/denoiser_sse2_test.cc
+0
-1
test/divu_small_test.cc
test/divu_small_test.cc
+6
-4
test/encode_api_test.cc
test/encode_api_test.cc
+0
-1
test/encode_perf_test.cc
test/encode_perf_test.cc
+1
-1
test/encode_test_driver.cc
test/encode_test_driver.cc
+0
-1
test/encoder_parms_get_to_decoder.cc
test/encoder_parms_get_to_decoder.cc
+2
-3
test/end_to_end_test.cc
test/end_to_end_test.cc
+5
-6
test/error_block_test.cc
test/error_block_test.cc
+9
-10
test/error_resilience_test.cc
test/error_resilience_test.cc
+1
-2
test/ethread_test.cc
test/ethread_test.cc
+3
-4
test/fdct4x4_test.cc
test/fdct4x4_test.cc
+1
-3
test/fdct8x8_test.cc
test/fdct8x8_test.cc
+1
-3
test/idct8x8_test.cc
test/idct8x8_test.cc
+0
-1
test/idct_test.cc
test/idct_test.cc
+0
-1
test/intrapred_test.cc
test/intrapred_test.cc
+0
-1
test/lossless_test.cc
test/lossless_test.cc
+2
-3
test/lpf_8_test.cc
test/lpf_8_test.cc
+0
-1
test/partial_idct_test.cc
test/partial_idct_test.cc
+0
-1
test/quantize_test.cc
test/quantize_test.cc
+0
-1
test/resize_test.cc
test/resize_test.cc
+5
-5
test/sad_test.cc
test/sad_test.cc
+0
-1
test/subtract_test.cc
test/subtract_test.cc
+0
-1
test/superframe_test.cc
test/superframe_test.cc
+1
-2
test/svc_test.cc
test/svc_test.cc
+0
-1
test/tile_independence_test.cc
test/tile_independence_test.cc
+0
-1
test/variance_test.cc
test/variance_test.cc
+0
-1
test/y4m_test.cc
test/y4m_test.cc
+0
-1
webmdec.cc
webmdec.cc
+0
-1
No files found.
aom/aom.h
View file @
54c8e5da
...
...
@@ -152,4 +152,3 @@ AOM_CTRL_USE_TYPE(AV1_GET_REFERENCE, av1_ref_frame_t *)
#endif
#endif // AOM_AOM_H_
aom/aomcx.h
View file @
54c8e5da
...
...
@@ -842,4 +842,3 @@ AOM_CTRL_USE_TYPE(AV1E_SET_RENDER_SIZE, int *)
#endif
#endif // AOM_AOMCX_H_
aom/aomdx.h
View file @
54c8e5da
...
...
@@ -64,7 +64,7 @@ enum aom_dec_control_id {
* a callback function and opaque context pointer.
*/
AOMD_SET_DECRYPTOR
,
// AOMD_SET_DECRYPTOR = AOMD_SET_DECRYPTOR,
// AOMD_SET_DECRYPTOR = AOMD_SET_DECRYPTOR,
/** control function to get the dimensions that the current frame is decoded
* at. This may be different to the intended display size for the frame as
...
...
@@ -144,7 +144,7 @@ AOM_CTRL_USE_TYPE(AOMD_GET_LAST_REF_USED, int *)
#define AOM_CTRL_AOMD_GET_LAST_REF_USED
AOM_CTRL_USE_TYPE
(
AOMD_SET_DECRYPTOR
,
aom_decrypt_init
*
)
#define AOM_CTRL_AOMD_SET_DECRYPTOR
//AOM_CTRL_USE_TYPE(AOMD_SET_DECRYPTOR, aom_decrypt_init *)
//
AOM_CTRL_USE_TYPE(AOMD_SET_DECRYPTOR, aom_decrypt_init *)
//#define AOM_CTRL_AOMD_SET_DECRYPTOR
AOM_CTRL_USE_TYPE
(
AV1D_GET_DISPLAY_SIZE
,
int
*
)
#define AOM_CTRL_AV1D_GET_DISPLAY_SIZE
...
...
@@ -163,4 +163,3 @@ AOM_CTRL_USE_TYPE(AV1_INVERT_TILE_DECODE_ORDER, int)
#endif
#endif // AOM_AOMDX_H_
av1/common/blockd.h
View file @
54c8e5da
...
...
@@ -124,10 +124,10 @@ static INLINE int has_second_ref(const MB_MODE_INFO *mbmi) {
}
PREDICTION_MODE
av1_left_block_mode
(
const
MODE_INFO
*
cur_mi
,
const
MODE_INFO
*
left_mi
,
int
b
);
const
MODE_INFO
*
left_mi
,
int
b
);
PREDICTION_MODE
av1_above_block_mode
(
const
MODE_INFO
*
cur_mi
,
const
MODE_INFO
*
above_mi
,
int
b
);
const
MODE_INFO
*
above_mi
,
int
b
);
enum
mv_precision
{
MV_PRECISION_Q3
,
MV_PRECISION_Q4
};
...
...
@@ -307,13 +307,13 @@ void av1_foreach_transformed_block_in_plane(
foreach_transformed_block_visitor
visit
,
void
*
arg
);
void
av1_foreach_transformed_block
(
const
MACROBLOCKD
*
const
xd
,
BLOCK_SIZE
bsize
,
foreach_transformed_block_visitor
visit
,
void
*
arg
);
BLOCK_SIZE
bsize
,
foreach_transformed_block_visitor
visit
,
void
*
arg
);
void
av1_set_contexts
(
const
MACROBLOCKD
*
xd
,
struct
macroblockd_plane
*
pd
,
BLOCK_SIZE
plane_bsize
,
TX_SIZE
tx_size
,
int
has_eob
,
int
aoff
,
int
loff
);
BLOCK_SIZE
plane_bsize
,
TX_SIZE
tx_size
,
int
has_eob
,
int
aoff
,
int
loff
);
#ifdef __cplusplus
}
// extern "C"
...
...
av1/common/clpf.h
View file @
54c8e5da
...
...
@@ -22,6 +22,6 @@
0 // 1 = filter both luma and chroma, 0 = filter only luma
void
av1_clpf_frame
(
const
YV12_BUFFER_CONFIG
*
frame
,
const
AV1_COMMON
*
cm
,
MACROBLOCKD
*
xd
);
MACROBLOCKD
*
xd
);
#endif
av1/common/common.h
View file @
54c8e5da
...
...
@@ -27,14 +27,14 @@ extern "C" {
#endif
// Only need this for fixed-size arrays, for structs just assign.
#define av1_copy(dest, src) \
#define av1_copy(dest, src)
\
{ \
assert(sizeof(dest) == sizeof(src)); \
memcpy(dest, src, sizeof(src)); \
}
// Use this for variably-sized arrays.
#define av1_copy_array(dest, src, n) \
#define av1_copy_array(dest, src, n)
\
{ \
assert(sizeof(*dest) == sizeof(*src)); \
memcpy(dest, src, n * sizeof(*src)); \
...
...
av1/common/dering.h
View file @
54c8e5da
...
...
@@ -31,11 +31,10 @@ extern "C" {
int
compute_level_from_index
(
int
global_level
,
int
gi
);
int
sb_all_skip
(
const
AV1_COMMON
*
const
cm
,
int
mi_row
,
int
mi_col
);
void
av1_dering_frame
(
YV12_BUFFER_CONFIG
*
frame
,
AV1_COMMON
*
cm
,
MACROBLOCKD
*
xd
,
int
global_level
);
MACROBLOCKD
*
xd
,
int
global_level
);
int
av1_dering_search
(
YV12_BUFFER_CONFIG
*
frame
,
const
YV12_BUFFER_CONFIG
*
ref
,
AV1_COMMON
*
cm
,
MACROBLOCKD
*
xd
);
AV1_COMMON
*
cm
,
MACROBLOCKD
*
xd
);
#ifdef __cplusplus
}
// extern "C"
...
...
av1/common/entropy.h
View file @
54c8e5da
...
...
@@ -166,7 +166,7 @@ extern const aom_tree_index av1_coef_con_tree[TREE_SIZE(ENTROPY_TOKENS)];
extern
const
aom_prob
av1_pareto8_full
[
COEFF_PROB_MODELS
][
MODEL_NODES
];
typedef
aom_prob
av1_coeff_probs_model
[
REF_TYPES
][
COEF_BANDS
][
COEFF_CONTEXTS
]
[
UNCONSTRAINED_NODES
];
[
UNCONSTRAINED_NODES
];
typedef
unsigned
int
av1_coeff_count_model
[
REF_TYPES
][
COEF_BANDS
][
COEFF_CONTEXTS
][
UNCONSTRAINED_NODES
+
1
];
...
...
av1/common/entropymode.h
View file @
54c8e5da
...
...
@@ -55,8 +55,8 @@ typedef struct frame_contexts {
aom_prob
partition_prob
[
PARTITION_CONTEXTS
][
PARTITION_TYPES
-
1
];
av1_coeff_probs_model
coef_probs
[
TX_SIZES
][
PLANE_TYPES
];
aom_prob
switchable_interp_prob
[
SWITCHABLE_FILTER_CONTEXTS
]
[
SWITCHABLE_FILTERS
-
1
];
switchable_interp_prob
[
SWITCHABLE_FILTER_CONTEXTS
]
[
SWITCHABLE_FILTERS
-
1
];
#if CONFIG_REF_MV
aom_prob
newmv_prob
[
NEWMV_MODE_CONTEXTS
];
...
...
@@ -142,11 +142,11 @@ void av1_adapt_intra_frame_probs(struct AV1Common *cm);
void
av1_adapt_inter_frame_probs
(
struct
AV1Common
*
cm
);
void
av1_tx_counts_to_branch_counts_32x32
(
const
unsigned
int
*
tx_count_32x32p
,
unsigned
int
(
*
ct_32x32p
)[
2
]);
unsigned
int
(
*
ct_32x32p
)[
2
]);
void
av1_tx_counts_to_branch_counts_16x16
(
const
unsigned
int
*
tx_count_16x16p
,
unsigned
int
(
*
ct_16x16p
)[
2
]);
unsigned
int
(
*
ct_16x16p
)[
2
]);
void
av1_tx_counts_to_branch_counts_8x8
(
const
unsigned
int
*
tx_count_8x8p
,
unsigned
int
(
*
ct_8x8p
)[
2
]);
unsigned
int
(
*
ct_8x8p
)[
2
]);
extern
const
aom_tree_index
av1_ext_tx_tree
[
TREE_SIZE
(
TX_TYPES
)];
...
...
av1/common/enums.h
View file @
54c8e5da
...
...
@@ -134,21 +134,21 @@ typedef uint8_t PREDICTION_MODE;
#if CONFIG_REF_MV
#define NMV_CONTEXTS 3
#define NEWMV_MODE_CONTEXTS
7
#define NEWMV_MODE_CONTEXTS 7
#define ZEROMV_MODE_CONTEXTS 2
#define REFMV_MODE_CONTEXTS
9
#define DRL_MODE_CONTEXTS
5
#define REFMV_MODE_CONTEXTS 9
#define DRL_MODE_CONTEXTS 5
#define ZEROMV_OFFSET 3
#define REFMV_OFFSET
4
#define REFMV_OFFSET 4
#define NEWMV_CTX_MASK ((1 << ZEROMV_OFFSET) - 1)
#define ZEROMV_CTX_MASK ((1 << (REFMV_OFFSET - ZEROMV_OFFSET)) - 1)
#define REFMV_CTX_MASK ((1 << (8 - REFMV_OFFSET)) - 1)
#define ALL_ZERO_FLAG_OFFSET
8
#define SKIP_NEARESTMV_OFFSET
9
#define SKIP_NEARMV_OFFSET
10
#define ALL_ZERO_FLAG_OFFSET 8
#define SKIP_NEARESTMV_OFFSET 9
#define SKIP_NEARMV_OFFSET 10
#define SKIP_NEARESTMV_SUB8X8_OFFSET 11
#endif
...
...
@@ -159,7 +159,7 @@ typedef uint8_t PREDICTION_MODE;
#if CONFIG_REF_MV
#define MAX_REF_MV_STACK_SIZE 16
#define REF_CAT_LEVEL
160
#define REF_CAT_LEVEL 160
#endif
#define INTRA_INTER_CONTEXTS 4
...
...
av1/common/frame_buffers.h
View file @
54c8e5da
...
...
@@ -41,7 +41,7 @@ void av1_free_internal_frame_buffers(InternalFrameBufferList *list);
// |min_size| is the minimum size in bytes needed to decode the next frame.
// |fb| pointer to the frame buffer.
int
av1_get_frame_buffer
(
void
*
cb_priv
,
size_t
min_size
,
aom_codec_frame_buffer_t
*
fb
);
aom_codec_frame_buffer_t
*
fb
);
// Callback used by libaom when there are no references to the frame buffer.
// |cb_priv| is not used. |fb| pointer to the frame buffer.
...
...
av1/common/idct.h
View file @
54c8e5da
...
...
@@ -40,41 +40,41 @@ typedef struct {
#endif // CONFIG_AOM_HIGHBITDEPTH
void
av1_iwht4x4_add
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
);
int
eob
);
void
av1_idct4x4_add
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
);
int
eob
);
void
av1_inv_txfm_add_4x4
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
TX_TYPE
tx_type
,
int
lossless
);
int
eob
,
TX_TYPE
tx_type
,
int
lossless
);
void
av1_inv_txfm_add_8x8
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
TX_TYPE
tx_type
);
int
eob
,
TX_TYPE
tx_type
);
void
av1_inv_txfm_add_16x16
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
TX_TYPE
tx_type
);
int
eob
,
TX_TYPE
tx_type
);
void
av1_inv_txfm_add_32x32
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
TX_TYPE
tx_type
);
int
eob
,
TX_TYPE
tx_type
);
#if CONFIG_AOM_HIGHBITDEPTH
void
av1_highbd_iwht4x4_add
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
int
bd
);
int
eob
,
int
bd
);
void
av1_highbd_idct4x4_add
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
int
bd
);
int
eob
,
int
bd
);
void
av1_highbd_idct8x8_add
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
int
bd
);
int
eob
,
int
bd
);
void
av1_highbd_idct16x16_add
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
int
bd
);
int
stride
,
int
eob
,
int
bd
);
void
av1_highbd_idct32x32_add
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
int
bd
);
int
stride
,
int
eob
,
int
bd
);
void
av1_highbd_inv_txfm_add_4x4
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
int
bd
,
TX_TYPE
tx_type
,
int
lossless
);
int
stride
,
int
eob
,
int
bd
,
TX_TYPE
tx_type
,
int
lossless
);
void
av1_highbd_inv_txfm_add_8x8
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
int
bd
,
TX_TYPE
tx_type
);
int
stride
,
int
eob
,
int
bd
,
TX_TYPE
tx_type
);
void
av1_highbd_inv_txfm_add_16x16
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
int
bd
,
TX_TYPE
tx_type
);
int
stride
,
int
eob
,
int
bd
,
TX_TYPE
tx_type
);
void
av1_highbd_inv_txfm_add_32x32
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
eob
,
int
bd
,
TX_TYPE
tx_type
);
int
stride
,
int
eob
,
int
bd
,
TX_TYPE
tx_type
);
#endif // CONFIG_AOM_HIGHBITDEPTH
#ifdef __cplusplus
}
// extern "C"
...
...
av1/common/loopfilter.h
View file @
54c8e5da
...
...
@@ -99,20 +99,20 @@ struct AV1LfSyncData;
// This function sets up the bit masks for the entire 64x64 region represented
// by mi_row, mi_col.
void
av1_setup_mask
(
struct
AV1Common
*
const
cm
,
const
int
mi_row
,
const
int
mi_col
,
MODE_INFO
**
mi_8x8
,
const
int
mode_info_stride
,
LOOP_FILTER_MASK
*
lfm
);
const
int
mi_col
,
MODE_INFO
**
mi_8x8
,
const
int
mode_info_stride
,
LOOP_FILTER_MASK
*
lfm
);
void
av1_filter_block_plane_ss00
(
struct
AV1Common
*
const
cm
,
struct
macroblockd_plane
*
const
plane
,
int
mi_row
,
LOOP_FILTER_MASK
*
lfm
);
struct
macroblockd_plane
*
const
plane
,
int
mi_row
,
LOOP_FILTER_MASK
*
lfm
);
void
av1_filter_block_plane_ss11
(
struct
AV1Common
*
const
cm
,
struct
macroblockd_plane
*
const
plane
,
int
mi_row
,
LOOP_FILTER_MASK
*
lfm
);
struct
macroblockd_plane
*
const
plane
,
int
mi_row
,
LOOP_FILTER_MASK
*
lfm
);
void
av1_filter_block_plane_non420
(
struct
AV1Common
*
cm
,
struct
macroblockd_plane
*
plane
,
MODE_INFO
**
mi_8x8
,
int
mi_row
,
int
mi_col
);
struct
macroblockd_plane
*
plane
,
MODE_INFO
**
mi_8x8
,
int
mi_row
,
int
mi_col
);
void
av1_loop_filter_init
(
struct
AV1Common
*
cm
);
...
...
@@ -123,14 +123,14 @@ void av1_loop_filter_init(struct AV1Common *cm);
void
av1_loop_filter_frame_init
(
struct
AV1Common
*
cm
,
int
default_filt_lvl
);
void
av1_loop_filter_frame
(
YV12_BUFFER_CONFIG
*
frame
,
struct
AV1Common
*
cm
,
struct
macroblockd
*
mbd
,
int
filter_level
,
int
y_only
,
int
partial_frame
);
struct
macroblockd
*
mbd
,
int
filter_level
,
int
y_only
,
int
partial_frame
);
// Apply the loop filter to [start, stop) macro block rows in frame_buffer.
void
av1_loop_filter_rows
(
YV12_BUFFER_CONFIG
*
frame_buffer
,
struct
AV1Common
*
cm
,
struct
macroblockd_plane
planes
[
MAX_MB_PLANE
],
int
start
,
int
stop
,
int
y_only
);
struct
AV1Common
*
cm
,
struct
macroblockd_plane
planes
[
MAX_MB_PLANE
],
int
start
,
int
stop
,
int
y_only
);
typedef
struct
LoopFilterWorkerData
{
YV12_BUFFER_CONFIG
*
frame_buffer
;
...
...
av1/common/mvref_common.h
View file @
54c8e5da
...
...
@@ -242,12 +242,13 @@ static INLINE int_mv get_sub_block_mv(const MODE_INFO *candidate, int which_mv,
#if CONFIG_REF_MV
static
INLINE
int_mv
get_sub_block_pred_mv
(
const
MODE_INFO
*
candidate
,
int
which_mv
,
int
search_col
,
int
block_idx
)
{
return
block_idx
>=
0
&&
candidate
->
mbmi
.
sb_type
<
BLOCK_8X8
?
candidate
->
bmi
[
idx_n_column_to_subblock
[
block_idx
]
[
search_col
==
0
]].
pred_mv
[
which_mv
]
:
candidate
->
mbmi
.
pred_mv
[
which_mv
];
int
which_mv
,
int
search_col
,
int
block_idx
)
{
return
block_idx
>=
0
&&
candidate
->
mbmi
.
sb_type
<
BLOCK_8X8
?
candidate
->
bmi
[
idx_n_column_to_subblock
[
block_idx
][
search_col
==
0
]]
.
pred_mv
[
which_mv
]
:
candidate
->
mbmi
.
pred_mv
[
which_mv
];
}
#endif
...
...
@@ -316,18 +317,15 @@ static INLINE int is_inside(const TileInfo *const tile, int mi_col, int mi_row,
static
INLINE
void
lower_mv_precision
(
MV
*
mv
,
int
allow_hp
)
{
const
int
use_hp
=
allow_hp
&&
av1_use_mv_hp
(
mv
);
if
(
!
use_hp
)
{
if
(
mv
->
row
&
1
)
mv
->
row
+=
(
mv
->
row
>
0
?
-
1
:
1
);
if
(
mv
->
col
&
1
)
mv
->
col
+=
(
mv
->
col
>
0
?
-
1
:
1
);
if
(
mv
->
row
&
1
)
mv
->
row
+=
(
mv
->
row
>
0
?
-
1
:
1
);
if
(
mv
->
col
&
1
)
mv
->
col
+=
(
mv
->
col
>
0
?
-
1
:
1
);
}
}
#if CONFIG_REF_MV
static
INLINE
int
av1_nmv_ctx
(
const
uint8_t
ref_mv_count
,
const
CANDIDATE_MV
*
ref_mv_stack
)
{
if
(
ref_mv_stack
[
0
].
weight
>=
REF_CAT_LEVEL
&&
ref_mv_count
>
0
)
{
if
(
ref_mv_stack
[
0
].
weight
>=
REF_CAT_LEVEL
&&
ref_mv_count
>
0
)
{
if
(
abs
(
ref_mv_stack
[
0
].
this_mv
.
as_mv
.
row
-
ref_mv_stack
[
0
].
pred_mv
.
as_mv
.
row
)
<=
4
&&
abs
(
ref_mv_stack
[
0
].
this_mv
.
as_mv
.
col
-
...
...
@@ -340,8 +338,7 @@ static INLINE int av1_nmv_ctx(const uint8_t ref_mv_count,
}
static
int8_t
av1_ref_frame_type
(
const
MV_REFERENCE_FRAME
*
const
rf
)
{
if
(
rf
[
1
]
>
INTRA_FRAME
)
return
rf
[
0
]
+
ALTREF_FRAME
;
if
(
rf
[
1
]
>
INTRA_FRAME
)
return
rf
[
0
]
+
ALTREF_FRAME
;
return
rf
[
0
];
}
...
...
@@ -376,7 +373,7 @@ static int16_t av1_mode_context_analyzer(const int16_t *const mode_context,
}
static
INLINE
uint8_t
av1_drl_ctx
(
const
CANDIDATE_MV
*
ref_mv_stack
,
int
ref_idx
)
{
int
ref_idx
)
{
if
(
ref_mv_stack
[
ref_idx
].
weight
>=
REF_CAT_LEVEL
&&
ref_mv_stack
[
ref_idx
+
1
].
weight
>=
REF_CAT_LEVEL
)
{
if
(
ref_mv_stack
[
ref_idx
].
weight
==
ref_mv_stack
[
ref_idx
+
1
].
weight
)
...
...
@@ -406,8 +403,7 @@ typedef void (*find_mv_refs_sync)(void *const data, int mi_row);
void
av1_find_mv_refs
(
const
AV1_COMMON
*
cm
,
const
MACROBLOCKD
*
xd
,
MODE_INFO
*
mi
,
MV_REFERENCE_FRAME
ref_frame
,
#if CONFIG_REF_MV
uint8_t
*
ref_mv_count
,
CANDIDATE_MV
*
ref_mv_stack
,
uint8_t
*
ref_mv_count
,
CANDIDATE_MV
*
ref_mv_stack
,
#endif
int_mv
*
mv_ref_list
,
int
mi_row
,
int
mi_col
,
find_mv_refs_sync
sync
,
void
*
const
data
,
...
...
@@ -417,7 +413,7 @@ void av1_find_mv_refs(const AV1_COMMON *cm, const MACROBLOCKD *xd,
// above and a number cols of pixels in the left to select the one with best
// score to use as ref motion vector
void
av1_find_best_ref_mvs
(
int
allow_hp
,
int_mv
*
mvlist
,
int_mv
*
nearest_mv
,
int_mv
*
near_mv
);
int_mv
*
near_mv
);
void
av1_append_sub8x8_mvs_for_idx
(
AV1_COMMON
*
cm
,
MACROBLOCKD
*
xd
,
int
block
,
int
ref
,
int
mi_row
,
int
mi_col
,
...
...
av1/common/od_dering.h
View file @
54c8e5da
...
...
@@ -10,14 +10,14 @@
*/
#if !defined(_dering_H)
#
define _dering_H (1)
#define _dering_H (1)
#
include "odintrin.h"
#include "odintrin.h"
#
if defined(DAALA_ODINTRIN)
#
include "filter.h"
#if defined(DAALA_ODINTRIN)
#include "filter.h"
typedef
int16_t
od_dering_in
;
#
endif
#endif
#define OD_DERINGSIZES (2)
...
...
@@ -27,18 +27,21 @@ typedef int16_t od_dering_in;
#define OD_DERING_LEVELS (6)
extern
const
double
OD_DERING_GAIN_TABLE
[
OD_DERING_LEVELS
];
#define OD_DERING_NBLOCKS (OD_BSIZE_MAX
/
8)
#define OD_DERING_NBLOCKS (OD_BSIZE_MAX
/
8)
#define OD_FILT_BORDER (3)
#define OD_FILT_BSTRIDE (OD_BSIZE_MAX + 2
*
OD_FILT_BORDER)
#define OD_FILT_BSTRIDE (OD_BSIZE_MAX + 2
*
OD_FILT_BORDER)
extern
const
int
OD_DIRECTION_OFFSETS_TABLE
[
8
][
3
];
typedef
void
(
*
od_filter_dering_direction_func
)(
int16_t
*
y
,
int
ystride
,
const
int16_t
*
in
,
int
threshold
,
int
dir
);
const
int16_t
*
in
,
int
threshold
,
int
dir
);
typedef
void
(
*
od_filter_dering_orthogonal_func
)(
int16_t
*
y
,
int
ystride
,
const
int16_t
*
in
,
const
od_dering_in
*
x
,
int
xstride
,
int
threshold
,
int
dir
);
const
int16_t
*
in
,
const
od_dering_in
*
x
,
int
xstride
,
int
threshold
,
int
dir
);
struct
od_dering_opt_vtbl
{
od_filter_dering_direction_func
filter_dering_direction
[
OD_DERINGSIZES
];
...
...
@@ -46,28 +49,31 @@ struct od_dering_opt_vtbl {
};
typedef
struct
od_dering_opt_vtbl
od_dering_opt_vtbl
;
void
od_dering
(
const
od_dering_opt_vtbl
*
vtbl
,
int16_t
*
y
,
int
ystride
,
const
od_dering_in
*
x
,
int
xstride
,
int
nvb
,
int
nhb
,
int
sbx
,
int
sby
,
int
nhsb
,
int
nvsb
,
int
xdec
,
int
dir
[
OD_DERING_NBLOCKS
][
OD_DERING_NBLOCKS
],
int
pli
,
unsigned
char
*
bskip
,
int
skip_stride
,
int
threshold
,
int
overlap
,
int
coeff_shift
);
const
od_dering_in
*
x
,
int
xstride
,
int
nvb
,
int
nhb
,
int
sbx
,
int
sby
,
int
nhsb
,
int
nvsb
,
int
xdec
,
int
dir
[
OD_DERING_NBLOCKS
][
OD_DERING_NBLOCKS
],
int
pli
,
unsigned
char
*
bskip
,
int
skip_stride
,
int
threshold
,
int
overlap
,
int
coeff_shift
);
void
od_filter_dering_direction_c
(
int16_t
*
y
,
int
ystride
,
const
int16_t
*
in
,
int
ln
,
int
threshold
,
int
dir
);
int
ln
,
int
threshold
,
int
dir
);
void
od_filter_dering_orthogonal_c
(
int16_t
*
y
,
int
ystride
,
const
int16_t
*
in
,
const
od_dering_in
*
x
,
int
xstride
,
int
ln
,
int
threshold
,
int
dir
);
const
od_dering_in
*
x
,
int
xstride
,
int
ln
,
int
threshold
,
int
dir
);
extern
const
od_dering_opt_vtbl
OD_DERING_VTBL_C
;
void
od_filter_dering_direction_4x4_c
(
int16_t
*
y
,
int
ystride
,
const
int16_t
*
in
,
int
threshold
,
int
dir
);
const
int16_t
*
in
,
int
threshold
,
int
dir
);
void
od_filter_dering_direction_8x8_c
(
int16_t
*
y
,
int
ystride
,
const
int16_t
*
in
,
int
threshold
,
int
dir
);
const
int16_t
*
in
,
int
threshold
,
int
dir
);
void
od_filter_dering_orthogonal_4x4_c
(
int16_t
*
y
,
int
ystride
,
const
int16_t
*
in
,
const
od_dering_in
*
x
,
int
xstride
,
int
threshold
,
int
dir
);
const
int16_t
*
in
,
const
od_dering_in
*
x
,
int
xstride
,
int
threshold
,
int
dir
);
void
od_filter_dering_orthogonal_8x8_c
(
int16_t
*
y
,
int
ystride
,
const
int16_t
*
in
,
const
od_dering_in
*
x
,
int
xstride
,
int
threshold
,
int
dir
);
const
int16_t
*
in
,
const
od_dering_in
*
x
,
int
xstride
,
int
threshold
,
int
dir
);
#endif
av1/common/odintrin.h
View file @
54c8e5da
...
...
@@ -21,42 +21,43 @@ extern "C" {
#endif
/*Smallest blocks are 4x4*/
#
define OD_LOG_BSIZE0 (2)
#define OD_LOG_BSIZE0 (2)
/*There are 5 block sizes total (4x4, 8x8, 16x16, 32x32 and 64x64).*/
#
define OD_NBSIZES
(5)
#define OD_NBSIZES (5)
/*The log of the maximum length of the side of a block.*/
#
define OD_LOG_BSIZE_MAX (OD_LOG_BSIZE0 + OD_NBSIZES - 1)
#define OD_LOG_BSIZE_MAX (OD_LOG_BSIZE0 + OD_NBSIZES - 1)
/*The maximum length of the side of a block.*/
#
define OD_BSIZE_MAX
(1 << OD_LOG_BSIZE_MAX)
#define OD_BSIZE_MAX (1 << OD_LOG_BSIZE_MAX)
typedef
int
od_coeff
;
typedef
int16_t
od_dering_in
;
#
define OD_DIVU_DMAX (1024)
#define OD_DIVU_DMAX (1024)
extern
uint32_t
OD_DIVU_SMALL_CONSTS
[
OD_DIVU_DMAX
][
2
];
/*Translate unsigned division by small divisors into multiplications.*/
# define OD_DIVU_SMALL(_x, _d) \
((uint32_t)((OD_DIVU_SMALL_CONSTS[(_d)-1][0]* \
(uint64_t)(_x)+OD_DIVU_SMALL_CONSTS[(_d)-1][1])>>32)>> \
(OD_ILOG(_d)-1))
#define OD_DIVU_SMALL(_x, _d) \
((uint32_t)((OD_DIVU_SMALL_CONSTS[(_d)-1][0] * (uint64_t)(_x) + \
OD_DIVU_SMALL_CONSTS[(_d)-1][1]) >> \
32) >> \
(OD_ILOG(_d) - 1))
#
define OD_DIVU(_x, _d) \
(((_d) < OD_DIVU_DMAX)
?
(OD_DIVU_SMALL((_x), (_d)))
:
((_x)
/
(_d)))
#define OD_DIVU(_x, _d) \
(((_d) < OD_DIVU_DMAX)
?
(OD_DIVU_SMALL((_x), (_d)))
:
((_x)
/
(_d)))
#define OD_MINI AOMMIN
#define OD_CLAMPI(min, val, max) clamp((val), (min), (max))
#
define OD_CLZ0 (1)
#
define OD_CLZ(x) (-get_msb(x))
#
define OD_ILOG_NZ(x) (OD_CLZ0 - OD_CLZ(x))
#define OD_CLZ0 (1)
#define OD_CLZ(x) (-get_msb(x))
#define OD_ILOG_NZ(x) (OD_CLZ0 - OD_CLZ(x))
/*Note that __builtin_clz is not defined when x == 0, according to the gcc
documentation (and that of the x86 BSR instruction that implements it), so
we have to special-case it.
We define a special version of the macro to use when x can be zero.*/
#
define OD_ILOG(x) ((x) ? OD_ILOG_NZ(x) : 0)
#define OD_ILOG(x) ((x) ? OD_ILOG_NZ(x) : 0)
#ifdef __cplusplus
}
// extern "C"
...
...
av1/common/onyxc_int.h
View file @
54c8e5da
...
...
@@ -389,7 +389,7 @@ static INLINE int frame_is_intra_only(const AV1_COMMON *const cm) {
}
static
INLINE
void
av1_init_macroblockd
(
AV1_COMMON
*
cm
,
MACROBLOCKD
*
xd
,
tran_low_t
*
dqcoeff
)
{
tran_low_t
*
dqcoeff
)
{
int
i
;
for
(
i
=
0
;
i
<
MAX_MB_PLANE
;
++
i
)
{
...
...
@@ -469,12 +469,10 @@ static INLINE void set_mi_row_col(MACROBLOCKD *xd, const TileInfo *const tile,
#if CONFIG_REF_MV
xd
->
is_sec_rect
=
0
;
if
(
xd
->
n8_w
<
xd
->
n8_h
)
if
(
mi_col
&
(
xd
->
n8_h
-
1
))
xd
->
is_sec_rect
=
1
;
if
(
mi_col
&
(
xd
->
n8_h
-
1
))
xd
->
is_sec_rect
=
1
;
if
(
xd
->
n8_w
>
xd
->
n8_h
)
if
(
mi_row
&
(
xd
->
n8_w
-
1
))
xd
->
is_sec_rect
=
1
;
if
(
mi_row
&
(
xd
->
n8_w
-
1
))
xd
->
is_sec_rect
=
1
;
#endif
}
...
...
av1/common/pred_common.h
View file @
54c8e5da
...
...
@@ -63,7 +63,7 @@ static INLINE int av1_get_skip_context(const MACROBLOCKD *xd) {
}
static
INLINE
aom_prob
av1_get_skip_prob
(
const
AV1_COMMON
*
cm
,
const
MACROBLOCKD
*
xd
)
{
const
MACROBLOCKD
*
xd
)
{
return
cm
->
fc
->
skip_probs
[
av1_get_skip_context
(
xd
)];
}
...
...
@@ -72,23 +72,22 @@ int av1_get_pred_context_switchable_interp(const MACROBLOCKD *xd);
int
av1_get_intra_inter_context
(
const
MACROBLOCKD
*
xd
);
static
INLINE
aom_prob
av1_get_intra_inter_prob
(
const
AV1_COMMON
*
cm
,
const
MACROBLOCKD
*
xd
)
{
const
MACROBLOCKD
*
xd
)
{
return
cm
->
fc
->
intra_inter_prob
[
av1_get_intra_inter_context
(
xd
)];
}
int
av1_get_reference_mode_context
(
const
AV1_COMMON
*
cm
,
const
MACROBLOCKD
*
xd
);
int
av1_get_reference_mode_context
(
const
AV1_COMMON
*
cm
,
const
MACROBLOCKD
*
xd
);
static
INLINE
aom_prob
av1_get_reference_mode_prob
(
const
AV1_COMMON
*
cm
,
const
MACROBLOCKD
*
xd
)