| Index: source/libvpx/vp8/common/blockd.h
|
| ===================================================================
|
| --- source/libvpx/vp8/common/blockd.h (revision 96967)
|
| +++ source/libvpx/vp8/common/blockd.h (working copy)
|
| @@ -137,17 +137,12 @@
|
| modes for the Y blocks to the left and above us; for interframes, there
|
| is a single probability table. */
|
|
|
| -typedef struct
|
| +union b_mode_info
|
| {
|
| - B_PREDICTION_MODE mode;
|
| - union
|
| - {
|
| - int as_int;
|
| - MV as_mv;
|
| - } mv;
|
| -} B_MODE_INFO;
|
| + B_PREDICTION_MODE as_mode;
|
| + int_mv mv;
|
| +};
|
|
|
| -
|
| typedef enum
|
| {
|
| INTRA_FRAME = 0,
|
| @@ -161,38 +156,26 @@
|
| {
|
| MB_PREDICTION_MODE mode, uv_mode;
|
| MV_REFERENCE_FRAME ref_frame;
|
| - union
|
| - {
|
| - int as_int;
|
| - MV as_mv;
|
| - } mv;
|
| + int_mv mv;
|
|
|
| unsigned char partitioning;
|
| unsigned char mb_skip_coeff; /* does this mb has coefficients at all, 1=no coefficients, 0=need decode tokens */
|
| - unsigned char dc_diff;
|
| unsigned char need_to_clamp_mvs;
|
| -
|
| unsigned char segment_id; /* Which set of segmentation parameters should be used for this MB */
|
| -
|
| - unsigned char force_no_skip; /* encoder only */
|
| } MB_MODE_INFO;
|
|
|
| -
|
| typedef struct
|
| {
|
| MB_MODE_INFO mbmi;
|
| - B_MODE_INFO bmi[16];
|
| + union b_mode_info bmi[16];
|
| } MODE_INFO;
|
|
|
| -
|
| typedef struct
|
| {
|
| short *qcoeff;
|
| short *dqcoeff;
|
| unsigned char *predictor;
|
| short *diff;
|
| - short *reference;
|
| -
|
| short *dequant;
|
|
|
| /* 16 Y blocks, 4 U blocks, 4 V blocks each with 16 entries */
|
| @@ -206,15 +189,13 @@
|
|
|
| int eob;
|
|
|
| - B_MODE_INFO bmi;
|
| -
|
| + union b_mode_info bmi;
|
| } BLOCKD;
|
|
|
| -typedef struct
|
| +typedef struct MacroBlockD
|
| {
|
| DECLARE_ALIGNED(16, short, diff[400]); /* from idct diff */
|
| DECLARE_ALIGNED(16, unsigned char, predictor[384]);
|
| -/* not used DECLARE_ALIGNED(16, short, reference[384]); */
|
| DECLARE_ALIGNED(16, short, qcoeff[400]);
|
| DECLARE_ALIGNED(16, short, dqcoeff[400]);
|
| DECLARE_ALIGNED(16, char, eobs[25]);
|
| @@ -271,6 +252,9 @@
|
| int mb_to_top_edge;
|
| int mb_to_bottom_edge;
|
|
|
| + int ref_frame_cost[MAX_REF_FRAMES];
|
| +
|
| +
|
| unsigned int frames_since_golden;
|
| unsigned int frames_till_alt_ref_frame;
|
| vp8_subpix_fn_t subpixel_predict;
|
| @@ -282,6 +266,14 @@
|
|
|
| int corrupted;
|
|
|
| +#if ARCH_X86 || ARCH_X86_64
|
| + /* This is an intermediate buffer currently used in sub-pixel motion search
|
| + * to keep a copy of the reference area. This buffer can be used for other
|
| + * purpose.
|
| + */
|
| + DECLARE_ALIGNED(32, unsigned char, y_buf[22*32]);
|
| +#endif
|
| +
|
| #if CONFIG_RUNTIME_CPU_DETECT
|
| struct VP8_COMMON_RTCD *rtcd;
|
| #endif
|
| @@ -291,4 +283,20 @@
|
| extern void vp8_build_block_doffsets(MACROBLOCKD *x);
|
| extern void vp8_setup_block_dptrs(MACROBLOCKD *x);
|
|
|
| +static void update_blockd_bmi(MACROBLOCKD *xd)
|
| +{
|
| + int i;
|
| + int is_4x4;
|
| + is_4x4 = (xd->mode_info_context->mbmi.mode == SPLITMV) ||
|
| + (xd->mode_info_context->mbmi.mode == B_PRED);
|
| +
|
| + if (is_4x4)
|
| + {
|
| + for (i = 0; i < 16; i++)
|
| + {
|
| + xd->block[i].bmi = xd->mode_info_context->bmi[i];
|
| + }
|
| + }
|
| +}
|
| +
|
| #endif /* __INC_BLOCKD_H */
|
|
|