Commit Graph

120 Commits

Author SHA1 Message Date
Michael Niedermayer de1275d5e8 Planar 16bit 420 422 444 YUV support (output is only supported in some
unscaled convertions).
This, like gray16 converts down to 8bit, which is a big FIXME & patch welcome,
we should preserve more bits.

Originally committed as revision 29217 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-04-21 01:08:03 +00:00
Cédric Schieli 39e5f87b1a Do not use abgrToA for both luma and alpha channel in hyscale.
This fixes RGB32 (et al.) scaling.

Originally committed as revision 29179 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-04-14 14:11:57 +00:00
Ramiro Polla 40fa514033 swscale: Use function pointers for swScale functions.
Originally committed as revision 29145 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-04-04 22:45:02 +00:00
Ramiro Polla 7ac4032784 swscale: Add const to some swScale functions' parameters.
Originally committed as revision 29143 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-04-04 22:41:46 +00:00
Ramiro Polla 95b5770bc7 swscale: Remove mmx2 params from h[yc]scale().
Originally committed as revision 29129 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-04-02 18:34:11 +00:00
Ramiro Polla 392b656764 swscale: Split h[yc]scale_fast() into their own functions.
Originally committed as revision 29128 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-04-02 18:32:49 +00:00
Ramiro Polla 5b7c7dd329 swscale: Execute sfence and emms depending on runtime flags.
Originally committed as revision 29127 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-04-02 18:31:22 +00:00
Diego Biurrun 009d2d74c2 Move swscale AltiVec template code to ppc subdirectory.
Originally committed as revision 29099 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-03-29 14:18:44 +00:00
Reimar Döffinger 04ef1d3f7b Do _not_ use rbx on x86_64, it will fail to compile with PIC, besides it
added completely pointless code.

Originally committed as revision 29016 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-03-20 16:23:48 +00:00
Reimar Döffinger d55ef6362f Fix swscale compilation with Altivec enabled.
Originally committed as revision 29015 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-03-20 16:12:03 +00:00
Cédric Schieli 3164d25e19 Reindent after last commit
Originally committed as revision 29014 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-03-20 14:44:26 +00:00
Cédric Schieli 6268f55be5 YUVA420P is now supported as output format
Originally committed as revision 29012 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-03-20 14:16:24 +00:00
Cédric Schieli 6858492e6c Add alpha channel scaling
Originally committed as revision 29011 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-03-20 14:15:14 +00:00
Matthieu Castet e29c3f934f Remove useless casting in asm "m" operand.
Patch by Matthieu Castet, castet D matthieu A free D fr

Originally committed as revision 29007 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-03-19 23:29:19 +00:00
Ramiro Polla d0ce212a7a Do not assume long is same width as x86 register.
Originally committed as revision 28992 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-03-18 17:07:30 +00:00
Diego Biurrun 780daf2b09 Consistently use ff_ prefixes for internal symbols.
Originally committed as revision 28988 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-03-18 08:06:08 +00:00
Cédric Schieli 786dcfef48 Make the source buffer operands parametrized in the YSCALEYUV2RGB_YA macro
Originally committed as revision 28943 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-03-14 08:11:03 +00:00
Cédric Schieli fe91924dd7 Make MMX registers parametrized in the YSCALEYUV2PACKEDX_YA macro
Originally committed as revision 28934 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-03-11 14:44:22 +00:00
Kostya Shishkov bcff32d1b4 Mask all unused bits for packed pixel format instead of green and alpha mask only.
That fixes the case when converting 15-bit RGB/BGR to YUV and high bit is set
for input value(s).

Originally committed as revision 28916 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-03-09 17:25:43 +00:00
Jindřich Makovička 57f9a56051 remove the rest of x86 asm from LGPL build
Originally committed as revision 28804 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-03-03 19:47:23 +00:00
Cédric Schieli f8a138be52 When converting from a non alpha format to an alpha format, defaults
Originally committed as revision 28756 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-02-28 08:01:52 +00:00
Cédric Schieli 404944183d move zeroing of alpha channel register out of YSCALEYUV2xxx macros,
patch by Cédric Schieli (cschieli at gmail youknowwhat)

Originally committed as revision 28687 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-02-21 10:54:29 +00:00
Cédric Schieli df57ab1479 splits various YSCALEYUV2xxx macros into YSCALEYUV2xxx_UV,
YSCALEYUV2xxx_YA and YSCALEYUV2xxx_COEFF,
patch by Cédric Schieli (cschieli at gmail youknowwhat)

Originally committed as revision 28686 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-02-21 10:52:59 +00:00
Cédric Schieli 9c77b26b35 make MMX registers parametrized in the WRITEBGR32 macro,
patch by Cédric Schieli (cschieli at gmail youknowwhat)

Originally committed as revision 28685 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-02-21 10:49:52 +00:00
Kostya Shishkov 12794f73eb Some AltiVec functions in SwScaler produce different output than their
counterparts in pure C, so don't invoke them in bitexact mode.

