Commit Graph

342 Commits

Author SHA1 Message Date
Ronald S. Bultje
aaca69c130 swscale: remove swScale_{c,MMX,MMX2} duplication. 2011-05-24 14:50:15 -04:00
Ronald S. Bultje
1dd4f4be5a swscale: remove AMD3DNOW "optimizations".
The functions are identical to their MMX counterparts. Thus,
pretending that swscale is highly optimized for AMD3DNOW
extensions is a poorly executed practical joke at best.
2011-05-24 10:19:41 -04:00
Ronald S. Bultje
fe43d5d71e swscale: remove duplicate code in ppc/ subdirectory. 2011-05-24 10:16:32 -04:00
Ronald S. Bultje
e66149e714 swscale: force --enable-runtime-cpudetect and remove SWS_CPU_CAPS_*. 2011-05-24 10:03:26 -04:00
Kieran Kunhya
6465c820da Fix 9/10 bit in swscale.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-23 06:46:14 -04:00
Ronald S. Bultje
9f54e461fe swscale: properly inline bits/endianness in yuv2yuvX16inC(). 2011-05-13 16:46:24 -04:00
Ronald S. Bultje
c3d68ec9c5 swscale: fix clipping of 9/10bit YUV420P. 2011-05-13 16:45:28 -04:00
Ronald S. Bultje
c8f487deae swscale: fix YUV420P 9/10bit support.
Fix handling of input if not in native endianness, and add support for
9/10-bit output. This allows us to force endianness of YUV420P 9/10bit
in the H264/10bit fate tests, which should fix them on big-endian
systems.
2011-05-11 19:15:14 -04:00
Oskar Arvidsson
42239ced65 Add pixel formats for 9- and 10-bit yuv420p.
Also add support for these formats in libswscale.

Needed for high bit depth h264 decoding.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-10 07:24:19 -04:00
Peter Ross
1afbae100b libswcale: PIX_FMT_BGR48LE and PIX_FMT_BGR48BE scaler implementation
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-28 07:25:27 +02:00
Anton Khirnov
7dfe244fbd sws: remove disabled cruft. 2011-04-19 21:50:12 +02:00
Janne Grunau
f668afd489 swscale: fix "ISO C90 forbids mixed declarations and code" warning
only hit with --enable-runtime-cpudetect
2011-04-15 10:06:53 +02:00
Josh Allmann
33a0421bba swscale: simplify initialization code
Simplify the fallthrough case when no accelerated functions
can be initialized.
2011-04-14 22:16:47 +02:00
Josh Allmann
735bf19511 swscale: further cleanup swscale.c
Move x86-specific constants out of swscale.c
2011-04-14 22:16:47 +02:00
Luca Barbato
86330b4c92 swscale: partially move the arch specific code left
PPC and x86 code is split off from swscale_template.c. Lots of code is
still duplicated and should be removed later.

Again uniformize the init system to be more similar to the dsputil one.

Unset h*scale_fast in the x86 init in order to make the output
consistent with the previous status. Thanks to Josh for spotting it.
2011-04-14 22:16:47 +02:00
Luca Barbato
0e1a5434e2 swscale: Factorize FAST_BGR2YV12 definition.
It is used only for x86 so it will eventually be moved with that code
into the x86 arch subdirectory.
2011-04-13 17:24:53 +02:00
Mans Rullgard
2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Baptiste Coudurier
bd8154d0b3 100l fix if condition
Originally committed as revision 32395 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-27 23:47:54 +00:00
Baptiste Coudurier
df0743e01e Y400A (gray alpha) input support in libswscale
Originally committed as revision 32394 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-27 22:24:03 +00:00
Ramiro Polla
5a90173751 swscale: remove useless temporary variable
Originally committed as revision 32258 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-16 01:09:59 +00:00
Ramiro Polla
cf1cd520c6 swscale: factorize plane copying code out of 2 functions
Originally committed as revision 32257 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-16 01:07:55 +00:00
Ramiro Polla
0132ab80a8 indent
Originally committed as revision 32157 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-11 14:31:13 +00:00
Ramiro Polla
4d8617496f swscale: remove unused code
yvu9ToYv12Wrapper() used to support yv12 with the chroma planes either in the
uv order or the vu order. FFmpeg no longer has a pixel format in vu order.

Originally committed as revision 32156 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-11 14:30:54 +00:00
Ramiro Polla
a1899e0adc swscale: fix internal rgb->yv12 chroma conversion used by the main scaler path
The shift must be applied before the masking.

Originally committed as revision 32051 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-09-06 02:02:53 +00:00
Ramiro Polla
0fc29f2708 swscale: simplify selection of optimizations to compile.
Originally committed as revision 32013 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-08-25 14:39:11 +00:00
Ramiro Polla
8f02861636 swscale: Always define COMPILE_xxx to either 0 or 1.
Originally committed as revision 32012 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-08-25 14:38:30 +00:00
Måns Rullgård
66842fe874 swscale: fix unaligned accesses in (RGB|BGR)32_1 to YUV conversion
Originally committed as revision 32011 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-08-23 21:22:24 +00:00
Måns Rullgård
83761d5b58 swscale: remove unused macro parameter in BGR2UV template
Originally committed as revision 32010 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-08-23 21:22:20 +00:00
Ramiro Polla
a42c29febc validate input data and linesizes
Originally committed as revision 31976 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-08-18 19:37:37 +00:00
Stefano Sabatini
04f6ab1cef Add missing comma, fix rgb2yuv_table[SWS_CS_SMPTE240M] coefficients.
Originally committed as revision 31779 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-07-24 11:19:39 +00:00
Stefano Sabatini
24911613a5 Add some comments to the rgb2yuv_table, clarifying the standard where
are defined.

