From 1c24442a07b83c2ec22e9635fe570b5ea42ce784 Mon Sep 17 00:00:00 2001 From: Paul Wilkins Date: Tue, 13 Sep 2011 12:58:04 +0100 Subject: Change to segment_feature_data[][] structure. This data structure is now [Segment ID][Features] rather than [Features][Segment_ID] I propose as a separate modification to make the experimental bit stream reflect this such that all the features for a segment are coded together. Change-Id: I581e4e3ca2033bdbdef3d9300977a8202f55b4fb --- vp8/encoder/quantize.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'vp8/encoder/quantize.c') diff --git a/vp8/encoder/quantize.c b/vp8/encoder/quantize.c index 200d1ae0a..13009bb3f 100644 --- a/vp8/encoder/quantize.c +++ b/vp8/encoder/quantize.c @@ -1174,11 +1174,11 @@ void vp8cx_mb_init_quantizer(VP8_COMP *cpi, MACROBLOCK *x) // Abs Value if (xd->mb_segement_abs_delta == SEGMENT_ABSDATA) - QIndex = xd->segment_feature_data[SEG_LVL_ALT_Q][xd->mode_info_context->mbmi.segment_id]; + QIndex = xd->segment_feature_data[xd->mode_info_context->mbmi.segment_id][SEG_LVL_ALT_Q]; // Delta Value else { - QIndex = cpi->common.base_qindex + xd->segment_feature_data[SEG_LVL_ALT_Q][xd->mode_info_context->mbmi.segment_id]; + QIndex = cpi->common.base_qindex + xd->segment_feature_data[xd->mode_info_context->mbmi.segment_id][SEG_LVL_ALT_Q]; QIndex = (QIndex >= 0) ? ((QIndex <= MAXQ) ? QIndex : MAXQ) : 0; // Clamp to valid range } } @@ -1316,10 +1316,10 @@ void vp8_set_quantizer(struct VP8_COMP *cpi, int Q) // Set Segment specific quatizers - mbd->segment_feature_data[SEG_LVL_ALT_Q][0] = cpi->segment_feature_data[SEG_LVL_ALT_Q][0]; - mbd->segment_feature_data[SEG_LVL_ALT_Q][1] = cpi->segment_feature_data[SEG_LVL_ALT_Q][1]; - mbd->segment_feature_data[SEG_LVL_ALT_Q][2] = cpi->segment_feature_data[SEG_LVL_ALT_Q][2]; - mbd->segment_feature_data[SEG_LVL_ALT_Q][3] = cpi->segment_feature_data[SEG_LVL_ALT_Q][3]; + mbd->segment_feature_data[0][SEG_LVL_ALT_Q] = cpi->segment_feature_data[0][SEG_LVL_ALT_Q]; + mbd->segment_feature_data[1][SEG_LVL_ALT_Q] = cpi->segment_feature_data[1][SEG_LVL_ALT_Q]; + mbd->segment_feature_data[2][SEG_LVL_ALT_Q] = cpi->segment_feature_data[2][SEG_LVL_ALT_Q]; + mbd->segment_feature_data[3][SEG_LVL_ALT_Q] = cpi->segment_feature_data[3][SEG_LVL_ALT_Q]; /* quantizer has to be reinitialized for any delta_q changes */ if(update) -- cgit v1.2.3