lf->last_sharpness_level = lf->sharpness_level;
}
- for (seg = 0; seg < MAX_MB_SEGMENTS; seg++) {
+ for (seg = 0; seg < MAX_SEGMENTS; seg++) {
int lvl_seg = default_filt_lvl, ref, mode, intra_lvl;
// Set the baseline filter values for each segment
lim[MAX_LOOP_FILTER + 1][SIMD_WIDTH]);
DECLARE_ALIGNED(SIMD_WIDTH, uint8_t,
hev_thr[4][SIMD_WIDTH]);
- uint8_t lvl[MAX_MB_SEGMENTS][MAX_REF_FRAMES][MAX_MODE_LF_DELTAS];
+ uint8_t lvl[MAX_SEGMENTS][MAX_REF_FRAMES][MAX_MODE_LF_DELTAS];
uint8_t mode_lf_lut[MB_MODE_COUNT];
} loop_filter_info_n;
#include "vpx_scale/yv12config.h"
#include "vp9/common/vp9_ppflags.h"
-#define MAX_MB_SEGMENTS 8
+#define MAX_SEGMENTS 8
typedef int *VP9_PTR;
int vp9_set_roimap(VP9_PTR comp, unsigned char *map,
unsigned int rows, unsigned int cols,
- int delta_q[MAX_MB_SEGMENTS],
- int delta_lf[MAX_MB_SEGMENTS],
- unsigned int threshold[MAX_MB_SEGMENTS]);
+ int delta_q[MAX_SEGMENTS],
+ int delta_lf[MAX_SEGMENTS],
+ unsigned int threshold[MAX_SEGMENTS]);
int vp9_set_active_map(VP9_PTR comp, unsigned char *map,
unsigned int rows, unsigned int cols);
segment_id = MIN(segment_id,
segment_ids[mi_offset + y * cm->mi_cols + x]);
- assert(segment_id >= 0 && segment_id < MAX_MB_SEGMENTS);
+ assert(segment_id >= 0 && segment_id < MAX_SEGMENTS);
return segment_id;
}
#define SEGMENT_DELTADATA 0
#define SEGMENT_ABSDATA 1
-#define MAX_MB_SEGMENTS 8
-#define MB_SEG_TREE_PROBS (MAX_MB_SEGMENTS-1)
+#define MAX_SEGMENTS 8
+#define SEG_TREE_PROBS (MAX_SEGMENTS-1)
#define PREDICTION_PROBS 3
SEG_LVL_ALT_LF = 1, // Use alternate loop filter value...
SEG_LVL_REF_FRAME = 2, // Optional Segment reference frame
SEG_LVL_SKIP = 3, // Optional Segment (0,0) + skip mode
- SEG_LVL_MAX = 4 // Number of MB level features supported
+ SEG_LVL_MAX = 4 // Number of features supported
} SEG_LVL_FEATURES;
uint8_t abs_delta;
uint8_t temporal_update;
- vp9_prob tree_probs[MB_SEG_TREE_PROBS];
+ vp9_prob tree_probs[SEG_TREE_PROBS];
vp9_prob pred_probs[PREDICTION_PROBS];
- int16_t feature_data[MAX_MB_SEGMENTS][SEG_LVL_MAX];
- unsigned int feature_mask[MAX_MB_SEGMENTS];
+ int16_t feature_data[MAX_SEGMENTS][SEG_LVL_MAX];
+ unsigned int feature_mask[MAX_SEGMENTS];
};
int vp9_segfeature_active(const struct segmentation *seg,
const int ymis = MIN(cm->mi_rows - mi_row, bh);
int x, y;
- assert(segment_id >= 0 && segment_id < MAX_MB_SEGMENTS);
+ assert(segment_id >= 0 && segment_id < MAX_SEGMENTS);
for (y = 0; y < ymis; y++)
for (x = 0; x < xmis; x++)
// Segmentation map update
seg->update_map = vp9_rb_read_bit(rb);
if (seg->update_map) {
- for (i = 0; i < MB_SEG_TREE_PROBS; i++)
+ for (i = 0; i < SEG_TREE_PROBS; i++)
seg->tree_probs[i] = vp9_rb_read_bit(rb) ? vp9_rb_read_literal(rb, 8)
: MAX_PROB;
vp9_clearall_segfeatures(seg);
- for (i = 0; i < MAX_MB_SEGMENTS; i++) {
+ for (i = 0; i < MAX_SEGMENTS; i++) {
for (j = 0; j < SEG_LVL_MAX; j++) {
int data = 0;
const int feature_enabled = vp9_rb_read_bit(rb);
// Select the coding strategy (temporal or spatial)
vp9_choose_segmap_coding_method(cpi);
// Write out probabilities used to decode unpredicted macro-block segments
- for (i = 0; i < MB_SEG_TREE_PROBS; i++) {
+ for (i = 0; i < SEG_TREE_PROBS; i++) {
const int prob = seg->tree_probs[i];
const int update = prob != MAX_PROB;
vp9_wb_write_bit(wb, update);
if (seg->update_data) {
vp9_wb_write_bit(wb, seg->abs_delta);
- for (i = 0; i < MAX_MB_SEGMENTS; i++) {
+ for (i = 0; i < MAX_SEGMENTS; i++) {
for (j = 0; j < SEG_LVL_MAX; j++) {
const int active = vp9_segfeature_active(seg, i, j);
vp9_wb_write_bit(wb, active);
{
int i;
- for (i = 0; i < MAX_MB_SEGMENTS; i++)
+ for (i = 0; i < MAX_SEGMENTS; i++)
cpi->segment_encode_breakout[i] = cpi->oxcf.encode_breakout;
}
}
int vp9_set_roimap(VP9_PTR comp, unsigned char *map, unsigned int rows,
- unsigned int cols, int delta_q[MAX_MB_SEGMENTS],
- int delta_lf[MAX_MB_SEGMENTS],
- unsigned int threshold[MAX_MB_SEGMENTS]) {
+ unsigned int cols, int delta_q[MAX_SEGMENTS],
+ int delta_lf[MAX_SEGMENTS],
+ unsigned int threshold[MAX_SEGMENTS]) {
VP9_COMP *cpi = (VP9_COMP *) comp;
- signed char feature_data[SEG_LVL_MAX][MAX_MB_SEGMENTS];
+ signed char feature_data[SEG_LVL_MAX][MAX_SEGMENTS];
MACROBLOCKD *xd = &cpi->mb.e_mbd;
int i;
vp9_enable_segmentation((VP9_PTR)cpi);
// Set up the quan, LF and breakout threshold segment data
- for (i = 0; i < MAX_MB_SEGMENTS; i++) {
+ for (i = 0; i < MAX_SEGMENTS; i++) {
feature_data[SEG_LVL_ALT_Q][i] = delta_q[i];
feature_data[SEG_LVL_ALT_LF][i] = delta_lf[i];
cpi->segment_encode_breakout[i] = threshold[i];
}
// Enable the loop and quant changes in the feature mask
- for (i = 0; i < MAX_MB_SEGMENTS; i++) {
+ for (i = 0; i < MAX_SEGMENTS; i++) {
if (delta_q[i])
vp9_enable_segfeature(&xd->seg, i, SEG_LVL_ALT_Q);
else
unsigned char *segmentation_map;
// segment threashold for encode breakout
- int segment_encode_breakout[MAX_MB_SEGMENTS];
+ int segment_encode_breakout[MAX_SEGMENTS];
unsigned char *active_map;
unsigned int active_map_enabled;
int i, tile_col, mi_row, mi_col;
int temporal_predictor_count[PREDICTION_PROBS][2];
- int no_pred_segcounts[MAX_MB_SEGMENTS];
- int t_unpred_seg_counts[MAX_MB_SEGMENTS];
+ int no_pred_segcounts[MAX_SEGMENTS];
+ int t_unpred_seg_counts[MAX_SEGMENTS];
- vp9_prob no_pred_tree[MB_SEG_TREE_PROBS];
- vp9_prob t_pred_tree[MB_SEG_TREE_PROBS];
+ vp9_prob no_pred_tree[SEG_TREE_PROBS];
+ vp9_prob t_pred_tree[SEG_TREE_PROBS];
vp9_prob t_nopred_prob[PREDICTION_PROBS];
const int mis = cm->mode_info_stride;