]> granicus.if.org Git - libvpx/blob - vp9/encoder/vp9_onyx_int.h
d325896b356e5606a2c1ed79c253bd0d149507a1
[libvpx] / vp9 / encoder / vp9_onyx_int.h
1 /*
2  *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3  *
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
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10
11
12 #ifndef VP9_ENCODER_VP9_ONYX_INT_H_
13 #define VP9_ENCODER_VP9_ONYX_INT_H_
14
15 #include <stdio.h>
16 #include "./vpx_config.h"
17 #include "vp9/common/vp9_onyx.h"
18 #include "vp9/encoder/vp9_treewriter.h"
19 #include "vp9/encoder/vp9_tokenize.h"
20 #include "vp9/common/vp9_onyxc_int.h"
21 #include "vp9/encoder/vp9_variance.h"
22 #include "vp9/encoder/vp9_encodemb.h"
23 #include "vp9/encoder/vp9_quantize.h"
24 #include "vp9/common/vp9_entropy.h"
25 #include "vp9/common/vp9_entropymode.h"
26 #include "vpx_ports/mem.h"
27 #include "vpx/internal/vpx_codec_internal.h"
28 #include "vp9/encoder/vp9_mcomp.h"
29 #include "vp9/common/vp9_findnearmv.h"
30 #include "vp9/encoder/vp9_lookahead.h"
31
32 // Experimental rate control switches
33 #if CONFIG_ONESHOTQ
34 #define ONE_SHOT_Q_ESTIMATE 0
35 #define STRICT_ONE_SHOT_Q 0
36 #define DISABLE_RC_LONG_TERM_MEM 0
37 #endif
38
39 // #define SPEEDSTATS 1
40 #if CONFIG_MULTIPLE_ARF
41 // Set MIN_GF_INTERVAL to 1 for the full decomposition.
42 #define MIN_GF_INTERVAL             2
43 #else
44 #define MIN_GF_INTERVAL             4
45 #endif
46 #define DEFAULT_GF_INTERVAL         7
47
48 #define KEY_FRAME_CONTEXT 5
49
50 #define MAX_MODES 36
51
52 #define MIN_THRESHMULT  32
53 #define MAX_THRESHMULT  512
54
55 #define GF_ZEROMV_ZBIN_BOOST 0
56 #define LF_ZEROMV_ZBIN_BOOST 0
57 #define MV_ZBIN_BOOST        0
58 #define SPLIT_MV_ZBIN_BOOST  0
59 #define INTRA_ZBIN_BOOST     0
60
61 typedef struct {
62   nmv_context nmvc;
63   int nmvjointcost[MV_JOINTS];
64   int nmvcosts[2][MV_VALS];
65   int nmvcosts_hp[2][MV_VALS];
66
67   vp9_prob segment_pred_probs[PREDICTION_PROBS];
68   vp9_prob intra_inter_prob[INTRA_INTER_CONTEXTS];
69   vp9_prob comp_inter_prob[COMP_INTER_CONTEXTS];
70   vp9_prob single_ref_prob[REF_CONTEXTS][2];
71   vp9_prob comp_ref_prob[REF_CONTEXTS];
72
73   unsigned char *last_frame_seg_map_copy;
74
75   // 0 = Intra, Last, GF, ARF
76   signed char last_ref_lf_deltas[MAX_REF_LF_DELTAS];
77   // 0 = ZERO_MV, MV
78   signed char last_mode_lf_deltas[MAX_MODE_LF_DELTAS];
79
80   vp9_coeff_probs_model coef_probs[TX_SIZE_MAX_SB][BLOCK_TYPES];
81
82   vp9_prob y_mode_prob[4][VP9_INTRA_MODES - 1];
83   vp9_prob uv_mode_prob[VP9_INTRA_MODES][VP9_INTRA_MODES - 1];
84   vp9_prob partition_prob[2][NUM_PARTITION_CONTEXTS][PARTITION_TYPES - 1];
85
86   vp9_prob switchable_interp_prob[VP9_SWITCHABLE_FILTERS + 1]
87                                  [VP9_SWITCHABLE_FILTERS - 1];
88
89   int inter_mode_counts[INTER_MODE_CONTEXTS][VP9_INTER_MODES - 1][2];
90   vp9_prob inter_mode_probs[INTER_MODE_CONTEXTS][VP9_INTER_MODES - 1];
91
92   vp9_prob tx_probs_8x8p[TX_SIZE_CONTEXTS][TX_SIZE_MAX_SB - 3];
93   vp9_prob tx_probs_16x16p[TX_SIZE_CONTEXTS][TX_SIZE_MAX_SB - 2];
94   vp9_prob tx_probs_32x32p[TX_SIZE_CONTEXTS][TX_SIZE_MAX_SB - 1];
95   vp9_prob mbskip_probs[MBSKIP_CONTEXTS];
96 } CODING_CONTEXT;
97
98 typedef struct {
99   double frame;
100   double intra_error;
101   double coded_error;
102   double sr_coded_error;
103   double ssim_weighted_pred_err;
104   double pcnt_inter;
105   double pcnt_motion;
106   double pcnt_second_ref;
107   double pcnt_neutral;
108   double MVr;
109   double mvr_abs;
110   double MVc;
111   double mvc_abs;
112   double MVrv;
113   double MVcv;
114   double mv_in_out_count;
115   double new_mv_count;
116   double duration;
117   double count;
118 } FIRSTPASS_STATS;
119
120 typedef struct {
121   int frames_so_far;
122   double frame_intra_error;
123   double frame_coded_error;
124   double frame_pcnt_inter;
125   double frame_pcnt_motion;
126   double frame_mvr;
127   double frame_mvr_abs;
128   double frame_mvc;
129   double frame_mvc_abs;
130 } ONEPASS_FRAMESTATS;
131
132 typedef struct {
133   struct {
134     int err;
135     union {
136       int_mv mv;
137       MB_PREDICTION_MODE mode;
138     } m;
139   } ref[MAX_REF_FRAMES];
140 } MBGRAPH_MB_STATS;
141
142 typedef struct {
143   MBGRAPH_MB_STATS *mb_stats;
144 } MBGRAPH_FRAME_STATS;
145
146 typedef enum {
147   THR_ZEROMV,
148   THR_DC,
149
150   THR_NEARESTMV,
151   THR_NEARMV,
152
153   THR_ZEROG,
154   THR_NEARESTG,
155
156   THR_ZEROA,
157   THR_NEARESTA,
158
159   THR_NEARG,
160   THR_NEARA,
161
162   THR_V_PRED,
163   THR_H_PRED,
164   THR_D45_PRED,
165   THR_D135_PRED,
166   THR_D117_PRED,
167   THR_D153_PRED,
168   THR_D27_PRED,
169   THR_D63_PRED,
170   THR_TM,
171
172   THR_NEWMV,
173   THR_NEWG,
174   THR_NEWA,
175
176   THR_SPLITMV,
177   THR_SPLITG,
178   THR_SPLITA,
179
180   THR_B_PRED,
181
182   THR_COMP_ZEROLA,
183   THR_COMP_NEARESTLA,
184   THR_COMP_NEARLA,
185
186   THR_COMP_ZEROGA,
187   THR_COMP_NEARESTGA,
188   THR_COMP_NEARGA,
189
190   THR_COMP_NEWLA,
191   THR_COMP_NEWGA,
192
193   THR_COMP_SPLITLA,
194   THR_COMP_SPLITGA,
195 } THR_MODES;
196
197 typedef enum {
198   DIAMOND = 0,
199   NSTEP = 1,
200   HEX = 2
201 } SEARCH_METHODS;
202
203 typedef enum {
204   USE_FULL_RD = 0,
205   USE_LARGESTINTRA,
206   USE_LARGESTINTRA_MODELINTER,
207   USE_LARGESTALL
208 } TX_SIZE_SEARCH_METHOD;
209
210 typedef struct {
211   int RD;
212   SEARCH_METHODS search_method;
213   int auto_filter;
214   int recode_loop;
215   int iterative_sub_pixel;
216   int half_pixel_search;
217   int quarter_pixel_search;
218   int thresh_mult[MAX_MODES];
219   int max_step_search_steps;
220   int reduce_first_step_size;
221   int auto_mv_step_size;
222   int optimize_coefficients;
223   int search_best_filter;
224   int static_segmentation;
225   int comp_inter_joint_search_thresh;
226   int adaptive_rd_thresh;
227   int skip_encode_sb;
228   int use_lastframe_partitioning;
229   TX_SIZE_SEARCH_METHOD tx_size_search_method;
230   int use_8tap_always;
231   int use_avoid_tested_higherror;
232   int skip_lots_of_modes;
233   int adjust_thresholds_by_speed;
234   int partition_by_variance;
235   int use_one_partition_size_always;
236   int less_rectangular_check;
237   int use_square_partition_only;
238   BLOCK_SIZE_TYPE always_this_block_size;
239   int use_partitions_greater_than;
240   BLOCK_SIZE_TYPE greater_than_block_size;
241   int use_partitions_less_than;
242   BLOCK_SIZE_TYPE less_than_block_size;
243   int adjust_partitioning_from_last_frame;
244   int last_partitioning_redo_frequency;
245   int disable_splitmv;
246   // Search the D27, D63, D117 and D153 modes
247   // only if the best intra mode so far is one
248   // of the two directional modes nearest to each.
249   int conditional_oblique_intramodes;
250 } SPEED_FEATURES;
251
252 enum BlockSize {
253   BLOCK_4X4,
254   BLOCK_4X8,
255   BLOCK_8X4,
256   BLOCK_8X8,
257   BLOCK_8X16,
258   BLOCK_16X8,
259   BLOCK_16X16,
260   BLOCK_32X32,
261   BLOCK_32X16,
262   BLOCK_16X32,
263   BLOCK_64X32,
264   BLOCK_32X64,
265   BLOCK_64X64,
266   BLOCK_MAX_SB_SEGMENTS,
267 };
268
269 typedef struct VP9_COMP {
270
271   DECLARE_ALIGNED(16, int16_t, y_quant[QINDEX_RANGE][8]);
272   DECLARE_ALIGNED(16, int16_t, y_quant_shift[QINDEX_RANGE][8]);
273   DECLARE_ALIGNED(16, int16_t, y_zbin[QINDEX_RANGE][8]);
274   DECLARE_ALIGNED(16, int16_t, y_round[QINDEX_RANGE][8]);
275
276   DECLARE_ALIGNED(16, int16_t, uv_quant[QINDEX_RANGE][8]);
277   DECLARE_ALIGNED(16, int16_t, uv_quant_shift[QINDEX_RANGE][8]);
278   DECLARE_ALIGNED(16, int16_t, uv_zbin[QINDEX_RANGE][8]);
279   DECLARE_ALIGNED(16, int16_t, uv_round[QINDEX_RANGE][8]);
280
281 #if CONFIG_ALPHA
282   DECLARE_ALIGNED(16, int16_t, a_quant[QINDEX_RANGE][8]);
283   DECLARE_ALIGNED(16, int16_t, a_quant_shift[QINDEX_RANGE][8]);
284   DECLARE_ALIGNED(16, int16_t, a_zbin[QINDEX_RANGE][8]);
285   DECLARE_ALIGNED(16, int16_t, a_round[QINDEX_RANGE][8]);
286 #endif
287
288   MACROBLOCK mb;
289   VP9_COMMON common;
290   VP9_CONFIG oxcf;
291
292   struct lookahead_ctx    *lookahead;
293   struct lookahead_entry  *source;
294 #if CONFIG_MULTIPLE_ARF
295   struct lookahead_entry  *alt_ref_source[NUM_REF_FRAMES];
296 #else
297   struct lookahead_entry  *alt_ref_source;
298 #endif
299
300   YV12_BUFFER_CONFIG *Source;
301   YV12_BUFFER_CONFIG *un_scaled_source;
302   YV12_BUFFER_CONFIG scaled_source;
303
304   int source_alt_ref_pending; // frame in src_buffers has been identified to be encoded as an alt ref
305   int source_alt_ref_active;  // an alt ref frame has been encoded and is usable
306
307   int is_src_frame_alt_ref;   // source of frame to encode is an exact copy of an alt ref frame
308
309   int gold_is_last; // golden frame same as last frame ( short circuit gold searches)
310   int alt_is_last;  // Alt reference frame same as last ( short circuit altref search)
311   int gold_is_alt;  // don't do both alt and gold search ( just do gold).
312
313   int scaled_ref_idx[3];
314   int lst_fb_idx;
315   int gld_fb_idx;
316   int alt_fb_idx;
317 #if CONFIG_MULTIPLE_ARF
318   int alt_ref_fb_idx[NUM_REF_FRAMES - 3];
319 #endif
320   int refresh_last_frame;
321   int refresh_golden_frame;
322   int refresh_alt_ref_frame;
323   YV12_BUFFER_CONFIG last_frame_uf;
324
325   TOKENEXTRA *tok;
326   unsigned int tok_count[4][1 << 6];
327
328
329   unsigned int frames_since_key;
330   unsigned int key_frame_frequency;
331   unsigned int this_key_frame_forced;
332   unsigned int next_key_frame_forced;
333 #if CONFIG_MULTIPLE_ARF
334   // Position within a frame coding order (including any additional ARF frames).
335   unsigned int sequence_number;
336   // Next frame in naturally occurring order that has not yet been coded.
337   int next_frame_in_order;
338 #endif
339
340   // Ambient reconstruction err target for force key frames
341   int ambient_err;
342
343   unsigned int mode_check_freq[MAX_MODES];
344   unsigned int mode_test_hit_counts[MAX_MODES];
345   unsigned int mode_chosen_counts[MAX_MODES];
346
347   int rd_thresh_mult[MAX_MODES];
348   int rd_baseline_thresh[BLOCK_SIZE_TYPES][MAX_MODES];
349   int rd_threshes[BLOCK_SIZE_TYPES][MAX_MODES];
350   int rd_thresh_freq_fact[BLOCK_SIZE_TYPES][MAX_MODES];
351
352   int64_t rd_comp_pred_diff[NB_PREDICTION_TYPES];
353   int rd_prediction_type_threshes[4][NB_PREDICTION_TYPES];
354   unsigned int intra_inter_count[INTRA_INTER_CONTEXTS][2];
355   unsigned int comp_inter_count[COMP_INTER_CONTEXTS][2];
356   unsigned int single_ref_count[REF_CONTEXTS][2][2];
357   unsigned int comp_ref_count[REF_CONTEXTS][2];
358
359   // FIXME contextualize
360
361   int64_t rd_tx_select_diff[NB_TXFM_MODES];
362   int rd_tx_select_threshes[4][NB_TXFM_MODES];
363
364   int RDMULT;
365   int RDDIV;
366
367   CODING_CONTEXT coding_context;
368
369   // Rate targetting variables
370   int this_frame_target;
371   int projected_frame_size;
372   int last_q[2];                   // Separate values for Intra/Inter
373   int last_boosted_qindex;         // Last boosted GF/KF/ARF q
374
375   double rate_correction_factor;
376   double key_frame_rate_correction_factor;
377   double gf_rate_correction_factor;
378
379   int frames_till_gf_update_due;      // Count down till next GF
380
381   int gf_overspend_bits;            // Total bits overspent becasue of GF boost (cumulative)
382
383   int non_gf_bitrate_adjustment;     // Used in the few frames following a GF to recover the extra bits spent in that GF
384
385   int kf_overspend_bits;            // Extra bits spent on key frames that need to be recovered on inter frames
386   int kf_bitrate_adjustment;        // Current number of bit s to try and recover on each inter frame.
387   int max_gf_interval;
388   int baseline_gf_interval;
389   int active_arnr_frames;           // <= cpi->oxcf.arnr_max_frames
390   int active_arnr_strength;         // <= cpi->oxcf.arnr_max_strength
391
392   int64_t key_frame_count;
393   int prior_key_frame_distance[KEY_FRAME_CONTEXT];
394   int per_frame_bandwidth;          // Current section per frame bandwidth target
395   int av_per_frame_bandwidth;        // Average frame size target for clip
396   int min_frame_bandwidth;          // Minimum allocation that should be used for any frame
397   int inter_frame_target;
398   double output_frame_rate;
399   int64_t last_time_stamp_seen;
400   int64_t last_end_time_stamp_seen;
401   int64_t first_time_stamp_ever;
402
403   int ni_av_qi;
404   int ni_tot_qi;
405   int ni_frames;
406   int avg_frame_qindex;
407   double tot_q;
408   double avg_q;
409
410   int zbin_mode_boost;
411   int zbin_mode_boost_enabled;
412
413   int64_t total_byte_count;
414
415   int buffered_mode;
416
417   int buffer_level;
418   int bits_off_target;
419
420   int rolling_target_bits;
421   int rolling_actual_bits;
422
423   int long_rolling_target_bits;
424   int long_rolling_actual_bits;
425
426   int64_t total_actual_bits;
427   int total_target_vs_actual;        // debug stats
428
429   int worst_quality;
430   int active_worst_quality;
431   int best_quality;
432   int active_best_quality;
433
434   int cq_target_quality;
435
436   int y_mode_count[4][VP9_INTRA_MODES];
437   int y_uv_mode_count[VP9_INTRA_MODES][VP9_INTRA_MODES];
438   unsigned int partition_count[NUM_PARTITION_CONTEXTS][PARTITION_TYPES];
439
440   nmv_context_counts NMVcount;
441
442   vp9_coeff_count coef_counts[TX_SIZE_MAX_SB][BLOCK_TYPES];
443   vp9_coeff_probs_model frame_coef_probs[TX_SIZE_MAX_SB][BLOCK_TYPES];
444   vp9_coeff_stats frame_branch_ct[TX_SIZE_MAX_SB][BLOCK_TYPES];
445
446   int gfu_boost;
447   int last_boost;
448   int kf_boost;
449   int kf_zeromotion_pct;
450
451   int64_t target_bandwidth;
452   struct vpx_codec_pkt_list  *output_pkt_list;
453
454 #if 0
455   // Experimental code for lagged and one pass
456   ONEPASS_FRAMESTATS one_pass_frame_stats[MAX_LAG_BUFFERS];
457   int one_pass_frame_index;
458 #endif
459   MBGRAPH_FRAME_STATS mbgraph_stats[MAX_LAG_BUFFERS];
460   int mbgraph_n_frames;             // number of frames filled in the above
461   int static_mb_pct;                // % forced skip mbs by segmentation
462   int seg0_progress, seg0_idx, seg0_cnt;
463
464   int decimation_factor;
465   int decimation_count;
466
467   // for real time encoding
468   int avg_encode_time;              // microsecond
469   int avg_pick_mode_time;            // microsecond
470   int speed;
471   unsigned int cpu_freq;           // Mhz
472   int compressor_speed;
473
474   int interquantizer;
475   int goldfreq;
476   int auto_worst_q;
477   int cpu_used;
478   int pass;
479
480   vp9_prob last_skip_false_probs[3][MBSKIP_CONTEXTS];
481   int last_skip_probs_q[3];
482
483   int ref_frame_flags;
484
485   SPEED_FEATURES sf;
486   int error_bins[1024];
487
488   unsigned int max_mv_magnitude;
489
490   // Data used for real time conferencing mode to help determine if it would be good to update the gf
491   int inter_zz_count;
492   int gf_bad_count;
493   int gf_update_recommended;
494
495   unsigned char *segmentation_map;
496
497   // segment threashold for encode breakout
498   int  segment_encode_breakout[MAX_MB_SEGMENTS];
499
500   unsigned char *active_map;
501   unsigned int active_map_enabled;
502
503   fractional_mv_step_fp *find_fractional_mv_step;
504   vp9_full_search_fn_t full_search_sad;
505   vp9_refining_search_fn_t refining_search_sad;
506   vp9_diamond_search_fn_t diamond_search_sad;
507   vp9_variance_fn_ptr_t fn_ptr[BLOCK_MAX_SB_SEGMENTS];
508   uint64_t time_receive_data;
509   uint64_t time_compress_data;
510   uint64_t time_pick_lpf;
511   uint64_t time_encode_mb_row;
512
513   struct twopass_rc {
514     unsigned int section_intra_rating;
515     unsigned int next_iiratio;
516     unsigned int this_iiratio;
517     FIRSTPASS_STATS total_stats;
518     FIRSTPASS_STATS this_frame_stats;
519     FIRSTPASS_STATS *stats_in, *stats_in_end, *stats_in_start;
520     FIRSTPASS_STATS total_left_stats;
521     int first_pass_done;
522     int64_t bits_left;
523     int64_t clip_bits_total;
524     double avg_iiratio;
525     double modified_error_total;
526     double modified_error_used;
527     double modified_error_left;
528     double kf_intra_err_min;
529     double gf_intra_err_min;
530     int frames_to_key;
531     int maxq_max_limit;
532     int maxq_min_limit;
533     int static_scene_max_gf_interval;
534     int kf_bits;
535     // Remaining error from uncoded frames in a gf group. Two pass use only
536     int64_t gf_group_error_left;
537
538     // Projected total bits available for a key frame group of frames
539     int64_t kf_group_bits;
540
541     // Error score of frames still to be coded in kf group
542     int64_t kf_group_error_left;
543
544     // Projected Bits available for a group of frames including 1 GF or ARF
545     int64_t gf_group_bits;
546     // Bits for the golden frame or ARF - 2 pass only
547     int gf_bits;
548     int alt_extra_bits;
549
550     int sr_update_lag;
551     double est_max_qcorrection_factor;
552   } twopass;
553
554   YV12_BUFFER_CONFIG alt_ref_buffer;
555   YV12_BUFFER_CONFIG *frames[MAX_LAG_BUFFERS];
556   int fixed_divide[512];
557
558 #if CONFIG_INTERNAL_STATS
559   int    count;
560   double total_y;
561   double total_u;
562   double total_v;
563   double total;
564   double total_sq_error;
565   double totalp_y;
566   double totalp_u;
567   double totalp_v;
568   double totalp;
569   double total_sq_error2;
570   int    bytes;
571   double summed_quality;
572   double summed_weights;
573   double summedp_quality;
574   double summedp_weights;
575   unsigned int tot_recode_hits;
576
577
578   double total_ssimg_y;
579   double total_ssimg_u;
580   double total_ssimg_v;
581   double total_ssimg_all;
582
583   int b_calculate_ssimg;
584 #endif
585   int b_calculate_psnr;
586
587   // Per MB activity measurement
588   unsigned int activity_avg;
589   unsigned int *mb_activity_map;
590   int *mb_norm_activity_map;
591   int output_partition;
592
593   /* force next frame to intra when kf_auto says so */
594   int force_next_frame_intra;
595
596   int droppable;
597
598   int dummy_packing;    /* flag to indicate if packing is dummy */
599
600   unsigned int switchable_interp_count[VP9_SWITCHABLE_FILTERS + 1]
601                                       [VP9_SWITCHABLE_FILTERS];
602   unsigned int best_switchable_interp_count[VP9_SWITCHABLE_FILTERS];
603
604   unsigned int txfm_stepdown_count[TX_SIZE_MAX_SB];
605
606   int initial_width;
607   int initial_height;
608
609 #if CONFIG_MULTIPLE_ARF
610   // ARF tracking variables.
611   int multi_arf_enabled;
612   unsigned int frame_coding_order_period;
613   unsigned int new_frame_coding_order_period;
614   int frame_coding_order[MAX_LAG_BUFFERS * 2];
615   int arf_buffer_idx[MAX_LAG_BUFFERS * 3 / 2];
616   int arf_weight[MAX_LAG_BUFFERS];
617   int arf_buffered;
618   int this_frame_weight;
619   int max_arf_level;
620 #endif
621
622 #ifdef ENTROPY_STATS
623   int64_t mv_ref_stats[INTER_MODE_CONTEXTS][VP9_INTER_MODES - 1][2];
624 #endif
625 } VP9_COMP;
626
627 static int get_ref_frame_idx(VP9_COMP *cpi, MV_REFERENCE_FRAME ref_frame) {
628   if (ref_frame == LAST_FRAME) {
629     return cpi->lst_fb_idx;
630   } else if (ref_frame == GOLDEN_FRAME) {
631     return cpi->gld_fb_idx;
632   } else {
633     return cpi->alt_fb_idx;
634   }
635 }
636
637 void vp9_encode_frame(VP9_COMP *cpi);
638
639 void vp9_pack_bitstream(VP9_COMP *cpi, unsigned char *dest,
640                         unsigned long *size);
641
642 void vp9_activity_masking(VP9_COMP *cpi, MACROBLOCK *x);
643
644 void vp9_set_speed_features(VP9_COMP *cpi);
645
646 extern int vp9_calc_ss_err(YV12_BUFFER_CONFIG *source,
647                            YV12_BUFFER_CONFIG *dest);
648
649 extern void vp9_alloc_compressor_data(VP9_COMP *cpi);
650
651 #endif  // VP9_ENCODER_VP9_ONYX_INT_H_