diff options
author | Michael Niedermayer | 2012-07-23 21:04:06 +0200 |
---|---|---|
committer | Michael Niedermayer | 2012-07-23 21:25:09 +0200 |
commit | 2cb4d516549526b5e17e941f6d2375a2c501ade6 (patch) | |
tree | f472c62e0b34c2faaa955d51874cddb6be759910 /libswscale | |
parent | 7e15df7551cf45ad1d3e39d20fdc8d6c651d4705 (diff) | |
parent | d04c5293ce88927ad359ca276e287bfa63c2329d (diff) |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
v410dec: Implement explode mode support
zerocodec: fix direct rendering.
wav: init st to NULL to avoid a false-positive warning.
wavpack: set bits_per_raw_sample for S32 samples to properly identify 24-bit
h264: refactor NAL decode loop
RTMPTE protocol support
RTMPE protocol support
rtmp: Add ff_rtmp_calc_digest_pos()
rtmp: Rename rtmp_calc_digest to ff_rtmp_calc_digest and make it global
swscale: add missing HAVE_INLINE_ASM check.
lavfi: place x86 inline assembly under HAVE_INLINE_ASM.
vc1: Add a test for interlaced field pictures
swscale: Mark all init functions as av_cold
swscale: x86: Drop pointless _mmx suffix from filenames
lavf: use conditional notation for default codec in muxer declarations.
swscale: place inline assembly bilinear scaler under HAVE_INLINE_ASM.
dsputil: ppc: cosmetics: pretty-print
dsputil: x86: add SHUFFLE_MASK_W macro
configure: respect CC_O setting in check_cc
Conflicts:
Changelog
configure
libavcodec/v410dec.c
libavcodec/zerocodec.c
libavformat/asfenc.c
libavformat/version.h
libswscale/utils.c
libswscale/x86/swscale.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/output.c | 15 | ||||
-rw-r--r-- | libswscale/ppc/swscale_altivec.c | 3 | ||||
-rw-r--r-- | libswscale/ppc/yuv2rgb_altivec.c | 11 | ||||
-rw-r--r-- | libswscale/rgb2rgb.c | 3 | ||||
-rw-r--r-- | libswscale/sparc/yuv2rgb_vis.c | 3 | ||||
-rw-r--r-- | libswscale/swscale.c | 2 | ||||
-rw-r--r-- | libswscale/utils.c | 14 | ||||
-rw-r--r-- | libswscale/x86/Makefile | 4 | ||||
-rw-r--r-- | libswscale/x86/rgb2rgb.c | 3 | ||||
-rw-r--r-- | libswscale/x86/swscale.c (renamed from libswscale/x86/swscale_mmx.c) | 3 | ||||
-rw-r--r-- | libswscale/x86/yuv2rgb.c (renamed from libswscale/x86/yuv2rgb_mmx.c) | 3 |
11 files changed, 38 insertions, 26 deletions
diff --git a/libswscale/output.c b/libswscale/output.c index d2a480c173..8955665f66 100644 --- a/libswscale/output.c +++ b/libswscale/output.c @@ -24,6 +24,7 @@ #include <stdio.h> #include <string.h> +#include "libavutil/attributes.h" #include "libavutil/avutil.h" #include "libavutil/avassert.h" #include "libavutil/bswap.h" @@ -1260,13 +1261,13 @@ YUV2RGBWRAPPERX(yuv2, rgb_full, xrgb32_full, PIX_FMT_ARGB, 0) YUV2RGBWRAPPERX(yuv2, rgb_full, bgr24_full, PIX_FMT_BGR24, 0) YUV2RGBWRAPPERX(yuv2, rgb_full, rgb24_full, PIX_FMT_RGB24, 0) -void ff_sws_init_output_funcs(SwsContext *c, - yuv2planar1_fn *yuv2plane1, - yuv2planarX_fn *yuv2planeX, - yuv2interleavedX_fn *yuv2nv12cX, - yuv2packed1_fn *yuv2packed1, - yuv2packed2_fn *yuv2packed2, - yuv2packedX_fn *yuv2packedX) +av_cold void ff_sws_init_output_funcs(SwsContext *c, + yuv2planar1_fn *yuv2plane1, + yuv2planarX_fn *yuv2planeX, + yuv2interleavedX_fn *yuv2nv12cX, + yuv2packed1_fn *yuv2packed1, + yuv2packed2_fn *yuv2packed2, + yuv2packedX_fn *yuv2packedX) { enum PixelFormat dstFormat = c->dstFormat; diff --git a/libswscale/ppc/swscale_altivec.c b/libswscale/ppc/swscale_altivec.c index 694c8d8b9a..c621866eed 100644 --- a/libswscale/ppc/swscale_altivec.c +++ b/libswscale/ppc/swscale_altivec.c @@ -26,6 +26,7 @@ #include "config.h" #include "libswscale/swscale.h" #include "libswscale/swscale_internal.h" +#include "libavutil/attributes.h" #include "libavutil/cpu.h" #include "yuv2rgb_altivec.h" @@ -310,7 +311,7 @@ static void hScale_altivec_real(SwsContext *c, int16_t *dst, int dstW, } } -void ff_sws_init_swScale_altivec(SwsContext *c) +av_cold void ff_sws_init_swScale_altivec(SwsContext *c) { enum PixelFormat dstFormat = c->dstFormat; diff --git a/libswscale/ppc/yuv2rgb_altivec.c b/libswscale/ppc/yuv2rgb_altivec.c index fba4162738..ade134d779 100644 --- a/libswscale/ppc/yuv2rgb_altivec.c +++ b/libswscale/ppc/yuv2rgb_altivec.c @@ -95,6 +95,7 @@ #include "libswscale/rgb2rgb.h" #include "libswscale/swscale.h" #include "libswscale/swscale_internal.h" +#include "libavutil/attributes.h" #include "libavutil/cpu.h" #include "libavutil/pixdesc.h" #include "yuv2rgb_altivec.h" @@ -531,7 +532,7 @@ static int altivec_uyvy_rgb32(SwsContext *c, const unsigned char **in, * * So we just fall back to the C codes for this. */ -SwsFunc ff_yuv2rgb_init_altivec(SwsContext *c) +av_cold SwsFunc ff_yuv2rgb_init_altivec(SwsContext *c) { if (!(av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC)) return NULL; @@ -591,9 +592,11 @@ SwsFunc ff_yuv2rgb_init_altivec(SwsContext *c) return NULL; } -void ff_yuv2rgb_init_tables_altivec(SwsContext *c, const int inv_table[4], - int brightness, int contrast, - int saturation) +av_cold void ff_yuv2rgb_init_tables_altivec(SwsContext *c, + const int inv_table[4], + int brightness, + int contrast, + int saturation) { union { DECLARE_ALIGNED(16, signed short, tmp)[8]; diff --git a/libswscale/rgb2rgb.c b/libswscale/rgb2rgb.c index 70aaee47d8..321e5ff1b8 100644 --- a/libswscale/rgb2rgb.c +++ b/libswscale/rgb2rgb.c @@ -25,6 +25,7 @@ #include <inttypes.h> +#include "libavutil/attributes.h" #include "libavutil/bswap.h" #include "config.h" #include "rgb2rgb.h" @@ -125,7 +126,7 @@ void (*yuyvtoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, * 32-bit C version, and and&add trick by Michael Niedermayer */ -void sws_rgb2rgb_init(void) +av_cold void sws_rgb2rgb_init(void) { rgb2rgb_init_c(); if (HAVE_MMX) diff --git a/libswscale/sparc/yuv2rgb_vis.c b/libswscale/sparc/yuv2rgb_vis.c index 62f502619c..bb9ab22dbe 100644 --- a/libswscale/sparc/yuv2rgb_vis.c +++ b/libswscale/sparc/yuv2rgb_vis.c @@ -22,6 +22,7 @@ #include <inttypes.h> #include <stdlib.h> +#include "libavutil/attributes.h" #include "libswscale/swscale.h" #include "libswscale/swscale_internal.h" @@ -184,7 +185,7 @@ static int vis_422P_ARGB32(SwsContext *c, uint8_t *src[], int srcStride[], return srcSliceH; } -SwsFunc ff_yuv2rgb_init_vis(SwsContext *c) +av_cold SwsFunc ff_yuv2rgb_init_vis(SwsContext *c) { c->sparc_coeffs[5] = c->yCoeff; c->sparc_coeffs[6] = c->vgCoeff; diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 1f807852d5..8c4c934dd0 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -544,7 +544,7 @@ static int swScale(SwsContext *c, const uint8_t *src[], if (!enough_lines) break; // we can't output a dstY line so let's try with the next slice -#if HAVE_MMX +#if HAVE_MMX && HAVE_INLINE_ASM updateMMXDitherTables(c, dstY, lumBufIndex, chrBufIndex, lastInLumBuf, lastInChrBuf); #endif diff --git a/libswscale/utils.c b/libswscale/utils.c index a6bb732024..f4d3546845 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -37,6 +37,7 @@ #include <windows.h> #endif +#include "libavutil/attributes.h" #include "libavutil/avassert.h" #include "libavutil/avutil.h" #include "libavutil/bswap.h" @@ -598,7 +599,7 @@ fail: return ret; } -#if HAVE_MMX2 +#if HAVE_MMX2 && HAVE_INLINE_ASM static int initMMX2HScaler(int dstW, int xInc, uint8_t *filterCode, int16_t *filter, int32_t *filterPos, int numSplits) { @@ -761,7 +762,7 @@ static int initMMX2HScaler(int dstW, int xInc, uint8_t *filterCode, return fragmentPos + 1; } -#endif /* HAVE_MMX2 */ +#endif /* HAVE_MMX2 && HAVE_INLINE_ASM */ static void getSubSampleFactors(int *h, int *v, enum PixelFormat format) { @@ -856,7 +857,8 @@ SwsContext *sws_alloc_context(void) return c; } -int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter) +av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, + SwsFilter *dstFilter) { int i, j; int usesVFilter, usesHFilter; @@ -1022,7 +1024,7 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter) c->srcBpc = 16; if (c->dstBpc == 16) dst_stride <<= 1; - if (HAVE_MMX2 && cpu_flags & AV_CPU_FLAG_MMX2 && + if (HAVE_MMX2 && HAVE_INLINE_ASM && cpu_flags & AV_CPU_FLAG_MMX2 && c->srcBpc == 8 && c->dstBpc <= 14) { c->canMMX2BeUsed = (dstW >= srcW && (dstW & 31) == 0 && (srcW & 15) == 0) ? 1 : 0; @@ -1061,7 +1063,7 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter) /* precalculate horizontal scaler filter coefficients */ { -#if HAVE_MMX2 +#if HAVE_MMX2 && HAVE_INLINE_ASM // can't downscale !!! if (c->canMMX2BeUsed && (flags & SWS_FAST_BILINEAR)) { c->lumMmx2FilterCodeSize = initMMX2HScaler(dstW, c->lumXInc, NULL, @@ -1105,7 +1107,7 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter) mprotect(c->chrMmx2FilterCode, c->chrMmx2FilterCodeSize, PROT_EXEC | PROT_READ); #endif } else -#endif /* HAVE_MMX2 */ +#endif /* HAVE_MMX2 && HAVE_INLINE_ASM */ { const int filterAlign = (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) ? 4 : diff --git a/libswscale/x86/Makefile b/libswscale/x86/Makefile index 68d5381701..7d219b458b 100644 --- a/libswscale/x86/Makefile +++ b/libswscale/x86/Makefile @@ -3,8 +3,8 @@ $(SUBDIR)x86/swscale_mmx.o: CFLAGS += $(NOREDZONE_FLAGS) OBJS-$(CONFIG_XMM_CLOBBER_TEST) += x86/w64xmmtest.o MMX-OBJS += x86/rgb2rgb.o \ - x86/swscale_mmx.o \ - x86/yuv2rgb_mmx.o \ + x86/swscale.o \ + x86/yuv2rgb.o \ YASM-OBJS += x86/input.o \ x86/output.o \ diff --git a/libswscale/x86/rgb2rgb.c b/libswscale/x86/rgb2rgb.c index 92deda2f5f..cd46df719d 100644 --- a/libswscale/x86/rgb2rgb.c +++ b/libswscale/x86/rgb2rgb.c @@ -26,6 +26,7 @@ #include <stdint.h> #include "config.h" +#include "libavutil/attributes.h" #include "libavutil/x86_cpu.h" #include "libavutil/cpu.h" #include "libavutil/bswap.h" @@ -130,7 +131,7 @@ DECLARE_ASM_CONST(8, uint64_t, mul16_mid) = 0x2080208020802080ULL; #endif /* HAVE_INLINE_ASM */ -void rgb2rgb_init_x86(void) +av_cold void rgb2rgb_init_x86(void) { #if HAVE_INLINE_ASM int cpu_flags = av_get_cpu_flags(); diff --git a/libswscale/x86/swscale_mmx.c b/libswscale/x86/swscale.c index 48d1a8e9c7..eb33788168 100644 --- a/libswscale/x86/swscale_mmx.c +++ b/libswscale/x86/swscale.c @@ -22,6 +22,7 @@ #include "config.h" #include "libswscale/swscale.h" #include "libswscale/swscale_internal.h" +#include "libavutil/attributes.h" #include "libavutil/avassert.h" #include "libavutil/intreadwrite.h" #include "libavutil/x86_cpu.h" @@ -367,7 +368,7 @@ INPUT_FUNCS(sse2); INPUT_FUNCS(ssse3); INPUT_FUNCS(avx); -void ff_sws_init_swScale_mmx(SwsContext *c) +av_cold void ff_sws_init_swScale_mmx(SwsContext *c) { int cpu_flags = av_get_cpu_flags(); diff --git a/libswscale/x86/yuv2rgb_mmx.c b/libswscale/x86/yuv2rgb.c index 2107dd1ca4..2a76716335 100644 --- a/libswscale/x86/yuv2rgb_mmx.c +++ b/libswscale/x86/yuv2rgb.c @@ -33,6 +33,7 @@ #include "libswscale/rgb2rgb.h" #include "libswscale/swscale.h" #include "libswscale/swscale_internal.h" +#include "libavutil/attributes.h" #include "libavutil/x86_cpu.h" #include "libavutil/cpu.h" @@ -68,7 +69,7 @@ DECLARE_ASM_CONST(8, uint64_t, pb_07) = 0x0707070707070707ULL; #endif /* HAVE_INLINE_ASM */ -SwsFunc ff_yuv2rgb_init_mmx(SwsContext *c) +av_cold SwsFunc ff_yuv2rgb_init_mmx(SwsContext *c) { #if HAVE_INLINE_ASM int cpu_flags = av_get_cpu_flags(); |