From 599cd321144346dea6eea7a3bb2f3a2076539d1a Mon Sep 17 00:00:00 2001 From: Michael Roitzsch Date: Sun, 26 Oct 2003 11:23:17 +0000 Subject: fix some compiler warnings by using the extern declaration more consistently (that is: putting them in the .h, not in the .c) CVS patchset: 5602 CVS date: 2003/10/26 11:23:17 --- src/libmpeg2/idct_altivec.c | 2 -- src/libmpeg2/idct_mmx.c | 2 -- src/libmpeg2/mpeg2_internal.h | 9 +++++++++ src/libmpeg2/slice.c | 6 ------ src/libmpeg2/slice_xvmc.c | 33 --------------------------------- 5 files changed, 9 insertions(+), 43 deletions(-) (limited to 'src') diff --git a/src/libmpeg2/idct_altivec.c b/src/libmpeg2/idct_altivec.c index b982238e7..981b986d0 100644 --- a/src/libmpeg2/idct_altivec.c +++ b/src/libmpeg2/idct_altivec.c @@ -499,8 +499,6 @@ void mpeg2_idct_add_altivec (int16_t * block, uint8_t * dest, int stride) void mpeg2_idct_altivec_init (void) { - extern uint8_t mpeg2_scan_norm[64]; - extern uint8_t mpeg2_scan_alt[64]; int i, j; i = constants[0][0]; /* just pretending - keeps gcc happy */ diff --git a/src/libmpeg2/idct_mmx.c b/src/libmpeg2/idct_mmx.c index 78ab3c547..d3cc9cb0f 100644 --- a/src/libmpeg2/idct_mmx.c +++ b/src/libmpeg2/idct_mmx.c @@ -725,8 +725,6 @@ void mpeg2_zero_block_mmx (int16_t * block) void mpeg2_idct_mmx_init (void) { - extern uint8_t mpeg2_scan_norm[64]; - extern uint8_t mpeg2_scan_alt[64]; int i, j; /* the mmx/mmxext idct uses a reordered input, so we patch scan tables */ diff --git a/src/libmpeg2/mpeg2_internal.h b/src/libmpeg2/mpeg2_internal.h index 069fc9dc1..2ff03d720 100644 --- a/src/libmpeg2/mpeg2_internal.h +++ b/src/libmpeg2/mpeg2_internal.h @@ -194,9 +194,13 @@ typedef struct cpu_state_s { } cpu_state_t; /* cpu_state.c */ +extern void (* mpeg2_cpu_state_save) (cpu_state_t * state); +extern void (* mpeg2_cpu_state_restore) (cpu_state_t * state); void mpeg2_cpu_state_init (uint32_t mm_accel); /* header.c */ +extern uint8_t mpeg2_scan_norm[64]; +extern uint8_t mpeg2_scan_alt[64]; void mpeg2_header_state_init (picture_t * picture); int mpeg2_header_picture (picture_t * picture, uint8_t * buffer); int mpeg2_header_sequence (picture_t * picture, uint8_t * buffer); @@ -204,6 +208,10 @@ int mpeg2_header_extension (picture_t * picture, uint8_t * buffer); int mpeg2_header_group_of_pictures (picture_t * picture, uint8_t * buffer); /* idct.c */ +extern void (* mpeg2_idct_copy) (int16_t * block, uint8_t * dest, int stride); +extern void (* mpeg2_idct_add) (int16_t * block, uint8_t * dest, int stride); +extern void (* mpeg2_idct) (int16_t * block); +extern void (* mpeg2_zero_block) (int16_t * block); void mpeg2_idct_init (uint32_t mm_accel); /* idct_mlib.c */ @@ -244,6 +252,7 @@ typedef struct mpeg2_mc_s { MC_avg_o_8_##x, MC_avg_x_8_##x, MC_avg_y_8_##x, MC_avg_xy_8_##x} \ }; +extern mpeg2_mc_t mpeg2_mc; extern mpeg2_mc_t mpeg2_mc_c; extern mpeg2_mc_t mpeg2_mc_mmx; extern mpeg2_mc_t mpeg2_mc_mmxext; diff --git a/src/libmpeg2/slice.c b/src/libmpeg2/slice.c index 0fe4ee2d9..50d7b4caf 100644 --- a/src/libmpeg2/slice.c +++ b/src/libmpeg2/slice.c @@ -30,12 +30,6 @@ #include "mpeg2_internal.h" #include "attributes.h" -extern mpeg2_mc_t mpeg2_mc; -extern void (* mpeg2_idct_copy) (int16_t * block, uint8_t * dest, int stride); -extern void (* mpeg2_idct_add) (int16_t * block, uint8_t * dest, int stride); -extern void (* mpeg2_cpu_state_save) (cpu_state_t * state); -extern void (* mpeg2_cpu_state_restore) (cpu_state_t * state); - #include "vlc.h" static int non_linear_quantizer_scale [] = { diff --git a/src/libmpeg2/slice_xvmc.c b/src/libmpeg2/slice_xvmc.c index cddc517c8..ec23e25ad 100644 --- a/src/libmpeg2/slice_xvmc.c +++ b/src/libmpeg2/slice_xvmc.c @@ -41,20 +41,8 @@ #define SIGNED_INTRA XINE_VO_SIGNED_INTRA #define ACCEL (MOTION_ACCEL | IDCT_ACCEL) - -extern mpeg2_mc_t mpeg2_mc; -extern void (* mpeg2_idct_copy) (int16_t * block, uint8_t * dest, int stride); -extern void (* mpeg2_idct_add) (int16_t * block, uint8_t * dest, int stride); -extern void (* mpeg2_idct) (int16_t * block); -extern void (* mpeg2_cpu_state_save) (cpu_state_t * state); -extern void (* mpeg2_cpu_state_restore) (cpu_state_t * state); -extern void (* mpeg2_zero_block) (int16_t * block); - #include "vlc.h" -extern uint8_t mpeg2_scan_norm[64]; -extern uint8_t mpeg2_scan_alt[64]; - /* original (non-patched) scan tables */ static uint8_t mpeg2_scan_norm_orig[64] ATTR_ALIGN(16) = { @@ -1321,27 +1309,6 @@ static void motion_reuse (picture_t * picture, motion_t * motion, MOTION (table, motion->ref[0], motion_x, motion_y, 16, 0); } -// TODO don't need this routine -static void motion_zero (picture_t * picture, motion_t * motion, - void (** table) (uint8_t *, uint8_t *, int, int)) -{ - if(picture->mc->xvmc_accel==0) { - table[0] (picture->dest[0] + picture->offset, - (motion->ref[0][0] + picture->offset + - picture->v_offset * picture->pitches[0]), - picture->pitches[0], 16); - - table[4] (picture->dest[1] + (picture->offset >> 1), - motion->ref[0][1] + (picture->offset >> 1) + - (picture->v_offset >> 1) * picture->pitches[1], - picture->pitches[1], 8); - table[4] (picture->dest[2] + (picture->offset >> 1), - motion->ref[0][2] + (picture->offset >> 1) + - (picture->v_offset >> 1) * picture->pitches[2], - picture->pitches[2], 8); - } -} - /* like motion_frame, but parsing without actual motion compensation */ static void motion_fr_conceal (picture_t * picture) { -- cgit v1.2.3