summaryrefslogtreecommitdiff
path: root/libswscale
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-02-09 00:44:20 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-02-09 01:27:12 +0100
commitf2b20b7a8b6fcbcd8cc669f5211e4e2ed7d8e9f3 (patch)
treeb21166497b8ac3b1e5f840d8b5d73bda7f77e3d5 /libswscale
parentd8710228eaafbcf60aa72861de81fc849759ea0b (diff)
parent38d553322891c8e47182f05199d19888422167dc (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: pixdesc: mark pseudopaletted formats with a special flag. avconv: switch to avcodec_encode_video2(). libx264: implement encode2(). libx264: split extradata writing out of encode_nals(). lavc: add avcodec_encode_video2() that encodes from an AVFrame -> AVPacket cmdutils: update copyright year to 2012. swscale: sign-extend integer function argument to qword on x86-64. x86inc: support yasm -f win64 flag also. h264: manually save/restore XMM registers for functions using INIT_MMX. x86inc: allow manual use of WIN64_SPILL_XMM. aacdec: Use correct speaker order for 7.1. aacdec: Remove incorrect comment. aacdec: Simplify output configuration. Remove Sun medialib glue code. dsputil: set STRIDE_ALIGN to 16 for x86 also. pngdsp: swap argument inversion. Conflicts: cmdutils.c configure doc/APIchanges ffmpeg.c libavcodec/aacdec.c libavcodec/dsputil.h libavcodec/libx264.c libavcodec/mlib/dsputil_mlib.c libavcodec/utils.c libavfilter/vf_scale.c libavutil/avutil.h libswscale/mlib/yuv2rgb_mlib.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/Makefile3
-rw-r--r--libswscale/mlib/yuv2rgb_mlib.c89
-rw-r--r--libswscale/swscale_internal.h5
-rw-r--r--libswscale/x86/output.asm1
-rw-r--r--libswscale/yuv2rgb.c2
5 files changed, 5 insertions, 95 deletions
diff --git a/libswscale/Makefile b/libswscale/Makefile
index 50e7f7fcaa..e78ec42975 100644
--- a/libswscale/Makefile
+++ b/libswscale/Makefile
@@ -11,7 +11,6 @@ OBJS = input.o options.o output.o rgb2rgb.o swscale.o \
OBJS-$(ARCH_BFIN) += bfin/internal_bfin.o \
bfin/swscale_bfin.o \
bfin/yuv2rgb_bfin.o
-OBJS-$(CONFIG_MLIB) += mlib/yuv2rgb_mlib.o
OBJS-$(HAVE_ALTIVEC) += ppc/swscale_altivec.o \
ppc/yuv2rgb_altivec.o \
ppc/yuv2yuv_altivec.o
@@ -29,4 +28,4 @@ OBJS-$(CONFIG_XMM_CLOBBER_TEST) += x86/w64xmmtest.o
TESTPROGS = colorspace swscale
-DIRS = bfin mlib ppc sparc x86
+DIRS = bfin ppc sparc x86
diff --git a/libswscale/mlib/yuv2rgb_mlib.c b/libswscale/mlib/yuv2rgb_mlib.c
deleted file mode 100644
index e9f11494ee..0000000000
--- a/libswscale/mlib/yuv2rgb_mlib.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * software YUV to RGB converter using mediaLib
- *
- * Copyright (C) 2003 Michael Niedermayer <michaelni@gmx.at>
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include <mlib_types.h>
-#include <mlib_status.h>
-#include <mlib_sys.h>
-#include <mlib_video.h>
-#include <inttypes.h>
-#include <stdlib.h>
-#include <assert.h>
-
-#include "libswscale/swscale.h"
-#include "libswscale/swscale_internal.h"
-
-static int mlib_YUV2ARGB420_32(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
- int srcSliceH, uint8_t* dst[], int dstStride[])
-{
- if(c->srcFormat == PIX_FMT_YUV422P) {
- srcStride[1] *= 2;
- srcStride[2] *= 2;
- }
-
- assert(srcStride[1] == srcStride[2]);
-
- mlib_VideoColorYUV2ARGB420(dst[0]+srcSliceY*dstStride[0], src[0], src[1], src[2], c->dstW,
- srcSliceH, dstStride[0], srcStride[0], srcStride[1]);
- return srcSliceH;
-}
-
-static int mlib_YUV2ABGR420_32(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
- int srcSliceH, uint8_t* dst[], int dstStride[])
-{
- if(c->srcFormat == PIX_FMT_YUV422P) {
- srcStride[1] *= 2;
- srcStride[2] *= 2;
- }
-
- assert(srcStride[1] == srcStride[2]);
-
- mlib_VideoColorYUV2ABGR420(dst[0]+srcSliceY*dstStride[0], src[0], src[1], src[2], c->dstW,
- srcSliceH, dstStride[0], srcStride[0], srcStride[1]);
- return srcSliceH;
-}
-
-static int mlib_YUV2RGB420_24(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
- int srcSliceH, uint8_t* dst[], int dstStride[])
-{
- if(c->srcFormat == PIX_FMT_YUV422P) {
- srcStride[1] *= 2;
- srcStride[2] *= 2;
- }
-
- assert(srcStride[1] == srcStride[2]);
-
- mlib_VideoColorYUV2RGB420(dst[0]+srcSliceY*dstStride[0], src[0], src[1], src[2], c->dstW,
- srcSliceH, dstStride[0], srcStride[0], srcStride[1]);
- return srcSliceH;
-}
-
-
-SwsFunc ff_yuv2rgb_init_mlib(SwsContext *c)
-{
- switch(c->dstFormat) {
- case PIX_FMT_RGB24: return mlib_YUV2RGB420_24;
- case PIX_FMT_BGR32: return mlib_YUV2ARGB420_32;
- case PIX_FMT_RGB32: return mlib_YUV2ABGR420_32;
- default: return NULL;
- }
-}
-
diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
index 80abf621f7..930435608b 100644
--- a/libswscale/swscale_internal.h
+++ b/libswscale/swscale_internal.h
@@ -542,7 +542,6 @@ void updateMMXDitherTables(SwsContext *c, int dstY, int lumBufIndex, int chrBufI
SwsFunc ff_yuv2rgb_init_mmx(SwsContext *c);
SwsFunc ff_yuv2rgb_init_vis(SwsContext *c);
-SwsFunc ff_yuv2rgb_init_mlib(SwsContext *c);
SwsFunc ff_yuv2rgb_init_altivec(SwsContext *c);
SwsFunc ff_yuv2rgb_get_func_ptr_bfin(SwsContext *c);
void ff_bfin_get_unscaled_swscale(SwsContext *c);
@@ -682,7 +681,9 @@ const char *sws_format_name(enum PixelFormat format);
(av_pix_fmt_descriptors[x].nb_components >= 2 && \
(av_pix_fmt_descriptors[x].flags & PIX_FMT_PLANAR))
-#define usePal(x) ((av_pix_fmt_descriptors[x].flags & PIX_FMT_PAL) || (x) == PIX_FMT_Y400A)
+#define usePal(x) ((av_pix_fmt_descriptors[x].flags & PIX_FMT_PAL) || \
+ (av_pix_fmt_descriptors[x].flags & PIX_FMT_PSEUDOPAL) || \
+ (x) == PIX_FMT_Y400A)
extern const uint64_t ff_dither4[2];
extern const uint64_t ff_dither8[2];
diff --git a/libswscale/x86/output.asm b/libswscale/x86/output.asm
index 4b2f5c89eb..8368b247d6 100644
--- a/libswscale/x86/output.asm
+++ b/libswscale/x86/output.asm
@@ -319,6 +319,7 @@ yuv2planeX_fn 10, 7, 5
%macro yuv2plane1_fn 3
cglobal yuv2plane1_%1, %3, %3, %2, src, dst, dstw, dither, offset
+ movsxdifnidn dstwq, dstwd
add dstwq, mmsize - 1
and dstwq, ~(mmsize - 1)
%if %1 == 8
diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c
index c553bc6011..84e3a17b45 100644
--- a/libswscale/yuv2rgb.c
+++ b/libswscale/yuv2rgb.c
@@ -511,8 +511,6 @@ SwsFunc ff_yuv2rgb_get_func_ptr(SwsContext *c)
t = ff_yuv2rgb_init_mmx(c);
} else if (HAVE_VIS) {
t = ff_yuv2rgb_init_vis(c);
- } else if (CONFIG_MLIB) {
- t = ff_yuv2rgb_init_mlib(c);
} else if (HAVE_ALTIVEC) {
t = ff_yuv2rgb_init_altivec(c);
} else if (ARCH_BFIN) {