diff options
author | Emeric Grange <emeric.grange@gmail.com> | 2011-11-02 19:50:54 +0100 |
---|---|---|
committer | Emeric Grange <emeric.grange@gmail.com> | 2012-06-24 16:57:31 +0200 |
commit | d18a278d06dfd432d2d0173928b2a5a220a0d4b3 (patch) | |
tree | 459a39dd0f9e014ff762da45c569348fbd4c6197 | |
parent | 383f432a6a48c33be4a09958a786deebe018cd45 (diff) |
g3dvl: cosmetic
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
-rw-r--r-- | src/gallium/auxiliary/vl/vl_vp8_bitstream.c | 32 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vp8/common/alloccommon.c | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vp8/common/blockd.h | 24 |
3 files changed, 14 insertions, 44 deletions
diff --git a/src/gallium/auxiliary/vl/vl_vp8_bitstream.c b/src/gallium/auxiliary/vl/vl_vp8_bitstream.c index 46e44cb93d..f1e09d6b90 100644 --- a/src/gallium/auxiliary/vl/vl_vp8_bitstream.c +++ b/src/gallium/auxiliary/vl/vl_vp8_bitstream.c @@ -35,7 +35,7 @@ static INLINE bool decode_frame(struct vl_vp8_bs *bs) { - // STUB + assert(bs); return false; } @@ -53,6 +53,8 @@ vl_vp8_bs_init(struct vl_vp8_bs *bs, struct pipe_video_decoder *decoder) void vl_vp8_bs_set_picture_desc(struct vl_vp8_bs *bs, struct pipe_vp8_picture_desc *picture) { + assert(bs); + bs->desc = *picture; } @@ -62,32 +64,8 @@ vl_vp8_bs_decode(struct vl_vp8_bs *bs, unsigned num_bytes, const uint8_t *buffer assert(bs); assert(buffer && num_bytes); -#if 0 - { - printf("[G3DVL] vl_vp8_bs_decode()\n"); - - // Print some parameters from mplayer/ffmpeg - printf("[G3DVL] picture_info->version %i\n", picture->base.profile); - printf("[G3DVL] picture_info->key_frame %i\n", picture->key_frame); - printf("[G3DVL] picture_info->show_frame %i\n", picture->show_frame); - - // Print the begining of the buffer, for debugging purpose - printf("[G3DVL] buffer [%02X %02X %02X %02X ", buffer[0], buffer[1], buffer[2], buffer[3]); - printf("%02X %02X %02X %02X]\n", buffer[4], buffer[5], buffer[6], buffer[7]); - } -#endif - - if (buffer[0] == 0x9D && - buffer[1] == 0x01 && - buffer[2] == 0x2A) - { - printf("[G3DVL] buffer start_code [%02X %02X %02X]\n", buffer[0], buffer[1], buffer[2]); - } - else + if (decode_frame(bs) == false) { - if (decode_frame(bs) == false) - { - printf("[G3DVL] Error while decoding VP8 frame !\n"); - } + printf("[G3DVL] Error while decoding VP8 frame !\n"); } } diff --git a/src/gallium/auxiliary/vl/vp8/common/alloccommon.c b/src/gallium/auxiliary/vl/vp8/common/alloccommon.c index 014cc35265..0190cbd871 100644 --- a/src/gallium/auxiliary/vl/vp8/common/alloccommon.c +++ b/src/gallium/auxiliary/vl/vp8/common/alloccommon.c @@ -136,7 +136,7 @@ void vp8_setup_version(VP8_COMMON *cm) cm->full_pixel = 1; break; default: - /*4,5,6,7 are reserved for future use*/ + /* 4,5,6,7 are reserved for future use */ cm->no_lpf = 0; cm->filter_type = NORMAL_LOOPFILTER; cm->use_bilinear_mc_filter = 0; diff --git a/src/gallium/auxiliary/vl/vp8/common/blockd.h b/src/gallium/auxiliary/vl/vp8/common/blockd.h index 0f4369708f..2734a5372f 100644 --- a/src/gallium/auxiliary/vl/vp8/common/blockd.h +++ b/src/gallium/auxiliary/vl/vp8/common/blockd.h @@ -183,11 +183,11 @@ typedef struct typedef struct MacroBlockD { - DECLARE_ALIGNED(16, short, diff[400]); /* from idct diff */ + DECLARE_ALIGNED(16, short, diff[400]); /* from idct diff */ DECLARE_ALIGNED(16, unsigned char, predictor[384]); DECLARE_ALIGNED(16, short, qcoeff[400]); DECLARE_ALIGNED(16, short, dqcoeff[400]); - DECLARE_ALIGNED(16, char, eobs[25]); + DECLARE_ALIGNED(16, char, eobs[25]); /* 16 Y blocks, 4 U, 4 V, 1 DC 2nd order block, each with 16 entries. */ BLOCKD block[25]; @@ -245,23 +245,15 @@ typedef struct MacroBlockD unsigned int frames_since_golden; unsigned int frames_till_alt_ref_frame; - vp8_subpix_fn_t subpixel_predict; - vp8_subpix_fn_t subpixel_predict8x4; - vp8_subpix_fn_t subpixel_predict8x8; - vp8_subpix_fn_t subpixel_predict16x16; + vp8_subpix_fn_t subpixel_predict; + vp8_subpix_fn_t subpixel_predict8x4; + vp8_subpix_fn_t subpixel_predict8x8; + vp8_subpix_fn_t subpixel_predict16x16; void *current_bc; int corrupted; -#if defined(PIPE_ARCH_X86) || defined(PIPE_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 /* PIPE_ARCH_X86 || PIPE_ARCH_X86_64 */ - } MACROBLOCKD; extern void vp8_build_block_doffsets(MACROBLOCKD *x); @@ -272,8 +264,8 @@ static void update_blockd_bmi(MACROBLOCKD *xd) int i; /* If the block size is 4x4. */ - if (xd->mode_info_context->mbmi.mode == SPLITMV - || xd->mode_info_context->mbmi.mode == B_PRED) + if (xd->mode_info_context->mbmi.mode == SPLITMV || + xd->mode_info_context->mbmi.mode == B_PRED) { for (i = 0; i < 16; i++) { |