Originally committed as revision 31778 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-07-24 11:19:35 +00:00
Martin Storsjö
e593826b93 Cosmetics: reindent and unify whitespace
Originally committed as revision 31757 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-07-19 07:06:14 +00:00
Martin Storsjö
72ae5049e1 Do planar copy with a single memcpy only if the stride is equal to the length
This avoids writing outside of the designated rectangle.

Originally committed as revision 31756 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-07-19 07:02:31 +00:00
Martin Storsjö
c4e2b8268f In planarCopyWrapper, Only copy length, not stride of the last line in the plane
If the destination planes are offset within the destination buffer,
writing the extra bytes at the end may write outside of the destination
buffer.

Originally committed as revision 31746 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-07-16 17:45:50 +00:00
Måns Rullgård
6a01eab73c Add av_ prefix to bswap macros
Originally committed as revision 31679 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-07-10 22:12:38 +00:00
Eli Friedman
3483d87752 Fix 'assignment from incompatible pointer type' warning.
Patch by Eli Friedman, eli d friedman a gmail

Originally committed as revision 31628 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-07-03 09:58:13 +00:00
Reinhard Tartler
2b991422f8 deprecate palette8topacked32 in favor of public API functions sws_convertPalette8ToPacked32 and -24
additionallym deprecate palette8torgb16 and its bgr variant without
replacement. These functions are not meant to be used by applications.

Discussed at: http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/109340

Originally committed as revision 31301 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-06-01 19:35:16 +00:00
Stefano Sabatini
4e74187db2 Remove PI definition and use M_PI instead.
M_PI is defined by the included file libavutil/mathematics.h.

Originally committed as revision 31185 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-05-19 22:49:04 +00:00
Ramiro Polla
c3ab0004ae Revert r31153. It failed to build on:
x86_64 / Mac OS X gcc 4.0.1
x86_64 / Linux icc (all)
x86_64 / Linux gcc 4.0.4
x86_64 / OpenBSD gcc 3.3.5
x86_64 / Linux suncc 5.10
and there are some reports of crashes.

Originally committed as revision 31170 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-05-12 20:47:32 +00:00
Ramiro Polla
d9d14dc607 Use int instead of long to pass width parameters in non-public functions.
long was being incorrectly used as an x86-sized register, both for 32 and 64
bits, but this is not the case in win64.

Originally committed as revision 31153 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-05-11 00:36:34 +00:00
Diego Biurrun
819ee683d8 libswscale: Relicense almost all x86 assembler optimizations as LGPL.
This is of course done with permissions from the authors. The only GPL
component left are MMX optimizations for YUV to RGB conversion.

Originally committed as revision 30965 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-27 11:31:02 +00:00
Diego Biurrun
f684f3c58a AltiVec implies a PPC CPU, so there is no need to check for both.
Originally committed as revision 30954 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-23 22:59:14 +00:00
Diego Biurrun
81bbd840fe Check whether COMPILE_ALTIVEC is defined, not if it is set to a 0/1 value.
COMPILE_ALTIVEC is never set to 1, it is just #defined.

Originally committed as revision 30937 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-19 09:57:36 +00:00
Janusz Krzysztofik
22e8222fd2 Extend the generic path of the yuv2rgb converter with support for rgb444
output format.

Patch by Janusz Krzysztofik, jkrzyszt A tis D icnet D pl

Originally committed as revision 30934 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-18 23:02:32 +00:00
Reinhard Tartler
07cea6d1cd Fix compilation on powerpc with --disable-altivec
in case altivec is disabled, even compilation of code using altivec
keywords or asm must be avoided.

Originally committed as revision 30869 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-09 08:07:34 +00:00
Stefano Sabatini
3de42635bd Avoid duplication of usePal() macro.
Originally committed as revision 30856 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-06 11:50:54 +00:00
Janusz Krzysztofik
601949b898 libswscale: Extend the unaccelerated path of the unscaled yuv2rgb special
converter with support for rgb444 output format.
Patch by Janusz Krzysztofik jkrzyszt chez tis icnet pl

Originally committed as revision 30841 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-05 08:32:54 +00:00
Alexis Ballier
1379b58482 Support BGR555, BGR565, RGB555 and RGB565 foreign endian output in
libswscale.

Patch by Alexis Ballier, alexis D ballier A gmail

Originally committed as revision 30840 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-04 16:57:04 +00:00
Stefano Sabatini
23bf3b2c97 Fill the r, g, b values used for computing the c->pal_yuv table in the
case where the source format is PIX_FMT_GRAY8.

This is required as PIX_FMT_GRAY8 has been declared as a paletted
format in FFmpeg r22191, fix GRAY8 -> RGB conversion.

Originally committed as revision 30826 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-04 00:31:13 +00:00
Stefano Sabatini
82e5f86bd5 Implement shuffle_bytes_abcd() functions and use them for shuffling
bytes when converting between RGB32 variants.

In particular fix the argb -> rgba and abgr -> bgra conversions.

See the thread:
Subject: [FFmpeg-devel] [RFC] RGB32 / BGR32 ethernal bug
Date: Tue, 26 Jan 2010 01:06:18 +0100

Originally committed as revision 30501 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-02-03 23:46:00 +00:00