Anton Khirnov
b8e893399f
sws: replace all long with int.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-28 10:03:37 -04:00
Ronald S. Bultje
009f829dde
swscale: fix crash in bilinear scaling.
2011-05-28 08:59:56 -04:00
Diego Biurrun
5a5a0f1613
swscale: Remove unused variables in x86 code.
...
libswscale/x86/swscale_template.c:2072: warning: unused variable ‘canMMX2BeUsed’
libswscale/x86/swscale_template.c:2145: warning: unused variable ‘canMMX2BeUsed’
libswscale/x86/swscale_template.c:2209: warning: unused variable ‘chrVPixBuf’
libswscale/x86/swscale_template.c:2237: warning: unused variable ‘chrVSrcPtr’
2011-05-27 21:25:57 +02:00
Ronald S. Bultje
389e2000eb
swscale: delay allocation of formatConvBuffer().
...
That means it won't be allocated when not needed. Alongside
this, it fixes valgrind/fate-detected memory leaks.
2011-05-27 13:22:27 -04:00
Ronald S. Bultje
f327bfa6dc
swscale: fix build with --disable-swscale-alpha.
2011-05-27 13:22:27 -04:00
Ronald S. Bultje
9f5d45025e
swscale: fix non-bitexact yuv2yuv[X2]() MMX/MMX2 functions.
2011-05-27 09:41:48 -04:00
Ronald S. Bultje
93681fbd50
swscale: fix compile on ppc.
2011-05-26 11:32:32 -04:00
Ronald S. Bultje
e758573a88
swscale: fix compile on x86-32.
2011-05-26 10:41:27 -04:00
Ronald S. Bultje
48520772d9
swscale: use av_clip_uint8() in yuv2yuv1_c().
2011-05-26 09:31:27 -04:00
Ronald S. Bultje
0f4eb8b043
swscale: remove VOF/VOFW.
2011-05-26 09:31:27 -04:00
Ronald S. Bultje
b4a224c5e4
swscale: split chroma buffers into separate U/V planes.
...
Preparatory step to implement support for sizes > VOFW.
2011-05-26 09:31:27 -04:00
Ronald S. Bultje
69645c021a
swscale: replace formatConvBuffer[VOF] by allocated array.
...
This allows to convert between formats of arbitrary width,
regardless of the value of VOF/VOFW.
2011-05-26 09:31:02 -04:00
Ronald S. Bultje
522d65ba25
rgb2rgb: remove duplicate mmx/mmx2/3dnow/sse2 functions.
...
Many functions have such a prefix, but do not actually use any
instructions or features from that set, thus giving the false
impression that swscale is highly optimized for a particular
system, whereas in reality it is not.
2011-05-26 09:31:02 -04:00
Ronald S. Bultje
836b82e3c9
swscale: reindent h[cy]scale_fast() and updateDitherTables().
2011-05-26 09:31:02 -04:00
Ronald S. Bultje
e2bad983b5
swscale: reformat x86/swscale_template.c.
...
Interleave macros and code so that it's easier to find the
actual code that belongs to a function. Also reindent where
appropriate and remove dead code.
2011-05-26 09:30:15 -04:00
Ronald S. Bultje
71d9c33c86
swscale: remove duplicate mmx/mmx2 functions if they are identical.
2011-05-26 09:30:15 -04:00
Ronald S. Bultje
acb96bc268
swscale: remove if (c->dstFormat) branch from yuv2packed[12X]().
...
This allows cutting up the function in much smaller and easier-
to-maintain chunks.
2011-05-26 09:30:14 -04:00
Ronald S. Bultje
b6cac9b3bf
swscale: remove if(full_chr_int) from yuv2packed1().
...
If that flag is set, swScale() already proxies the call to
yuv2rgbXinC_full(). Therefore, this flag is never set when
yuv2packed1() is called.
2011-05-26 09:30:14 -04:00
Ronald S. Bultje
2159a24573
swscale: remove if(accurate_rnd) branch from functions.
2011-05-26 09:30:14 -04:00
Anton Khirnov
c7a973e44a
swscale: revive SWS_CPU_CAPS until next major bump.
2011-05-26 06:50:12 +02:00
Diego Biurrun
0093199184
swscale: Remove commented-out printf cruft.
2011-05-26 03:45:58 +02:00
Diego Biurrun
6f7a280ead
swscale: Remove orphaned, commented-out function declaration.
2011-05-26 00:56:07 +02:00
Michael Niedermayer
7dc303a60e
swscale: Eliminate rgb24toyv12_c() duplication.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-26 00:56:06 +02:00
Ronald S. Bultje
a724ee6265
swscale: unbreak the build on non-x86 systems.
2011-05-24 15:32:03 -04:00
Ronald S. Bultje
1bb0f0c925
swscale: remove if(bitexact) branch from functions.
...
Instead, only set the function pointers if bitexact flag is
not set during initialization. Since a change in flags triggers
a re-init anyway, this doesn't situations where flag values
change during runtime.
2011-05-24 14:50:20 -04:00
Ronald S. Bultje
566b5fbbb3
swscale: remove if(canMMX2BeUsed) conditional.
...
Instead, set function pointers conditionally during init. This
patch also reveals a whole branch of dead assembly code that is
therefore also removed.
2011-05-24 14:50:19 -04:00
Ronald S. Bultje
aaca69c130
swscale: remove swScale_{c,MMX,MMX2} duplication.
2011-05-24 14:50:15 -04:00
Ronald S. Bultje
c4fd283a46
swscale: use emms_c().
2011-05-24 14:48:49 -04:00
Ronald S. Bultje
b9eb2136af
swscale: remove dead macro WRITEBGR24OLD.
2011-05-24 10:46:40 -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
11ffefefdb
swscale: remove duplicated x86/ functions.
2011-05-24 10:11:26 -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
Clément Bœsch
7d4c4394b5
swscale: point out an alternative to sws_getContext
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-21 13:42:50 +02:00
Ronald S. Bultje
76f8a96e00
[PATCH] Update pixdesc_be fate refs after adding 9/10bit YUV420P formats.
...
Also remove code that overwrites the C versions of functions in
sws_init_swScale_altivec(), so that it uses the C functions of files
if no altivec-optimized version exists.
2011-05-14 06:37:39 -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
Diego Biurrun
046f081b46
configure: Do not unconditionally add -D_POSIX_C_SOURCE to CPPFLAGS.
...
Adding _POSIX_C_SOURCE to CPPFLAGS globally produces all sorts of problems
since it causes certain system functions to be hidden on some (BSD) systems.
The solution is to only add the flag on systems that really require it, i.e.
glibc-based ones.
This change makes BSD systems compile out-of-the-box without the need for
adding specific flags manually. It also allows dropping a number of flags
set manually on a file-per-file basis, but were only present to work around
breakage introduced by the presence of _POSIX_C_SOURCE.
Also add _XOPEN_SOURCE to CPPFLAGS for glibc systems. We use XSI extensions
in several places already, so it is preferable to define it globally instead
of littering source files with individual #defines only needed for glibc.
2011-05-12 11:41:59 +02: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
Anton Khirnov
b66752790a
AVOptions: make default_val a union, as proposed in AVOption2.
...
This breaks API and ABI.
2011-05-10 20:22:06 +02: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
Anton Khirnov
41d0eb1c81
lavc: remove the FF_API_SET_STRING_OLD cruft.
2011-04-19 18:41:00 +02:00
Anton Khirnov
139f3ac42d
Bump major versions of all libraries.
...
They've accumulated enough new APIs and corresponding deprecated cruft.
This breaks API and ABI.
2011-04-18 20:19:47 +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
Janne Grunau
7f2ae5c7af
swscale: fix compilation with --enable-runtime-cpudetect
2011-04-15 09:07:37 +02:00
Janne Grunau
b6cad3df82
swscale: correct include path to fix ppc altivec build
2011-04-15 00:41:10 +02:00
Luca Barbato
6216fc70b7
swscale: simplify rgb2rgb templating
...
MMX is always built. Drop the ifdefs
2011-04-14 22:16:47 +02:00