1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/media/libvpx/vp8/common/onyxc_int.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,177 @@ 1.4 +/* 1.5 + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 1.6 + * 1.7 + * Use of this source code is governed by a BSD-style license 1.8 + * that can be found in the LICENSE file in the root of the source 1.9 + * tree. An additional intellectual property rights grant can be found 1.10 + * in the file PATENTS. All contributing project authors may 1.11 + * be found in the AUTHORS file in the root of the source tree. 1.12 + */ 1.13 + 1.14 + 1.15 +#ifndef __INC_VP8C_INT_H 1.16 +#define __INC_VP8C_INT_H 1.17 + 1.18 +#include "vpx_config.h" 1.19 +#include "vp8_rtcd.h" 1.20 +#include "vpx/internal/vpx_codec_internal.h" 1.21 +#include "loopfilter.h" 1.22 +#include "entropymv.h" 1.23 +#include "entropy.h" 1.24 +#if CONFIG_POSTPROC 1.25 +#include "postproc.h" 1.26 +#endif 1.27 + 1.28 +/*#ifdef PACKET_TESTING*/ 1.29 +#include "header.h" 1.30 +/*#endif*/ 1.31 + 1.32 +#define MINQ 0 1.33 +#define MAXQ 127 1.34 +#define QINDEX_RANGE (MAXQ + 1) 1.35 + 1.36 +#define NUM_YV12_BUFFERS 4 1.37 + 1.38 +#define MAX_PARTITIONS 9 1.39 + 1.40 +typedef struct frame_contexts 1.41 +{ 1.42 + vp8_prob bmode_prob [VP8_BINTRAMODES-1]; 1.43 + vp8_prob ymode_prob [VP8_YMODES-1]; /* interframe intra mode probs */ 1.44 + vp8_prob uv_mode_prob [VP8_UV_MODES-1]; 1.45 + vp8_prob sub_mv_ref_prob [VP8_SUBMVREFS-1]; 1.46 + vp8_prob coef_probs [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [ENTROPY_NODES]; 1.47 + MV_CONTEXT mvc[2]; 1.48 +} FRAME_CONTEXT; 1.49 + 1.50 +typedef enum 1.51 +{ 1.52 + ONE_PARTITION = 0, 1.53 + TWO_PARTITION = 1, 1.54 + FOUR_PARTITION = 2, 1.55 + EIGHT_PARTITION = 3 1.56 +} TOKEN_PARTITION; 1.57 + 1.58 +typedef enum 1.59 +{ 1.60 + RECON_CLAMP_REQUIRED = 0, 1.61 + RECON_CLAMP_NOTREQUIRED = 1 1.62 +} CLAMP_TYPE; 1.63 + 1.64 +typedef struct VP8Common 1.65 + 1.66 +{ 1.67 + struct vpx_internal_error_info error; 1.68 + 1.69 + DECLARE_ALIGNED(16, short, Y1dequant[QINDEX_RANGE][2]); 1.70 + DECLARE_ALIGNED(16, short, Y2dequant[QINDEX_RANGE][2]); 1.71 + DECLARE_ALIGNED(16, short, UVdequant[QINDEX_RANGE][2]); 1.72 + 1.73 + int Width; 1.74 + int Height; 1.75 + int horiz_scale; 1.76 + int vert_scale; 1.77 + 1.78 + CLAMP_TYPE clamp_type; 1.79 + 1.80 + YV12_BUFFER_CONFIG *frame_to_show; 1.81 + 1.82 + YV12_BUFFER_CONFIG yv12_fb[NUM_YV12_BUFFERS]; 1.83 + int fb_idx_ref_cnt[NUM_YV12_BUFFERS]; 1.84 + int new_fb_idx, lst_fb_idx, gld_fb_idx, alt_fb_idx; 1.85 + 1.86 + YV12_BUFFER_CONFIG temp_scale_frame; 1.87 + 1.88 +#if CONFIG_POSTPROC 1.89 + YV12_BUFFER_CONFIG post_proc_buffer; 1.90 + YV12_BUFFER_CONFIG post_proc_buffer_int; 1.91 + int post_proc_buffer_int_used; 1.92 + unsigned char *pp_limits_buffer; /* post-processing filter coefficients */ 1.93 +#endif 1.94 + 1.95 + FRAME_TYPE last_frame_type; /* Save last frame's frame type for motion search. */ 1.96 + FRAME_TYPE frame_type; 1.97 + 1.98 + int show_frame; 1.99 + 1.100 + int frame_flags; 1.101 + int MBs; 1.102 + int mb_rows; 1.103 + int mb_cols; 1.104 + int mode_info_stride; 1.105 + 1.106 + /* profile settings */ 1.107 + int mb_no_coeff_skip; 1.108 + int no_lpf; 1.109 + int use_bilinear_mc_filter; 1.110 + int full_pixel; 1.111 + 1.112 + int base_qindex; 1.113 + 1.114 + int y1dc_delta_q; 1.115 + int y2dc_delta_q; 1.116 + int y2ac_delta_q; 1.117 + int uvdc_delta_q; 1.118 + int uvac_delta_q; 1.119 + 1.120 + /* We allocate a MODE_INFO struct for each macroblock, together with 1.121 + an extra row on top and column on the left to simplify prediction. */ 1.122 + 1.123 + MODE_INFO *mip; /* Base of allocated array */ 1.124 + MODE_INFO *mi; /* Corresponds to upper left visible macroblock */ 1.125 +#if CONFIG_ERROR_CONCEALMENT 1.126 + MODE_INFO *prev_mip; /* MODE_INFO array 'mip' from last decoded frame */ 1.127 + MODE_INFO *prev_mi; /* 'mi' from last frame (points into prev_mip) */ 1.128 +#endif 1.129 + MODE_INFO *show_frame_mi; /* MODE_INFO for the last decoded frame 1.130 + to show */ 1.131 + LOOPFILTERTYPE filter_type; 1.132 + 1.133 + loop_filter_info_n lf_info; 1.134 + 1.135 + int filter_level; 1.136 + int last_sharpness_level; 1.137 + int sharpness_level; 1.138 + 1.139 + int refresh_last_frame; /* Two state 0 = NO, 1 = YES */ 1.140 + int refresh_golden_frame; /* Two state 0 = NO, 1 = YES */ 1.141 + int refresh_alt_ref_frame; /* Two state 0 = NO, 1 = YES */ 1.142 + 1.143 + int copy_buffer_to_gf; /* 0 none, 1 Last to GF, 2 ARF to GF */ 1.144 + int copy_buffer_to_arf; /* 0 none, 1 Last to ARF, 2 GF to ARF */ 1.145 + 1.146 + int refresh_entropy_probs; /* Two state 0 = NO, 1 = YES */ 1.147 + 1.148 + int ref_frame_sign_bias[MAX_REF_FRAMES]; /* Two state 0, 1 */ 1.149 + 1.150 + /* Y,U,V,Y2 */ 1.151 + ENTROPY_CONTEXT_PLANES *above_context; /* row of context for each plane */ 1.152 + ENTROPY_CONTEXT_PLANES left_context; /* (up to) 4 contexts "" */ 1.153 + 1.154 + FRAME_CONTEXT lfc; /* last frame entropy */ 1.155 + FRAME_CONTEXT fc; /* this frame entropy */ 1.156 + 1.157 + unsigned int current_video_frame; 1.158 + 1.159 + int version; 1.160 + 1.161 + TOKEN_PARTITION multi_token_partition; 1.162 + 1.163 +#ifdef PACKET_TESTING 1.164 + VP8_HEADER oh; 1.165 +#endif 1.166 +#if CONFIG_POSTPROC_VISUALIZER 1.167 + double bitrate; 1.168 + double framerate; 1.169 +#endif 1.170 + 1.171 +#if CONFIG_MULTITHREAD 1.172 + int processor_core_count; 1.173 +#endif 1.174 +#if CONFIG_POSTPROC 1.175 + struct postproc_state postproc_state; 1.176 +#endif 1.177 + int cpu_caps; 1.178 +} VP8_COMMON; 1.179 + 1.180 +#endif