diff options
author | John Koleszar <jkoleszar@google.com> | 2011-05-21 00:05:14 -0400 |
---|---|---|
committer | John Koleszar <jkoleszar@google.com> | 2011-05-21 00:05:14 -0400 |
commit | 4d240d1eae9fc88278a358a075735b84f8da89e2 (patch) | |
tree | e3f79482b16237981269b413da7787885dde56e6 /vp8/encoder/onyx_int.h | |
parent | 54bc4fde77f0c3ed42907d3c86ecc51cf8cddc80 (diff) | |
parent | ad6fe4a88c9d051a34c85d3f422cde5819f2bbdf (diff) | |
download | libvpx-4d240d1eae9fc88278a358a075735b84f8da89e2.tar libvpx-4d240d1eae9fc88278a358a075735b84f8da89e2.tar.gz libvpx-4d240d1eae9fc88278a358a075735b84f8da89e2.tar.bz2 libvpx-4d240d1eae9fc88278a358a075735b84f8da89e2.zip |
Merge remote branch 'origin/master' into experimental
Change-Id: I90a1d0095712e0474b0c03773b57376911027fc6
Diffstat (limited to 'vp8/encoder/onyx_int.h')
-rw-r--r-- | vp8/encoder/onyx_int.h | 135 |
1 files changed, 41 insertions, 94 deletions
diff --git a/vp8/encoder/onyx_int.h b/vp8/encoder/onyx_int.h index e23e9d371..663786004 100644 --- a/vp8/encoder/onyx_int.h +++ b/vp8/encoder/onyx_int.h @@ -313,10 +313,6 @@ typedef struct VP8_COMP int rd_thresh_mult[MAX_MODES]; int rd_baseline_thresh[MAX_MODES]; int rd_threshes[MAX_MODES]; - int mvcostbase; - int mvcostmultiplier; - int subseqblockweight; - int errthresh; int RDMULT; int RDDIV ; @@ -329,16 +325,6 @@ typedef struct VP8_COMP long long intra_error; long long last_intra_error; -#if 0 - // Experimental RD code - long long frame_distortion; - long long last_frame_distortion; -#endif - - int last_mb_distortion; - - int frames_since_auto_filter; - int this_frame_target; int projected_frame_size; int last_q[2]; // Separate values for Intra/Inter @@ -346,37 +332,18 @@ typedef struct VP8_COMP double rate_correction_factor; double key_frame_rate_correction_factor; double gf_rate_correction_factor; - double est_max_qcorrection_factor; int frames_till_gf_update_due; // Count down till next GF int current_gf_interval; // GF interval chosen when we coded the last GF int gf_overspend_bits; // Total bits overspent becasue of GF boost (cumulative) - int gf_group_bits; // Projected Bits available for a group of frames including 1 GF or ARF - int gf_bits; // Bits for the golden frame or ARF - 2 pass only - int mid_gf_extra_bits; // A few extra bits for the frame half way between two gfs. - - // Projected total bits available for a key frame group of frames - long long kf_group_bits; - - // Error score of frames still to be coded in kf group - long long kf_group_error_left; - - // Bits for the key frame in a key frame group - 2 pass only - int kf_bits; - int non_gf_bitrate_adjustment; // Used in the few frames following a GF to recover the extra bits spent in that GF - int initial_gf_use; // percentage use of gf 2 frames after gf - - int gf_group_error_left; // Remaining error from uncoded frames in a gf group. Two pass use only int kf_overspend_bits; // Extra bits spent on key frames that need to be recovered on inter frames int kf_bitrate_adjustment; // Current number of bit s to try and recover on each inter frame. int max_gf_interval; - int static_scene_max_gf_interval; int baseline_gf_interval; - int gf_decay_rate; int active_arnr_frames; // <= cpi->oxcf.arnr_max_frames INT64 key_frame_count; @@ -384,7 +351,6 @@ typedef struct VP8_COMP int per_frame_bandwidth; // Current section per frame bandwidth target int av_per_frame_bandwidth; // Average frame size target for clip int min_frame_bandwidth; // Minimum allocation that should be used for any frame - int last_key_frame_size; int inter_frame_target; double output_frame_rate; long long last_time_stamp_seen; @@ -422,8 +388,6 @@ typedef struct VP8_COMP int active_best_quality; int cq_target_quality; - int maxq_max_limit; - int maxq_min_limit; int drop_frames_allowed; // Are we permitted to drop frames? int drop_frame; // Drop this frame? @@ -443,39 +407,12 @@ typedef struct VP8_COMP vp8_prob frame_coef_probs [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [vp8_coef_tokens-1]; unsigned int frame_branch_ct [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [vp8_coef_tokens-1][2]; - /* Second compressed data partition contains coefficient data. */ - - unsigned char *output_partition2; - size_t output_partition2size; - - int frames_to_key; int gfu_boost; int kf_boost; int last_boost; - double total_error_left; - double total_intra_error_left; - double total_coded_error_left; - double start_tot_err_left; - double min_error; - double kf_intra_err_min; - double gf_intra_err_min; - - double modified_error_total; - double modified_error_used; - double modified_error_left; - double clip_bpe; - double observed_bpe; - - double avg_iiratio; int target_bandwidth; - long long bits_left; - long long clip_bits_total; - FIRSTPASS_STATS *total_stats; - FIRSTPASS_STATS *this_frame_stats; - FIRSTPASS_STATS *stats_in, *stats_in_end; struct vpx_codec_pkt_list *output_pkt_list; - int first_pass_done; #if 0 // Experimental code for lagged and one pass @@ -499,7 +436,6 @@ typedef struct VP8_COMP int goldfreq; int auto_worst_q; int cpu_used; - int chroma_boost; int horiz_scale; int vert_scale; int pass; @@ -517,31 +453,11 @@ typedef struct VP8_COMP int this_frame_percent_intra; int last_frame_percent_intra; - int last_key_frame_q; - int last_kffilt_lvl; - int ref_frame_flags; SPEED_FEATURES sf; int error_bins[1024]; - int inter_lvl; - int intra_lvl; - int motion_lvl; - int motion_speed; - int motion_var; - unsigned int next_iiratio; - unsigned int this_iiratio; - int this_frame_modified_error; - - double norm_intra_err_per_mb; - double norm_inter_err_per_mb; - double norm_iidiff_per_mb; - - int last_best_mode_index; // Record of mode index chosen for previous macro block. - int last_auto_filt_val; - int last_auto_filt_q; - // Data used for real time conferencing mode to help determine if it would be good to update the gf int inter_zz_count; int gf_bad_count; @@ -549,10 +465,6 @@ typedef struct VP8_COMP int skip_true_count; int skip_false_count; - int alt_qcount; - - int ready_for_new_frame; - unsigned char *segmentation_map; signed char segment_feature_data[MB_LVL_MAX][MAX_MB_SEGMENTS]; // Segment data (can be deltas or absolute values) int segment_encode_breakout[MAX_MB_SEGMENTS]; // segment threashold for encode breakout @@ -602,14 +514,49 @@ typedef struct VP8_COMP unsigned int time_pick_lpf; unsigned int time_encode_mb_row; - unsigned int tempdata1; - unsigned int tempdata2; - int base_skip_false_prob[128]; - unsigned int section_intra_rating; - - double section_max_qfactor; + struct twopass_rc + { + unsigned int section_intra_rating; + double section_max_qfactor; + unsigned int next_iiratio; + unsigned int this_iiratio; + FIRSTPASS_STATS *total_stats; + FIRSTPASS_STATS *this_frame_stats; + FIRSTPASS_STATS *stats_in, *stats_in_end; + int first_pass_done; + long long bits_left; + long long clip_bits_total; + double avg_iiratio; + double modified_error_total; + double modified_error_used; + double modified_error_left; + double total_error_left; + double total_intra_error_left; + double total_coded_error_left; + double start_tot_err_left; + double kf_intra_err_min; + double gf_intra_err_min; + int frames_to_key; + int maxq_max_limit; + int maxq_min_limit; + int gf_decay_rate; + int static_scene_max_gf_interval; + int kf_bits; + int gf_group_error_left; // Remaining error from uncoded frames in a gf group. Two pass use only + + // Projected total bits available for a key frame group of frames + long long kf_group_bits; + + // Error score of frames still to be coded in kf group + long long kf_group_error_left; + + int gf_group_bits; // Projected Bits available for a group of frames including 1 GF or ARF + int gf_bits; // Bits for the golden frame or ARF - 2 pass only + int mid_gf_extra_bits; // A few extra bits for the frame half way between two gfs. + double est_max_qcorrection_factor; + } twopass; #if CONFIG_RUNTIME_CPU_DETECT VP8_ENCODER_RTCD rtcd; |