Ronald S. Bultje
ac9ac45aca
swscale: fix 16-bit scaling when output is 8-bits.
...
We would use the second half of the U plane buffer, rather than the
V plane buffer, to output the V plane pixels.
14 years ago
Michael Niedermayer
ca78fa24b7
sws: disable scale16 when int32 is used
14 years ago
Michael Niedermayer
987e4c1787
sws: fix rgb -> 16bit
14 years ago
Ronald S. Bultje
948ccdadf4
swscale: for >8bit scaling, read in native bit-depth.
...
For 9/10bit, it means we don't have to upscale to 16bit before
actual scaling or pixel format conversion, and thus a performance
gain.
14 years ago
Ronald S. Bultje
5c391a161a
swscale: rename uv_off/uv_off2 to uv_off_px/byte.
14 years ago
Ronald S. Bultje
4e3e333a79
swscale: error dithering for 16/9/10-bit to 8-bit.
...
Based on a somewhat similar idea in FFmpeg's swscale copy.
14 years ago
Ronald S. Bultje
42d622fab3
swscale: fix 16-bit scaling when output is 8-bits.
...
We would use the second half of the U plane buffer, rather than the
V plane buffer, to output the V plane pixels.
14 years ago
Ronald S. Bultje
8a8d0ce208
swscale: for >8bit scaling, read in native bit-depth.
...
For 9/10bit, it means we don't have to upscale to 16bit before
actual scaling or pixel format conversion, and thus a performance
gain.
14 years ago
Ronald S. Bultje
45f6ffe5e9
swscale: implement >8bit scaling support.
...
This means that precision is retained when scaling between sample
formats with >8 bits per component (48bit RGB, 16bit grayscale,
9/10/16bit YUV).
14 years ago
Ronald S. Bultje
ef1ee362b3
swscale: implement >8bit scaling support.
...
This means that precision is retained when scaling between sample
formats with >8 bits per component (48bit RGB, 16bit grayscale,
9/10/16bit YUV).
14 years ago
Ronald S. Bultje
13a099799e
swscale: change prototypes of scaled YUV output functions.
...
Remove unused variables "flags" and "dstFormat" in yuv2packed1,
merge source rows per plane for yuv2packed[12], and make every
source argument int16_t (some where invalidly set to uint16_t).
This prevents stack pollution and is part of the Great Evil Plan
to simplify swscale.
14 years ago
Ronald S. Bultje
0d994b2f45
swscale: don't use planar output functions to write to NV12/21.
...
This prevents a crash when converting to NV12/21 without the bitexact
flags enabled.
14 years ago
Ronald S. Bultje
97535ffb97
swscale: remove unused xInc/srcW arguments from hScale().
14 years ago
Diego Biurrun
a60466dbc3
swscale: Remove HAVE_MMX from files that are only compiled with MMX enabled.
14 years ago
Diego Biurrun
97e057ff81
swscale: Fix compilation with --disable-mmx2.
...
Some MMX2 functions were being referenced without proper #ifdefs.
14 years ago
Ronald S. Bultje
a27db4c349
swscale: fix function declaration keywords in x86/swscale_template.c.
...
Remove inline keyword for functions that are only called through
their function pointers (and thus cannot be inlined); add av_cold
keyword to init function, and use av_always_inline instead of
inline for functions that must be inlined for performance reasons.
14 years ago
Ronald S. Bultje
9bcbb250e2
swscale: fix types of assembly arguments.
...
This prevents the following compiler warnings: "warning:
initialization from incompatible pointer type". Since the
variables are only ever used in inline assembly, their type
is actually irrelevant (so the part where it was wrong did
not invoke any buggy behaviour).
14 years ago
Ronald S. Bultje
496d95c34c
swscale: move two macros that are only used once into caller.
...
This way, they look like regular code, which is easier to
understand.
14 years ago
Ronald S. Bultje
0fb5193156
swscale: reindent x86 init code.
14 years ago
Ronald S. Bultje
ca364a5b43
swscale: extract SWS_FULL_CHR_H_INT conditional into init code.
14 years ago
Ronald S. Bultje
bda9b20fa4
swscale: un-special-case yuv2yuvX16_c().
...
Make yuv2yuvX16_c a function pointer for yuv2yuvX(), so that the
function pointer becomes bitdepth-independent.
14 years ago
Michael Niedermayer
ba91bf58cd
swscale: override the lack of the accurate rounding flag when needed for dither.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Ronald S. Bultje
983260b0a4
swscale: split out x86/swscale_template.c from swscale.c.
14 years ago
Baptiste Coudurier
5aa70309ad
In libswscale, use all lines when converting from 422p to rgb with mmx, improve quality.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Michael Niedermayer
6713989c23
swscale: dither for planar yuv outputs
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Michael Niedermayer
39d607e5bb
swscale: Commits that could not be pulled earlier due to bugs #2
...
commit 5a5a0f1613
Author: Diego Biurrun <diego@biurrun.de>
Date: Fri May 27 19:46:39 2011 +0200
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’
commit 389e2000eb
Author: Ronald S. Bultje <rsbultje@gmail.com>
Date: Fri May 27 12:23:32 2011 -0400
swscale: delay allocation of formatConvBuffer().
That means it won't be allocated when not needed. Alongside
this, it fixes valgrind/fate-detected memory leaks.
commit f327bfa6dc
Author: Ronald S. Bultje <rsbultje@gmail.com>
Date: Fri May 27 11:36:43 2011 -0400
swscale: fix build with --disable-swscale-alpha.
commit 9f5d45025e
Author: Ronald S. Bultje <rsbultje@gmail.com>
Date: Fri May 27 09:28:38 2011 -0400
swscale: fix non-bitexact yuv2yuv[X2]() MMX/MMX2 functions.
14 years ago
Michael Niedermayer
986f0d86cb
Commits that could not be pulled earlier due to bugs.
...
commit 93681fbd50
Author: Ronald S. Bultje <rsbultje@gmail.com>
Date: Thu May 26 11:32:32 2011 -0400
swscale: fix compile on ppc.
commit e758573a88
Author: Ronald S. Bultje <rsbultje@gmail.com>
Date: Thu May 26 10:36:47 2011 -0400
swscale: fix compile on x86-32.
commit 0f4eb8b043
Author: Ronald S. Bultje <rsbultje@gmail.com>
Date: Thu May 26 09:17:52 2011 -0400
swscale: remove VOF/VOFW.
commit b4a224c5e4
Author: Ronald S. Bultje <rsbultje@gmail.com>
Date: Wed May 25 14:30:09 2011 -0400
swscale: split chroma buffers into separate U/V planes.
Preparatory step to implement support for sizes > VOFW.
14 years ago
Anton Khirnov
b8e893399f
sws: replace all long with int.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Ronald S. Bultje
009f829dde
swscale: fix crash in bilinear scaling.
14 years ago
Ronald S. Bultje
78046dadc3
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.
14 years ago
Ronald S. Bultje
fc72ec727e
swscale: reindent h[cy]scale_fast() and updateDitherTables().
14 years ago
Ronald S. Bultje
c3f07903ec
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.
14 years ago
Ronald S. Bultje
1dbf40c383
swscale: remove duplicate mmx/mmx2 functions if they are identical.
14 years ago
Ronald S. Bultje
264dcc63af
swscale: remove if (c->dstFormat) branch from yuv2packed[12X]().
...
This allows cutting up the function in much smaller and easier-
to-maintain chunks.
14 years ago
Ronald S. Bultje
f2a3b23051
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.
14 years ago
Ronald S. Bultje
835ab9207e
swscale: remove if(accurate_rnd) branch from functions.
14 years ago
Diego Biurrun
11f2eae2ae
swscale: Remove commented-out printf cruft.
14 years ago
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’
14 years ago
Ronald S. Bultje
f327bfa6dc
swscale: fix build with --disable-swscale-alpha.
14 years ago
Ronald S. Bultje
9f5d45025e
swscale: fix non-bitexact yuv2yuv[X2]() MMX/MMX2 functions.
14 years ago
Michael Niedermayer
2b6bfff2b2
swscale: Do not loose precission on yuv values after rgb->yuv.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Ronald S. Bultje
e758573a88
swscale: fix compile on x86-32.
14 years ago
Ronald S. Bultje
b4a224c5e4
swscale: split chroma buffers into separate U/V planes.
...
Preparatory step to implement support for sizes > VOFW.
14 years ago
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.
14 years ago
Ronald S. Bultje
836b82e3c9
swscale: reindent h[cy]scale_fast() and updateDitherTables().
14 years ago
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.
14 years ago
Ronald S. Bultje
71d9c33c86
swscale: remove duplicate mmx/mmx2 functions if they are identical.
14 years ago
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.
14 years ago
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.
14 years ago
Ronald S. Bultje
2159a24573
swscale: remove if(accurate_rnd) branch from functions.
14 years ago