onyxc_int.h: Correct formatting.
clang-format was turned off temporarily, but wasn't turned back on
correctly, so it was ignoring most of the file.
Change-Id: I25791bfca20edcdfcb2ade1068950ceb5a67f36e
Note: This is a patch for master, similar to the one for experimental.
diff --git a/av1/common/onyxc_int.h b/av1/common/onyxc_int.h
index 0f2a9e1..bd5a254 100644
--- a/av1/common/onyxc_int.h
+++ b/av1/common/onyxc_int.h
@@ -72,7 +72,7 @@
// multiplication.
#define MAX_NUM_OPERATING_POINTS \
MAX_NUM_TEMPORAL_LAYERS * MAX_NUM_SPATIAL_LAYERS
-/* clang-format on*/
+/* clang-format on */
// TODO(jingning): Turning this on to set up transform coefficient
// processing timer.
@@ -109,7 +109,6 @@
MV_REFERENCE_FRAME ref_frame;
} MV_REF;
-
typedef struct RefCntBuffer {
// For a RefCntBuffer, the following are reference-holding variables:
// - cm->ref_frame_map[]
@@ -210,15 +209,15 @@
} DeltaQInfo;
typedef struct {
- int enable_order_hint; // 0 - disable order hint, and related tools
- int order_hint_bits_minus_1; // dist_wtd_comp, ref_frame_mvs,
- // frame_sign_bias
- // if 0, enable_dist_wtd_comp and
- // enable_ref_frame_mvs must be set as 0.
- int enable_dist_wtd_comp; // 0 - disable dist-wtd compound modes
- // 1 - enable it
- int enable_ref_frame_mvs; // 0 - disable ref frame mvs
- // 1 - enable it
+ int enable_order_hint; // 0 - disable order hint, and related tools
+ int order_hint_bits_minus_1; // dist_wtd_comp, ref_frame_mvs,
+ // frame_sign_bias
+ // if 0, enable_dist_wtd_comp and
+ // enable_ref_frame_mvs must be set as 0.
+ int enable_dist_wtd_comp; // 0 - disable dist-wtd compound modes
+ // 1 - enable it
+ int enable_ref_frame_mvs; // 0 - disable ref frame mvs
+ // 1 - enable it
} OrderHintInfo;
// Sequence header structure.
@@ -281,8 +280,8 @@
aom_transfer_characteristics_t transfer_characteristics;
aom_matrix_coefficients_t matrix_coefficients;
int color_range;
- int subsampling_x; // Chroma subsampling for x
- int subsampling_y; // Chroma subsampling for y
+ int subsampling_x; // Chroma subsampling for x
+ int subsampling_y; // Chroma subsampling for y
aom_chroma_sample_position_t chroma_sample_position;
uint8_t separate_uv_delta_q;
uint8_t film_grain_params_present;
@@ -302,10 +301,10 @@
} FRAME_INFO;
typedef struct {
- int skip_mode_allowed;
- int skip_mode_flag;
- int ref_frame_idx_0;
- int ref_frame_idx_1;
+ int skip_mode_allowed;
+ int skip_mode_flag;
+ int ref_frame_idx_0;
+ int ref_frame_idx_1;
} SkipModeInfo;
typedef struct {
@@ -437,7 +436,7 @@
/* We allocate a MB_MODE_INFO struct for each macroblock, together with
an extra row on top and column on the left to simplify prediction. */
int mi_alloc_size, mi_grid_size;
- MB_MODE_INFO *mi; /* Corresponds to upper left visible macroblock */
+ MB_MODE_INFO *mi; /* Corresponds to upper left visible macroblock */
// The minimum size each allocated mi can correspond to.
// For decoder, this is always BLOCK_4X4.
@@ -496,7 +495,7 @@
MV_REFERENCE_FRAME comp_fwd_ref[FWD_REFS];
MV_REFERENCE_FRAME comp_bwd_ref[BWD_REFS];
- FRAME_CONTEXT *fc; /* this frame entropy */
+ FRAME_CONTEXT *fc; /* this frame entropy */
FRAME_CONTEXT *default_frame_context;
int primary_ref_frame;
@@ -650,7 +649,7 @@
// Modify 'lhs_ptr' to reference the buffer at 'rhs_ptr', and update the ref
// counts accordingly.
static INLINE void assign_frame_buffer_p(RefCntBuffer **lhs_ptr,
- RefCntBuffer *rhs_ptr) {
+ RefCntBuffer *rhs_ptr) {
RefCntBuffer *const old_ptr = *lhs_ptr;
if (old_ptr != NULL) {
assert(old_ptr->ref_count > 0);
@@ -665,7 +664,7 @@
static INLINE int frame_is_intra_only(const AV1_COMMON *const cm) {
return cm->current_frame.frame_type == KEY_FRAME ||
- cm->current_frame.frame_type == INTRA_ONLY_FRAME;
+ cm->current_frame.frame_type == INTRA_ONLY_FRAME;
}
static INLINE int frame_is_sframe(const AV1_COMMON *cm) {
@@ -712,9 +711,9 @@
// Returns 1 if this frame might allow mvs from some reference frame.
static INLINE int frame_might_allow_ref_frame_mvs(const AV1_COMMON *cm) {
return !cm->error_resilient_mode &&
- cm->seq_params.order_hint_info.enable_ref_frame_mvs &&
- cm->seq_params.order_hint_info.enable_order_hint &&
- !frame_is_intra_only(cm);
+ cm->seq_params.order_hint_info.enable_ref_frame_mvs &&
+ cm->seq_params.order_hint_info.enable_order_hint &&
+ !frame_is_intra_only(cm);
}
// Returns 1 if this frame might use warped_motion
@@ -1133,13 +1132,15 @@
return ALIGN_POWER_OF_TWO(max_blocks_high, tx_size_high_log2[tx_size]);
}
-static INLINE void av1_zero_above_context(AV1_COMMON *const cm, const MACROBLOCKD *xd,
- int mi_col_start, int mi_col_end, const int tile_row) {
+static INLINE void av1_zero_above_context(AV1_COMMON *const cm,
+ const MACROBLOCKD *xd,
+ int mi_col_start, int mi_col_end,
+ const int tile_row) {
const SequenceHeader *const seq_params = &cm->seq_params;
const int num_planes = av1_num_planes(cm);
const int width = mi_col_end - mi_col_start;
const int aligned_width =
- ALIGN_POWER_OF_TWO(width, seq_params->mib_size_log2);
+ ALIGN_POWER_OF_TWO(width, seq_params->mib_size_log2);
const int offset_y = mi_col_start;
const int width_y = aligned_width;
@@ -1160,8 +1161,7 @@
av1_zero_array(cm->above_seg_context[tile_row] + mi_col_start, aligned_width);
memset(cm->above_txfm_context[tile_row] + mi_col_start,
- tx_size_wide[TX_SIZES_LARGEST],
- aligned_width * sizeof(TXFM_CONTEXT));
+ tx_size_wide[TX_SIZES_LARGEST], aligned_width * sizeof(TXFM_CONTEXT));
}
static INLINE void av1_zero_left_context(MACROBLOCKD *const xd) {
@@ -1217,8 +1217,7 @@
return mi_alloc_row * cm->mi_alloc_stride + mi_alloc_col;
}
-static INLINE int get_mi_ext_idx(const AV1_COMMON *cm, int mi_row,
- int mi_col) {
+static INLINE int get_mi_ext_idx(const AV1_COMMON *cm, int mi_row, int mi_col) {
const int mi_alloc_size_1d = mi_size_wide[cm->mi_alloc_bsize];
const int mi_alloc_row = mi_row / mi_alloc_size_1d;
const int mi_alloc_col = mi_col / mi_alloc_size_1d;
@@ -1416,18 +1415,13 @@
static INLINE int is_valid_seq_level_idx(AV1_LEVEL seq_level_idx) {
return seq_level_idx == SEQ_LEVEL_MAX ||
- (seq_level_idx < SEQ_LEVELS &&
- // The following levels are currently undefined.
- seq_level_idx != SEQ_LEVEL_2_2 &&
- seq_level_idx != SEQ_LEVEL_2_3 &&
- seq_level_idx != SEQ_LEVEL_3_2 &&
- seq_level_idx != SEQ_LEVEL_3_3 &&
- seq_level_idx != SEQ_LEVEL_4_2 &&
- seq_level_idx != SEQ_LEVEL_4_3 &&
- seq_level_idx != SEQ_LEVEL_7_0 &&
- seq_level_idx != SEQ_LEVEL_7_1 &&
- seq_level_idx != SEQ_LEVEL_7_2 &&
- seq_level_idx != SEQ_LEVEL_7_3);
+ (seq_level_idx < SEQ_LEVELS &&
+ // The following levels are currently undefined.
+ seq_level_idx != SEQ_LEVEL_2_2 && seq_level_idx != SEQ_LEVEL_2_3 &&
+ seq_level_idx != SEQ_LEVEL_3_2 && seq_level_idx != SEQ_LEVEL_3_3 &&
+ seq_level_idx != SEQ_LEVEL_4_2 && seq_level_idx != SEQ_LEVEL_4_3 &&
+ seq_level_idx != SEQ_LEVEL_7_0 && seq_level_idx != SEQ_LEVEL_7_1 &&
+ seq_level_idx != SEQ_LEVEL_7_2 && seq_level_idx != SEQ_LEVEL_7_3);
}
static INLINE void init_frame_info(FRAME_INFO *frame_info,