From cd1efcdcdc66aa0fa81f291d4e98e2aaa662da46 Mon Sep 17 00:00:00 2001 From: Emeric Grange Date: Thu, 19 Jan 2012 15:47:05 +0100 Subject: g3dvl: minor cleanups Signed-off-by: Emeric Grange --- src/gallium/auxiliary/vl/vp8/common/alloccommon.c | 2 +- src/gallium/auxiliary/vl/vp8/common/alloccommon.h | 1 - src/gallium/auxiliary/vl/vp8/common/blockd.h | 20 ++++++++++---------- src/gallium/auxiliary/vl/vp8/common/onyxc_int.h | 2 +- src/gallium/auxiliary/vl/vp8/common/yv12utils.c | 6 +++--- src/gallium/auxiliary/vl/vp8/decoder/decodeframe.c | 15 ++++++--------- src/gallium/auxiliary/vl/vp8/decoder/decodemv.h | 5 +++++ 7 files changed, 26 insertions(+), 25 deletions(-) diff --git a/src/gallium/auxiliary/vl/vp8/common/alloccommon.c b/src/gallium/auxiliary/vl/vp8/common/alloccommon.c index ad075d6c82..8ea08e670c 100644 --- a/src/gallium/auxiliary/vl/vp8/common/alloccommon.c +++ b/src/gallium/auxiliary/vl/vp8/common/alloccommon.c @@ -30,7 +30,7 @@ static void update_mode_info_border(MODE_INFO *mi, int rows, int cols) } } -void vp8_de_alloc_frame_buffers(VP8_COMMON *oci) +static void vp8_de_alloc_frame_buffers(VP8_COMMON *oci) { int i; diff --git a/src/gallium/auxiliary/vl/vp8/common/alloccommon.h b/src/gallium/auxiliary/vl/vp8/common/alloccommon.h index 8987fc3183..86c954814f 100644 --- a/src/gallium/auxiliary/vl/vp8/common/alloccommon.h +++ b/src/gallium/auxiliary/vl/vp8/common/alloccommon.h @@ -16,7 +16,6 @@ void vp8_create_common(VP8_COMMON *oci); void vp8_remove_common(VP8_COMMON *oci); -void vp8_de_alloc_frame_buffers(VP8_COMMON *oci); int vp8_alloc_frame_buffers(VP8_COMMON *oci, int width, int height); void vp8_setup_version(VP8_COMMON *oci); void vp8_initialize_common(); diff --git a/src/gallium/auxiliary/vl/vp8/common/blockd.h b/src/gallium/auxiliary/vl/vp8/common/blockd.h index f747162d83..82225d0ff5 100644 --- a/src/gallium/auxiliary/vl/vp8/common/blockd.h +++ b/src/gallium/auxiliary/vl/vp8/common/blockd.h @@ -26,8 +26,8 @@ #define MAX_MODE_LF_DELTAS 4 /* Segment Feature Masks */ -#define SEGMENT_DELTADATA 0 -#define SEGMENT_ABSDATA 1 +#define SEGMENT_DELTADATA 0 +#define SEGMENT_ABSDATA 1 typedef char ENTROPY_CONTEXT; @@ -47,11 +47,11 @@ typedef enum typedef enum { - DC_PRED, /* average of above and left pixels */ - V_PRED, /* vertical prediction */ - H_PRED, /* horizontal prediction */ - TM_PRED, /* Truemotion prediction */ - B_PRED, /* block based prediction, each block has its own prediction mode */ + DC_PRED, /* average of above and left pixels */ + V_PRED, /* vertical prediction */ + H_PRED, /* horizontal prediction */ + TM_PRED, /* Truemotion prediction */ + B_PRED, /* block based prediction, each block has its own prediction mode */ NEARESTMV, NEARMV, @@ -81,11 +81,11 @@ typedef enum typedef enum { - B_DC_PRED, /* average of above and left pixels */ + B_DC_PRED, /* average of above and left pixels */ B_TM_PRED, - B_VE_PRED, /* vertical prediction */ - B_HE_PRED, /* horizontal prediction */ + B_VE_PRED, /* vertical prediction */ + B_HE_PRED, /* horizontal prediction */ B_LD_PRED, B_RD_PRED, diff --git a/src/gallium/auxiliary/vl/vp8/common/onyxc_int.h b/src/gallium/auxiliary/vl/vp8/common/onyxc_int.h index 77691348a4..e08d520e67 100644 --- a/src/gallium/auxiliary/vl/vp8/common/onyxc_int.h +++ b/src/gallium/auxiliary/vl/vp8/common/onyxc_int.h @@ -15,8 +15,8 @@ #include "../vp8_debug.h" #include "entropymv.h" #include "entropy.h" -#include "../decoder/idct_dispatch.h" #include "recon_dispatch.h" +#include "../decoder/idct_dispatch.h" #define MINQ 0 #define MAXQ 127 diff --git a/src/gallium/auxiliary/vl/vp8/common/yv12utils.c b/src/gallium/auxiliary/vl/vp8/common/yv12utils.c index 8132d92107..ec11560df8 100644 --- a/src/gallium/auxiliary/vl/vp8/common/yv12utils.c +++ b/src/gallium/auxiliary/vl/vp8/common/yv12utils.c @@ -19,8 +19,8 @@ int vp8_yv12_de_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf) vpx_free(ybf->buffer_alloc); /* buffer_alloc isn't accessed by most functions. Rather y_buffer, - u_buffer and v_buffer point to buffer_alloc and are used. Clear out - all of this so that a freed pointer isn't inadvertently used */ + u_buffer and v_buffer point to buffer_alloc and are used. Clear out + all of this so that a freed pointer isn't inadvertently used */ memset (ybf, 0, sizeof(YV12_BUFFER_CONFIG)); } else @@ -75,7 +75,7 @@ int vp8_yv12_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, ybf->u_buffer = ybf->buffer_alloc + yplane_size + (border / 2 * uv_stride) + border / 2; ybf->v_buffer = ybf->buffer_alloc + yplane_size + uvplane_size + (border / 2 * uv_stride) + border / 2; - ybf->corrupted = 0; /* assume not currupted by errors */ + ybf->corrupted = 0; /* Assume not currupted by errors */ } else { diff --git a/src/gallium/auxiliary/vl/vp8/decoder/decodeframe.c b/src/gallium/auxiliary/vl/vp8/decoder/decodeframe.c index 4f146ec6bd..72968fa49c 100644 --- a/src/gallium/auxiliary/vl/vp8/decoder/decodeframe.c +++ b/src/gallium/auxiliary/vl/vp8/decoder/decodeframe.c @@ -31,6 +31,8 @@ #include #include +#define RTCD_VTABLE(x) NULL + void mb_init_dequantizer(VP8D_COMP *pbi, MACROBLOCKD *xd) { int i; @@ -72,8 +74,6 @@ void mb_init_dequantizer(VP8D_COMP *pbi, MACROBLOCKD *xd) xd->block[24].dequant = pc->Y2dequant[QIndex]; } -#define RTCD_VTABLE(x) NULL - /** * skip_recon_mb() is Modified: Instead of writing the result to predictor * buffer and then copying it to dst buffer, we can write the result directly @@ -130,7 +130,7 @@ static void clamp_uvmv_to_umv_border(MV *mv, const MACROBLOCKD *xd) mv->row = (2*mv->row > xd->mb_to_bottom_edge + (18 << 3)) ? (xd->mb_to_bottom_edge + (16 << 3)) >> 1 : mv->row; } -void clamp_mvs(MACROBLOCKD *xd) +static void clamp_mvs(MACROBLOCKD *xd) { if (xd->mode_info_context->mbmi.mode == SPLITMV) { @@ -698,11 +698,10 @@ int vp8_frame_decode(VP8D_COMP *pbi, struct pipe_vp8_picture_desc *frame_header) /* Read the default quantizers. */ { - int Q, q_update; + int Q = vp8_read_literal(bd, 7); /* AC 1st order Q = default */ + int q_update = 0; - Q = vp8_read_literal(bd, 7); /* AC 1st order Q = default */ pc->base_qindex = Q; - q_update = 0; pc->y1dc_delta_q = get_delta_q(bd, pc->y1dc_delta_q, &q_update); pc->y2dc_delta_q = get_delta_q(bd, pc->y2dc_delta_q, &q_update); pc->y2ac_delta_q = get_delta_q(bd, pc->y2ac_delta_q, &q_update); @@ -723,17 +722,15 @@ int vp8_frame_decode(VP8D_COMP *pbi, struct pipe_vp8_picture_desc *frame_header) { /* Should the GF or ARF be updated from the current frame. */ pc->refresh_golden_frame = vp8_read_bit(bd); - pc->refresh_alt_ref_frame = vp8_read_bit(bd); /* Buffer to buffer copy flags. */ pc->copy_buffer_to_gf = 0; + pc->copy_buffer_to_arf = 0; if (!pc->refresh_golden_frame) pc->copy_buffer_to_gf = vp8_read_literal(bd, 2); - pc->copy_buffer_to_arf = 0; - if (!pc->refresh_alt_ref_frame) pc->copy_buffer_to_arf = vp8_read_literal(bd, 2); diff --git a/src/gallium/auxiliary/vl/vp8/decoder/decodemv.h b/src/gallium/auxiliary/vl/vp8/decoder/decodemv.h index 9403424479..e25c256339 100644 --- a/src/gallium/auxiliary/vl/vp8/decoder/decodemv.h +++ b/src/gallium/auxiliary/vl/vp8/decoder/decodemv.h @@ -9,6 +9,11 @@ */ +#ifndef DECODEMV_H +#define DECODEMV_H + #include "onyxd_int.h" void vp8_decode_mode_mvs(VP8D_COMP *); + +#endif /* DECODEMV_H */ -- cgit v1.2.3