[FFmpeg-devel] _t POSIX namespace issues
Diego Biurrun
diego
Fri Dec 12 07:41:53 CET 2008
On Thu, Dec 11, 2008 at 11:22:33PM +0100, Luca Barbato wrote:
> On 11-12-2008 9:31, Diego Biurrun wrote:
>> So names ending in _t are reserved by POSIX. Nonetheless we have tons
>> of them. I thought about fixing these issues myself, but coming up with
>> good new names is tedious, so I propose to have each maintainer address
>> the problem in the files they maintain. Here is a the result of a grep
>> for problematic names with maintainers, in no particular order:
>
>> Luca Barbato:
>> libavcodec/ppc/imgresample_altivec.c:} vec_ss_t;
>> libavcodec/ppc/imgresample_altivec.c:} vec_uc_t;
>
> Looks like stray code that never got built since ages...
>
> the first patch unbreaks it (sort of), the second makes it buildable.
>
> --- libavcodec/Makefile (revision 16064)
> +++ libavcodec/Makefile (working copy)
> @@ -461,6 +461,7 @@
> ALTIVEC-OBJS-$(CONFIG_SNOW_DECODER) += ppc/snow_altivec.o
> ALTIVEC-OBJS-$(CONFIG_VC1_DECODER) += ppc/vc1dsp_altivec.o
> ALTIVEC-OBJS-$(CONFIG_WMV3_DECODER) += ppc/vc1dsp_altivec.o
> +ALTIVEC-OBJS-$(CONFIG_OLDSCALER) += ppc/imgresample_altivec.o
Ahem...
> --- libavcodec/ppc/imgresample_altivec.c (revision 16064)
> +++ libavcodec/ppc/imgresample_altivec.c (working copy)
> @@ -24,17 +24,14 @@
> * High quality image resampling with polyphase filters - AltiVec bits
> */
>
> -#include "gcc_fixes.h"
> +#include "util_altivec.h"
>
> -typedef union {
> - vector unsigned char v;
> - unsigned char c[16];
> -} vec_uc_t;
> +#define FILTER_BITS 8
>
> -typedef union {
> +typedef union {
> vector signed short v;
> signed short s[8];
> -} vec_ss_t;
> +} vec_ss;
>
> void v_resample16_altivec(uint8_t *dst, int dst_width, const uint8_t *src,
> int wrap, int16_t *filter)
> @@ -42,7 +39,7 @@
> int sum, i;
> const uint8_t *s;
> vector unsigned char *tv, tmp, dstv, zero;
> - vec_ss_t srchv[4], srclv[4], fv[4];
> + vec_ss srchv[4], srclv[4], fv[4];
> vector signed short zeros, sumhv, sumlv;
> s = src;
This mixes the rename with unrelated changes.
Diego
More information about the ffmpeg-devel
mailing list