| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 typedef struct { | 44 typedef struct { |
| 45 double frame; | 45 double frame; |
| 46 double weight; | 46 double weight; |
| 47 double intra_error; | 47 double intra_error; |
| 48 double coded_error; | 48 double coded_error; |
| 49 double sr_coded_error; | 49 double sr_coded_error; |
| 50 double pcnt_inter; | 50 double pcnt_inter; |
| 51 double pcnt_motion; | 51 double pcnt_motion; |
| 52 double pcnt_second_ref; | 52 double pcnt_second_ref; |
| 53 double pcnt_neutral; | 53 double pcnt_neutral; |
| 54 double intra_skip_pct; |
| 55 double inactive_zone_rows; // Image mask rows top and bottom. |
| 54 double MVr; | 56 double MVr; |
| 55 double mvr_abs; | 57 double mvr_abs; |
| 56 double MVc; | 58 double MVc; |
| 57 double mvc_abs; | 59 double mvc_abs; |
| 58 double MVrv; | 60 double MVrv; |
| 59 double MVcv; | 61 double MVcv; |
| 60 double mv_in_out_count; | 62 double mv_in_out_count; |
| 61 double new_mv_count; | 63 double new_mv_count; |
| 62 double duration; | 64 double duration; |
| 63 double count; | 65 double count; |
| 64 int64_t spatial_layer_id; | 66 int64_t spatial_layer_id; |
| 65 } FIRSTPASS_STATS; | 67 } FIRSTPASS_STATS; |
| 66 | 68 |
| 67 typedef enum { | 69 typedef enum { |
| 68 KF_UPDATE = 0, | 70 KF_UPDATE = 0, |
| 69 LF_UPDATE = 1, | 71 LF_UPDATE = 1, |
| 70 GF_UPDATE = 2, | 72 GF_UPDATE = 2, |
| 71 ARF_UPDATE = 3, | 73 ARF_UPDATE = 3, |
| 72 OVERLAY_UPDATE = 4, | 74 OVERLAY_UPDATE = 4, |
| 73 FRAME_UPDATE_TYPES = 5 | 75 FRAME_UPDATE_TYPES = 5 |
| 74 } FRAME_UPDATE_TYPE; | 76 } FRAME_UPDATE_TYPE; |
| 75 | 77 |
| 78 #define FC_ANIMATION_THRESH 0.15 |
| 79 typedef enum { |
| 80 FC_NORMAL = 0, |
| 81 FC_GRAPHICS_ANIMATION = 1, |
| 82 FRAME_CONTENT_TYPES = 2 |
| 83 } FRAME_CONTENT_TYPE; |
| 84 |
| 76 typedef struct { | 85 typedef struct { |
| 77 unsigned char index; | 86 unsigned char index; |
| 78 RATE_FACTOR_LEVEL rf_level[(MAX_LAG_BUFFERS * 2) + 1]; | 87 RATE_FACTOR_LEVEL rf_level[(MAX_LAG_BUFFERS * 2) + 1]; |
| 79 FRAME_UPDATE_TYPE update_type[(MAX_LAG_BUFFERS * 2) + 1]; | 88 FRAME_UPDATE_TYPE update_type[(MAX_LAG_BUFFERS * 2) + 1]; |
| 80 unsigned char arf_src_offset[(MAX_LAG_BUFFERS * 2) + 1]; | 89 unsigned char arf_src_offset[(MAX_LAG_BUFFERS * 2) + 1]; |
| 81 unsigned char arf_update_idx[(MAX_LAG_BUFFERS * 2) + 1]; | 90 unsigned char arf_update_idx[(MAX_LAG_BUFFERS * 2) + 1]; |
| 82 unsigned char arf_ref_idx[(MAX_LAG_BUFFERS * 2) + 1]; | 91 unsigned char arf_ref_idx[(MAX_LAG_BUFFERS * 2) + 1]; |
| 83 int bit_allocation[(MAX_LAG_BUFFERS * 2) + 1]; | 92 int bit_allocation[(MAX_LAG_BUFFERS * 2) + 1]; |
| 84 } GF_GROUP; | 93 } GF_GROUP; |
| 85 | 94 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 96 double modified_error_min; | 105 double modified_error_min; |
| 97 double modified_error_max; | 106 double modified_error_max; |
| 98 double modified_error_left; | 107 double modified_error_left; |
| 99 double mb_av_energy; | 108 double mb_av_energy; |
| 100 | 109 |
| 101 #if CONFIG_FP_MB_STATS | 110 #if CONFIG_FP_MB_STATS |
| 102 uint8_t *frame_mb_stats_buf; | 111 uint8_t *frame_mb_stats_buf; |
| 103 uint8_t *this_frame_mb_stats; | 112 uint8_t *this_frame_mb_stats; |
| 104 FIRSTPASS_MB_STATS firstpass_mb_stats; | 113 FIRSTPASS_MB_STATS firstpass_mb_stats; |
| 105 #endif | 114 #endif |
| 115 // An indication of the content type of the current frame |
| 116 FRAME_CONTENT_TYPE fr_content_type; |
| 106 | 117 |
| 107 // Projected total bits available for a key frame group of frames | 118 // Projected total bits available for a key frame group of frames |
| 108 int64_t kf_group_bits; | 119 int64_t kf_group_bits; |
| 109 | 120 |
| 110 // Error score of frames still to be coded in kf group | 121 // Error score of frames still to be coded in kf group |
| 111 int64_t kf_group_error_left; | 122 int64_t kf_group_error_left; |
| 112 | 123 |
| 113 // The fraction for a kf groups total bits allocated to the inter frames | 124 // The fraction for a kf groups total bits allocated to the inter frames |
| 114 double kfgroup_inter_fraction; | 125 double kfgroup_inter_fraction; |
| 115 | 126 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 145 | 156 |
| 146 void calculate_coded_size(struct VP9_COMP *cpi, | 157 void calculate_coded_size(struct VP9_COMP *cpi, |
| 147 int *scaled_frame_width, | 158 int *scaled_frame_width, |
| 148 int *scaled_frame_height); | 159 int *scaled_frame_height); |
| 149 | 160 |
| 150 #ifdef __cplusplus | 161 #ifdef __cplusplus |
| 151 } // extern "C" | 162 } // extern "C" |
| 152 #endif | 163 #endif |
| 153 | 164 |
| 154 #endif // VP9_ENCODER_VP9_FIRSTPASS_H_ | 165 #endif // VP9_ENCODER_VP9_FIRSTPASS_H_ |
| OLD | NEW |