diff options
author | Paul Wilkins <paulwilkins@google.com> | 2011-09-13 12:58:04 +0100 |
---|---|---|
committer | Paul Wilkins <paulwilkins@google.com> | 2011-09-13 12:58:04 +0100 |
commit | 1c24442a07b83c2ec22e9635fe570b5ea42ce784 (patch) | |
tree | 089fab04138dda450511997e903a397d845ac8bc /vp8/encoder/quantize.c | |
parent | dfbc61f3ab8c20e3ac7ed94209ab62dfe080b53e (diff) | |
download | libvpx-1c24442a07b83c2ec22e9635fe570b5ea42ce784.tar libvpx-1c24442a07b83c2ec22e9635fe570b5ea42ce784.tar.gz libvpx-1c24442a07b83c2ec22e9635fe570b5ea42ce784.tar.bz2 libvpx-1c24442a07b83c2ec22e9635fe570b5ea42ce784.zip |
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
Diffstat (limited to 'vp8/encoder/quantize.c')
-rw-r--r-- | vp8/encoder/quantize.c | 12 |
1 files changed, 6 insertions, 6 deletions
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) |