OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 | 567 |
568 } | 568 } |
569 } | 569 } |
570 | 570 |
571 cpi->tplist[mb_row].stop = *tp; | 571 cpi->tplist[mb_row].stop = *tp; |
572 | 572 |
573 #if CONFIG_REALTIME_ONLY & CONFIG_ONTHEFLY_BITPACKING | 573 #if CONFIG_REALTIME_ONLY & CONFIG_ONTHEFLY_BITPACKING |
574 /* pack tokens for this MB */ | 574 /* pack tokens for this MB */ |
575 { | 575 { |
576 int tok_count = *tp - tp_start; | 576 int tok_count = *tp - tp_start; |
577 pack_tokens(w, tp_start, tok_count); | 577 vp8_pack_tokens(w, tp_start, tok_count); |
578 } | 578 } |
579 #endif | 579 #endif |
580 /* Increment pointer into gf usage flags structure. */ | 580 /* Increment pointer into gf usage flags structure. */ |
581 x->gf_active_ptr++; | 581 x->gf_active_ptr++; |
582 | 582 |
583 /* Increment the activity mask pointers. */ | 583 /* Increment the activity mask pointers. */ |
584 x->mb_activity_ptr++; | 584 x->mb_activity_ptr++; |
585 | 585 |
586 /* adjust to the next column of macroblocks */ | 586 /* adjust to the next column of macroblocks */ |
587 x->src.y_buffer += 16; | 587 x->src.y_buffer += 16; |
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1245 #endif | 1245 #endif |
1246 | 1246 |
1247 if (cpi->sf.RD) | 1247 if (cpi->sf.RD) |
1248 { | 1248 { |
1249 int zbin_mode_boost_enabled = x->zbin_mode_boost_enabled; | 1249 int zbin_mode_boost_enabled = x->zbin_mode_boost_enabled; |
1250 | 1250 |
1251 /* Are we using the fast quantizer for the mode selection? */ | 1251 /* Are we using the fast quantizer for the mode selection? */ |
1252 if(cpi->sf.use_fastquant_for_pick) | 1252 if(cpi->sf.use_fastquant_for_pick) |
1253 { | 1253 { |
1254 x->quantize_b = vp8_fast_quantize_b; | 1254 x->quantize_b = vp8_fast_quantize_b; |
1255 x->quantize_b_pair = vp8_fast_quantize_b_pair; | |
1256 | 1255 |
1257 /* the fast quantizer does not use zbin_extra, so | 1256 /* the fast quantizer does not use zbin_extra, so |
1258 * do not recalculate */ | 1257 * do not recalculate */ |
1259 x->zbin_mode_boost_enabled = 0; | 1258 x->zbin_mode_boost_enabled = 0; |
1260 } | 1259 } |
1261 vp8_rd_pick_inter_mode(cpi, x, recon_yoffset, recon_uvoffset, &rate, | 1260 vp8_rd_pick_inter_mode(cpi, x, recon_yoffset, recon_uvoffset, &rate, |
1262 &distortion, &intra_error, mb_row, mb_col); | 1261 &distortion, &intra_error, mb_row, mb_col); |
1263 | 1262 |
1264 /* switch back to the regular quantizer for the encode */ | 1263 /* switch back to the regular quantizer for the encode */ |
1265 if (cpi->sf.improved_quant) | 1264 if (cpi->sf.improved_quant) |
1266 { | 1265 { |
1267 x->quantize_b = vp8_regular_quantize_b; | 1266 x->quantize_b = vp8_regular_quantize_b; |
1268 x->quantize_b_pair = vp8_regular_quantize_b_pair; | |
1269 } | 1267 } |
1270 | 1268 |
1271 /* restore cpi->zbin_mode_boost_enabled */ | 1269 /* restore cpi->zbin_mode_boost_enabled */ |
1272 x->zbin_mode_boost_enabled = zbin_mode_boost_enabled; | 1270 x->zbin_mode_boost_enabled = zbin_mode_boost_enabled; |
1273 | 1271 |
1274 } | 1272 } |
1275 else | 1273 else |
1276 { | 1274 { |
1277 vp8_pick_inter_mode(cpi, x, recon_yoffset, recon_uvoffset, &rate, | 1275 vp8_pick_inter_mode(cpi, x, recon_yoffset, recon_uvoffset, &rate, |
1278 &distortion, &intra_error, mb_row, mb_col); | 1276 &distortion, &intra_error, mb_row, mb_col); |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1408 vp8_fix_contexts(xd); | 1406 vp8_fix_contexts(xd); |
1409 } | 1407 } |
1410 else | 1408 else |
1411 { | 1409 { |
1412 vp8_stuff_mb(cpi, x, t); | 1410 vp8_stuff_mb(cpi, x, t); |
1413 } | 1411 } |
1414 } | 1412 } |
1415 | 1413 |
1416 return rate; | 1414 return rate; |
1417 } | 1415 } |
OLD | NEW |