2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
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.
12 #ifndef VP8_COMMON_ONYXC_INT_H_
13 #define VP8_COMMON_ONYXC_INT_H_
15 #include "vpx_config.h"
17 #include "vpx/internal/vpx_codec_internal.h"
18 #include "loopfilter.h"
19 #include "entropymv.h"
25 /*#ifdef PACKET_TESTING*/
35 #define QINDEX_RANGE (MAXQ + 1)
37 #define NUM_YV12_BUFFERS 4
39 #define MAX_PARTITIONS 9
41 typedef struct frame_contexts
43 vp8_prob bmode_prob
[VP8_BINTRAMODES
-1];
44 vp8_prob ymode_prob
[VP8_YMODES
-1]; /* interframe intra mode probs */
45 vp8_prob uv_mode_prob
[VP8_UV_MODES
-1];
46 vp8_prob sub_mv_ref_prob
[VP8_SUBMVREFS
-1];
47 vp8_prob coef_probs
[BLOCK_TYPES
] [COEF_BANDS
] [PREV_COEF_CONTEXTS
] [ENTROPY_NODES
];
61 RECON_CLAMP_REQUIRED
= 0,
62 RECON_CLAMP_NOTREQUIRED
= 1
65 typedef struct VP8Common
68 struct vpx_internal_error_info error
;
70 DECLARE_ALIGNED(16, short, Y1dequant
[QINDEX_RANGE
][2]);
71 DECLARE_ALIGNED(16, short, Y2dequant
[QINDEX_RANGE
][2]);
72 DECLARE_ALIGNED(16, short, UVdequant
[QINDEX_RANGE
][2]);
79 CLAMP_TYPE clamp_type
;
81 YV12_BUFFER_CONFIG
*frame_to_show
;
83 YV12_BUFFER_CONFIG yv12_fb
[NUM_YV12_BUFFERS
];
84 int fb_idx_ref_cnt
[NUM_YV12_BUFFERS
];
85 int new_fb_idx
, lst_fb_idx
, gld_fb_idx
, alt_fb_idx
;
87 YV12_BUFFER_CONFIG temp_scale_frame
;
90 YV12_BUFFER_CONFIG post_proc_buffer
;
91 YV12_BUFFER_CONFIG post_proc_buffer_int
;
92 int post_proc_buffer_int_used
;
93 unsigned char *pp_limits_buffer
; /* post-processing filter coefficients */
96 FRAME_TYPE last_frame_type
; /* Save last frame's frame type for motion search. */
97 FRAME_TYPE frame_type
;
105 int mode_info_stride
;
107 /* profile settings */
108 int mb_no_coeff_skip
;
110 int use_bilinear_mc_filter
;
121 /* We allocate a MODE_INFO struct for each macroblock, together with
122 an extra row on top and column on the left to simplify prediction. */
124 MODE_INFO
*mip
; /* Base of allocated array */
125 MODE_INFO
*mi
; /* Corresponds to upper left visible macroblock */
126 #if CONFIG_ERROR_CONCEALMENT
127 MODE_INFO
*prev_mip
; /* MODE_INFO array 'mip' from last decoded frame */
128 MODE_INFO
*prev_mi
; /* 'mi' from last frame (points into prev_mip) */
130 MODE_INFO
*show_frame_mi
; /* MODE_INFO for the last decoded frame
132 LOOPFILTERTYPE filter_type
;
134 loop_filter_info_n lf_info
;
137 int last_sharpness_level
;
140 int refresh_last_frame
; /* Two state 0 = NO, 1 = YES */
141 int refresh_golden_frame
; /* Two state 0 = NO, 1 = YES */
142 int refresh_alt_ref_frame
; /* Two state 0 = NO, 1 = YES */
144 int copy_buffer_to_gf
; /* 0 none, 1 Last to GF, 2 ARF to GF */
145 int copy_buffer_to_arf
; /* 0 none, 1 Last to ARF, 2 GF to ARF */
147 int refresh_entropy_probs
; /* Two state 0 = NO, 1 = YES */
149 int ref_frame_sign_bias
[MAX_REF_FRAMES
]; /* Two state 0, 1 */
152 ENTROPY_CONTEXT_PLANES
*above_context
; /* row of context for each plane */
153 ENTROPY_CONTEXT_PLANES left_context
; /* (up to) 4 contexts "" */
155 FRAME_CONTEXT lfc
; /* last frame entropy */
156 FRAME_CONTEXT fc
; /* this frame entropy */
158 unsigned int current_video_frame
;
162 TOKEN_PARTITION multi_token_partition
;
164 #ifdef PACKET_TESTING
167 #if CONFIG_POSTPROC_VISUALIZER
172 #if CONFIG_MULTITHREAD
173 int processor_core_count
;
176 struct postproc_state postproc_state
;
185 #endif // VP8_COMMON_ONYXC_INT_H_