| OLD | NEW | 
|    1 /* |    1 /* | 
|    2  *  Copyright (c) 2014 The WebM project authors. All Rights Reserved. |    2  *  Copyright (c) 2014 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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  361     return; |  361     return; | 
|  362   } else { |  362   } else { | 
|  363     int qindex_delta = 0; |  363     int qindex_delta = 0; | 
|  364     int qindex2; |  364     int qindex2; | 
|  365     const double q = vp9_convert_qindex_to_q(cm->base_qindex, cm->bit_depth); |  365     const double q = vp9_convert_qindex_to_q(cm->base_qindex, cm->bit_depth); | 
|  366     vp9_clear_system_state(); |  366     vp9_clear_system_state(); | 
|  367     cr->max_qdelta_perc = 50; |  367     cr->max_qdelta_perc = 50; | 
|  368     cr->time_for_refresh = 0; |  368     cr->time_for_refresh = 0; | 
|  369     // Set rate threshold to some multiple (set to 2 for now) of the target |  369     // Set rate threshold to some multiple (set to 2 for now) of the target | 
|  370     // rate (target is given by sb64_target_rate and scaled by 256). |  370     // rate (target is given by sb64_target_rate and scaled by 256). | 
|  371     cr->thresh_rate_sb = (rc->sb64_target_rate << 8) << 1; |  371     cr->thresh_rate_sb = ((int64_t)(rc->sb64_target_rate) << 8) << 1; | 
|  372     // Distortion threshold, quadratic in Q, scale factor to be adjusted. |  372     // Distortion threshold, quadratic in Q, scale factor to be adjusted. | 
|  373     cr->thresh_dist_sb = (int)(q * q) << 2; |  373     // q will not exceed 457, so (q * q) is within 32bit; see: | 
 |  374     // vp9_convert_qindex_to_q(), vp9_ac_quant(), ac_qlookup*[]. | 
 |  375     cr->thresh_dist_sb = ((int64_t)(q * q)) << 2; | 
|  374     cr->motion_thresh = 32; |  376     cr->motion_thresh = 32; | 
|  375     // Set up segmentation. |  377     // Set up segmentation. | 
|  376     // Clear down the segment map. |  378     // Clear down the segment map. | 
|  377     vp9_enable_segmentation(&cm->seg); |  379     vp9_enable_segmentation(&cm->seg); | 
|  378     vp9_clearall_segfeatures(seg); |  380     vp9_clearall_segfeatures(seg); | 
|  379     // Select delta coding method. |  381     // Select delta coding method. | 
|  380     seg->abs_delta = SEGMENT_DELTADATA; |  382     seg->abs_delta = SEGMENT_DELTADATA; | 
|  381  |  383  | 
|  382     // Note: setting temporal_update has no effect, as the seg-map coding method |  384     // Note: setting temporal_update has no effect, as the seg-map coding method | 
|  383     // (temporal or spatial) is determined in vp9_choose_segmap_coding_method(), |  385     // (temporal or spatial) is determined in vp9_choose_segmap_coding_method(), | 
| (...skipping 25 matching lines...) Expand all  Loading... | 
|  409     vp9_set_segdata(seg, CR_SEGMENT_ID_BOOST2, SEG_LVL_ALT_Q, qindex_delta); |  411     vp9_set_segdata(seg, CR_SEGMENT_ID_BOOST2, SEG_LVL_ALT_Q, qindex_delta); | 
|  410  |  412  | 
|  411     // Update the segmentation and refresh map. |  413     // Update the segmentation and refresh map. | 
|  412     vp9_cyclic_refresh_update_map(cpi); |  414     vp9_cyclic_refresh_update_map(cpi); | 
|  413   } |  415   } | 
|  414 } |  416 } | 
|  415  |  417  | 
|  416 int vp9_cyclic_refresh_get_rdmult(const CYCLIC_REFRESH *cr) { |  418 int vp9_cyclic_refresh_get_rdmult(const CYCLIC_REFRESH *cr) { | 
|  417   return cr->rdmult; |  419   return cr->rdmult; | 
|  418 } |  420 } | 
| OLD | NEW |