Originally committed as revision 28555 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-02-14 16:37:39 +00:00
Diego Biurrun f4406ec177 HAVE_3DNOW --> HAVE_AMD3DNOW to sync with latest configure changes.
Originally committed as revision 28358 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-01-25 19:58:33 +00:00
Aurelien Jacobs b63f641e9b Change semantic of CONFIG_*, HAVE_* and ARCH_*.
They are now always defined to either 0 or 1.

Originally committed as revision 28311 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-01-14 00:13:56 +00:00
Diego Biurrun 5155b8395c Put variable declaration inside an #ifdef to avoid an unused variable warning.
Originally committed as revision 27945 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-11-17 10:33:59 +00:00
Carl Eugen Hoyos 36e8de07ed Remove unused code that can't be compiled without svn archive.
Originally committed as revision 27827 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-10-25 20:41:51 +00:00
Diego Biurrun aeb87a49a7 cosmetics: typo fix
Originally committed as revision 27816 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-10-23 16:23:42 +00:00
Diego Pettenò 7ad6469eae Convert asm keyword into __asm__.
Neither the asm() nor the __asm__() keyword is not part of the C99
standard, but while GCC accepts the former in C89 syntax, it is not
accepted in C99 unless GNU extensions are turned on (with -fasm). The
latter form is accepted in any syntax as an extension (without
requiring further command-line options).

Sun Studio C99 compiler also does not accept asm() while accepting
__asm__(), albeit reporting warnings that it's not valid C99 synta.

Originally committed as revision 27778 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-10-16 13:34:30 +00:00
Diego Pettenò 6683a37f89 Invert logic for the single-pass in swScale() functions.
Instead of having a firstTime variable defaulting to 1, have a
warnedAlready defaulting to 0. While this should make no difference in
code speed at runtime, it allows to aggregate the four bytes of that
variable with clip_table in .bss section, rather than issuing a .data
section just for that.

As it is, libswscale require no .data section but .data.rel.ro (that
can be mitigated by prelinking), so the change might actually save one
page of memory at runtime (per process).

Originally committed as revision 27734 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-10-09 11:10:30 +00:00
Vitor Sessak e150ef8d34 Do not set src[1] to the palette, it is now in the context
Originally committed as revision 27731 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-10-08 17:48:23 +00:00
Carl Eugen Hoyos 88e2a9aebc Remove b5Dither, g5Dither and r5Dither from libswscale.
Originally committed as revision 27718 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-10-04 18:50:39 +00:00
Carl Eugen Hoyos 92c7b4713d Remove g6Dither from libswscale.
Originally committed as revision 27715 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-10-04 16:40:35 +00:00
Luca Barbato 896a22b851 Uniform *ToY and *ToUV function signatures
Originally committed as revision 27636 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-18 00:26:37 +00:00
Luca Barbato 3a5ba0c33f Split mono2Y in monowhite and monoblack
Originally committed as revision 27635 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-18 00:24:32 +00:00
Luca Barbato e48a79c91a Factorize unit32_t* casts for palette pointer
Originally committed as revision 27634 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-18 00:22:53 +00:00
Benjamin Zores a35acd7f8c Fix libswscale build after r27561 if --enable-runtime-cpudetection is used.
Originally committed as revision 27602 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-13 16:13:04 +00:00
Michael Niedermayer 14014d47cb Fix indention.
Originally committed as revision 27600 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-13 13:41:47 +00:00
Michael Niedermayer f433c8abd3 Disable mmx routines that are not bitexact when the user wants
bitexact ones.

Originally committed as revision 27597 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-13 03:12:15 +00:00
Michael Niedermayer ef423a6618 Make horizontal mmx scaling code match C code.
Originally committed as revision 27596 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-13 02:18:12 +00:00
Michael Niedermayer 881c429407 Make the horizontal C scaler code clip only against INT16_MAX not 0,
this decreases the difference between C and MMX, its also faster.

Originally committed as revision 27593 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-12 22:29:21 +00:00
Michael Niedermayer 78454dfc01 Fix another 1000l bug in the mono input code.
Originally committed as revision 27590 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-12 18:05:57 +00:00
Michael Niedermayer 4bb9adcff1 10000l PIX_FMT_MONOWHITE check was really a || 1.
Thats what happens when one does not do the full set of tests before each commit
and just quickly goes over the diff thinking, "hey its a trivial change".

Originally committed as revision 27588 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-12 17:28:36 +00:00
Michael Niedermayer 3d05e078ee Support mono as input format.
Originally committed as revision 27587 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-12 16:46:38 +00:00
Michael Niedermayer ec1bca2a0f Add support for PIX_FMT_MONOWHITE as output format.
Originally committed as revision 27586 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-12 16:01:17 +00:00
Michael Niedermayer e09d7eef37 Fix typo that lead to averaging of the same pixel in rgb24ToUV_half().
Originally committed as revision 27582 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-11 14:47:18 +00:00
Michael Niedermayer f0faee4c63 Implement full horizontal chroma for rgb/bgr24/32 output.
Originally committed as revision 27580 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-11 14:39:12 +00:00
Michael Niedermayer e69bd29425 Factorize yuv2packedXinC().
Originally committed as revision 27578 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2008-09-11 02:36:51 +00:00