Commit Graph

826 Commits

Author SHA1 Message Date
Stefano Sabatini d458b7d445 Add empty newline to separate function declarations, for better
readability.

Originally committed as revision 31192 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-05-23 10:02:30 +00:00
Stefano Sabatini b8dbff33bf Cosmetics: make more compact the code for handle_jpeg(), this also allows
vertical alignment. Improve readability.

Originally committed as revision 31186 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-05-19 22:56:41 +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
Loren Merritt 8a26b2c665 13% faster yuv420 to rgb15 mmx.
It is now faster than the old gpl version on conroe.

Originally committed as revision 31181 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-05-19 13:31:11 +00:00
Loren Merritt bffc36e084 40% faster yuv420 to rgb24 mmx.
It is now faster than the old gpl version on conroe.

Originally committed as revision 31180 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-05-19 08:21:56 +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
Ronaldo Moura 447a5b1996 blackfin: fix yuv422 to yuv420 conversion
The old code is correct only when stride = 2*width.

Patch by Ronaldo Moura <ronaldo d moura monity com br>

Originally committed as revision 31142 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-05-07 21:59:18 +00:00
Diego Biurrun f4ea7c8911 alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
written by Kostya Shishkov

Originally committed as revision 31135 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-05-04 09:11:01 +00:00
Diego Biurrun 353285d740 Remove explicit filename from Doxygen @file commands.
Passing an explicit filename to this command is only necessary if the
documentation in the @file block refers to a file different from the
one the block resides in.

Originally committed as revision 31050 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-04-20 14:47:31 +00:00
Reimar Döffinger 5b03661fa7 Replace some "m" constraints by MANGLE to avoid issues with some compilers not
being able to compile it and deduplicate the code at the same time.

Originally committed as revision 30978 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-31 17:00:33 +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 f25b1c4b6b HAVE_MMX2 implies HAVE_MMX, so checking the latter is enough.
Originally committed as revision 30961 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-26 07:57:54 +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 13bc1ac31a Do not compile AltiVec code when AltiVec is not available; not even in
runtime cpudetection mode.
Fixes compilation with '--enable-runtime-cpudetect --disable-altivec'.

Originally committed as revision 30952 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-23 20:12:52 +00:00
Diego Biurrun f5af8f1625 Replace wrong condition name in #endif comment by correct instance.
Originally committed as revision 30938 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-19 09:58:45 +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
Reimar Döffinger 97cda76a69 Check for allocation failure for c->lumMmx2FilterCode and c->chrMmx2FilterCode.
Originally committed as revision 30864 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-08 19:41:57 +00:00
Reimar Döffinger 12423f170f Fix memleak due to incorrect VirtualFree arguments: size must be 0 for MEM_RELEASE.
Originally committed as revision 30863 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-08 19:37:10 +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 a4e441301d Add support to BGR444/RGB444 foreign endian output in libswscale.
Patch by Janusz Krzysztofik |jkrzyszt ^ tis icnet pl|.

Originally committed as revision 30855 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-06 11:27:31 +00:00
Michael Niedermayer e5a1c20707 try to avoid returning odd slices.
Originally committed as revision 30847 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-05 21:39:27 +00:00
Benoit Fouet 124cb45137 Cosmetics: fix vertical alignment.
Originally committed as revision 30842 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-05 08:41:35 +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 91cfeac668 Revert r30825, it was not supposed to be committed.
127.32L to me, beware when using git svn dcommit for committing stuff
to svn...

Originally committed as revision 30827 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-04 01:02:24 +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 3fec44c640 Make swscale-test take in input the name of the input and the output
format.

Make swscale-test only perform the test from the input to the output
format rather than perform all.

Also implement swscale-test-all.sh, for performing all the tests.

Improve flexibility of the swscale-test tool, this way is simpler to
perform only a subset of tests.

Originally committed as revision 30825 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-03-04 00:31:10 +00:00
Carl Eugen Hoyos 627686e635 Make sws_dcVec static: It is only used inside libswscale/utils.c.
Originally committed as revision 30787 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-02-28 02:18:16 +00:00
Stefano Sabatini 479e1e6170 Remove pointless empty line.
Originally committed as revision 30730 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-02-25 21:21:29 +00:00
Stefano Sabatini 8ebed38e7a Apply consistency nit.
Originally committed as revision 30729 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-02-25 21:12:38 +00:00
Ramiro Polla f1d5a1f285 Reorder buffer debug. Also print out if slice was buffered.
Originally committed as revision 30722 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-02-23 16:46:43 +00:00
Stefano Sabatini b623d0cb03 Reindent and fix brace placement.
Originally committed as revision 30643 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-02-18 21:20:37 +00:00
Stefano Sabatini 22b6a24c34 Vertically align a list of comparisons in sws_getCachedContext().
Originally committed as revision 30642 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-02-18 21:17:07 +00:00
Stefano Sabatini 5a011d8b08 Merge two if conditions, allow to decrese the level of indentation of
the block.

Originally committed as revision 30641 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-02-18 21:12:05 +00:00
Stefano Sabatini 62bb4ca199 Simplify how usesVFilter and usesHFilter are set.
Originally committed as revision 30520 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-02-05 23:53:25 +00:00
Stefano Sabatini fbc0f6a973 Apply misc fixes to sws_getCoefficients() doxy.
Originally committed as revision 30519 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-02-05 22:56:59 +00:00
Stefano Sabatini 89ee5c6897 Satisfy consistency need:
int * sws_getCoefficients  -> int *sws_getCoefficients.

Originally committed as revision 30518 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-02-05 22:54:45 +00:00
David Conrad 3f3dc76cb1 Add function to translate SWS_CS_* to coefficient array
Originally committed as revision 30513 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-02-05 16:09:03 +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
Stefano Sabatini af0e662169 Declare support for the pixel formats:
PIX_FMT_YUVJ420P
PIX_FMT_YUVJ422P
PIX_FMT_YUVJ440P
PIX_FMT_YUVJ444P

in the isSupported{In,Out} macros.

These pixel formats are not true pixel formats but hacks specific to
JPEG in libavcodec. They are deprecated and should be removed (that is
from libavcodec first and libswscale second)...  but they must be
tested by swscale-test.

See thread:
Subject: [FFmpeg-devel] [PATCH] Extend show_pix_fmts() to make it print the input/output support
Date: 2010-01-30 15:54:08 GMT

Originally committed as revision 30474 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-31 10:16:05 +00:00
Måns Rullgård e62bd367ea Blackfin: use SRAM only when CONFIG_SRAM is set
Originally committed as revision 30472 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-31 00:20:37 +00:00
Stefano Sabatini 909f659473 Reindent.
Originally committed as revision 30467 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-30 21:58:09 +00:00
Stefano Sabatini 3ece3e524f Use a consistent convention for the names of the internal wrapper
functions. Improve readability.
 -This line, and those below, will be ignored--

     swscale.c

Originally committed as revision 30466 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-30 21:56:33 +00:00
Stefano Sabatini 7dac0c4379 Fix randomness of the swscale-test output.
See the thread:
Subject: [FFmpeg-devel] [RFC] Make swscale-test perform only one convertion
Date: Fri, 29 Jan 2010 01:52:23 +0100

Originally committed as revision 30457 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-30 13:31:00 +00:00
Stefano Sabatini b51de6d8c7 Rename swscale-example to swscale-test, to better reflect the intended
use of the program.

Originally committed as revision 30439 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-27 00:25:23 +00:00
Michael Niedermayer 6022255774 Use isAnyRGB() where possible
Originally committed as revision 30435 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-26 08:03:28 +00:00
Michael Niedermayer 81858371d9 Add 3 more RGB makros that allow specifying RGB in bytes and any rgb/bgr.
Originally committed as revision 30434 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-26 08:01:50 +00:00
Michael Niedermayer 3b1ee70312 Rename isRGB() and isBGR() as their meaning is confusing.
Originally committed as revision 30433 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-26 07:40:14 +00:00
Stefano Sabatini 7b87519b32 Merge two "if (flags & SWS_PRINT_INFO) { ... }" blocks, slightly
simplify code.

Originally committed as revision 30432 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-25 22:46:09 +00:00
Stefano Sabatini aa2ead8215 Fix mis-computation of the needsDither variable erroneously introduced
in r30419, which was causing a swscale-example regression.

Also increase my liter count by 20.0 units.

Originally committed as revision 30431 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-24 21:28:17 +00:00
Stefano Sabatini f632c4549b Merge two "if (flags & SWS_PRINT_INFO) { ... }" blocks.
Originally committed as revision 30425 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-24 17:44:43 +00:00
Stefano Sabatini 30b6147521 Use av_get_bits_per_pixel() for computing the bits per pixel of the
source and destination format, cache those values in the newly added
SwsContext:srcFormatBpp and SwsContext:dstFormatBpp fields, and remove
the fmt_depth() function.

Originally committed as revision 30419 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-24 12:55:05 +00:00
Ramiro Polla 59398ea9c0 Indent.
Originally committed as revision 30413 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-24 03:02:40 +00:00
Ramiro Polla 2658e7a6e7 Don't redefine M_PI. It is already defined from libavutil/mathematics.h.
Originally committed as revision 30412 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-24 02:16:26 +00:00
Ramiro Polla a4388ebd37 Split swscale.c into scaler code (swscale.c) and utility code (utils.c).
Originally committed as revision 30411 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-24 02:08:22 +00:00
Måns Rullgård 4a88852623 Move array specifiers outside DECLARE_ALIGNED() invocations
Originally committed as revision 30385 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-22 03:26:30 +00:00
David Conrad 01cc47dcd3 More const-correctness for sws_scale
Originally committed as revision 30381 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-21 09:52:11 +00:00
Ramiro Polla 5d4d503fd0 Document some more of SwsContext.
Originally committed as revision 30380 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-20 03:26:12 +00:00
Stefano Sabatini 613f2dc4ae Avoid more pointless tests, the input and output formats need to be
supported both as input and as output, as the conversion performed is:
yuva420p -> src -> dst -> yuva420p.

Originally committed as revision 30379 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-20 00:22:31 +00:00
Stefano Sabatini 0e21dcdb13 Split overly long line.
Originally committed as revision 30378 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-19 22:36:46 +00:00
Stefano Sabatini 731c04ad65 Make selfTest() perform tests where both the input and output formats
are supported, avoid pointless loops.

Originally committed as revision 30377 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-19 21:52:00 +00:00
Alexis Ballier f28cc5771f Make const prototypes for input sources of sws_scale_* stricter.
Patch by Alexis Ballier gmailify($firstname, $familyname)

Originally committed as revision 30374 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-19 16:30:20 +00:00
Ramiro Polla 9e5f164dc1 swscale-example: Add comment about the use of av_{malloc,free}.
Originally committed as revision 30373 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-19 15:42:51 +00:00
Ramiro Polla 3aca8b59f6 Remove useless forward declaration.
Originally committed as revision 30371 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-19 11:35:04 +00:00
Zuxy Meng d5206d3dd6 User friendly warning message that gives out names of source and target formats
Originally committed as revision 30370 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-19 05:21:17 +00:00
Måns Rullgård 51d83986b1 swscale-example: use av_malloc()
Image buffers require 16-byte alignment, so av_malloc() should be used.
Fixes crash on PPC.

Originally committed as revision 30369 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-19 03:47:11 +00:00
Stefano Sabatini 2d8d885b06 Split long line.
Originally committed as revision 30368 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-18 23:34:07 +00:00
Stefano Sabatini 591e465acf Convert int -> enum PixelFormat in doTest().
Originally committed as revision 30367 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-18 23:33:17 +00:00
Zuxy Meng 3c52d4849f Define out currently unused static functions.
Originally committed as revision 30365 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-18 08:42:04 +00:00
Stefano Sabatini c36a4294dc Remove stray '\' at the end of macro definitions.
Originally committed as revision 30362 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-17 23:29:31 +00:00
Stefano Sabatini 90eb284a77 Remove duplicated or pointless newlines.
Originally committed as revision 30361 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-17 23:17:47 +00:00
Stefano Sabatini 398c193d0b Factorize error message logging, log it if the converter cannot be
set.

Originally committed as revision 30360 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-17 23:07:37 +00:00
Stefano Sabatini e36a545de5 Reindent after the last commit.
Originally committed as revision 30359 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-17 23:02:20 +00:00
Stefano Sabatini c0d1dc1c4f Make the pal2rgbWrapper set and use the converter in pal2rgbWrapper
only if the input format is paletted.

Fix potential crashes/weirdness if the input format is non-paletted.

Originally committed as revision 30358 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-17 23:00:01 +00:00
Måns Rullgård 00c4127ec9 Remove double const
Originally committed as revision 30357 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-17 19:26:35 +00:00
Stefano Sabatini 9a180390b9 Factorize error message logging in rgb2rgbWrapper().
Originally committed as revision 30356 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-17 15:11:25 +00:00
Måns Rullgård 1b5d46c6a6 Reindent
Originally committed as revision 30350 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-17 14:25:19 +00:00
Måns Rullgård d39d7cf693 Remove inline from initFilter()
It makes no sense having that function inlined.

Originally committed as revision 30349 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-17 14:25:17 +00:00
Stefano Sabatini e922e34c96 Add a const qualifier in a cast, fix the gcc warning:
swscale.c: In function ‘sws_scale’:
swscale.c:2968: warning: cast discards qualifiers from pointer target type

Originally committed as revision 30341 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-17 00:26:29 +00:00
Stefano Sabatini 5090d8e16a Add a const qualifier in a cast, fix the gcc warning:
swscale.c: In function ‘planarCopy’:
swscale.c:2256: warning: cast discards qualifiers from pointer target type

Originally committed as revision 30340 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-17 00:21:50 +00:00
Stefano Sabatini a630ed3ee9 Fix typo, "get rid off" -> "get rid of".
Originally committed as revision 30338 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-16 22:49:00 +00:00
Stefano Sabatini 730cb9dab3 Revert r30331, which broke compilation.
swScale_C is not templated if any optimization is to be used and
!runtime_cpudetect.

Originally committed as revision 30334 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-16 19:51:26 +00:00
Stefano Sabatini 73cadb4f13 Prefer enum PixelFormat to int as the parameter type of
fmt_depth(fmt).

Originally committed as revision 30333 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-16 19:32:58 +00:00
Stefano Sabatini bc45751f7f Declare with av_unused the variable alpMmxFilter, fix the gcc warning:
swscale_template.c: In function ‘swScale_C’:
swscale_template.c:2580: warning: unused variable ‘alpMmxFilter’
swscale_template.c: In function ‘sws_init_swScale_C’:

Originally committed as revision 30332 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-16 19:22:30 +00:00
Stefano Sabatini 80853cfc6a Factorize the code which calls the non optimized C functions in
getSwsFunc().

Originally committed as revision 30331 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-16 19:19:54 +00:00
Stefano Sabatini c70f1401df Prefer "to %s%s" over "to%s %s", slightly more readable.
Originally committed as revision 30330 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-16 19:14:29 +00:00
Stefano Sabatini a9e2878c48 Simplify code in sws_getContext() which logs if the destination format
support dithering, remove the const char *dither variable and use a
literal string instead.

Originally committed as revision 30329 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-16 19:11:03 +00:00
Ramiro Polla 9556124c97 Document some of SwsContext.
Originally committed as revision 30328 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-16 19:04:55 +00:00
Ramiro Polla 0cc854e377 Reuse h{lum,chr}Filter{,Pos} variables for MMX2 fast_bilinear horizontal scaler.
Originally committed as revision 30327 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-16 18:39:06 +00:00
Stefano Sabatini d95c863850 Factorize code which logs the source and destination formats in
sws_getContext().

Originally committed as revision 30326 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-16 18:36:21 +00:00
Stefano Sabatini 3e906f4cfb Simplify reset_ptr(): employ usePal() macro rather than enumerating
all the paletted formats.

Originally committed as revision 30317 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-16 11:08:16 +00:00
Måns Rullgård e8393e1cb8 Add symbol versioning for shared libraries
Based on patch by Reinhard Tartler <siretart tauware de>

Originally committed as revision 30315 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-16 04:48:55 +00:00
Ramiro Polla 2e3e8031ec Don't initialize normal horizontal filter if MMX2 filter is used.
Originally committed as revision 30313 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-15 19:50:59 +00:00
Zuxy Meng a959e24780 Const correctness for src pointer. Remove all constness related warnings in
libswscale.

Originally committed as revision 30306 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-15 08:51:51 +00:00
Stefano Sabatini 3bfbbef64d Fix typo.
Originally committed as revision 30304 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-15 00:39:25 +00:00
Ramiro Polla 00c081a8f0 Remove unused clip_table code.
Originally committed as revision 30303 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-14 19:12:42 +00:00
Ramiro Polla efc034cc0f Add const qualifier to rgb48 to YV12 functions' src.
Originally committed as revision 30301 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-14 06:19:45 +00:00
Ramiro Polla a3e35e2852 Add missing parameter to rgb48 to YV12 functions.
Originally committed as revision 30300 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-14 06:19:10 +00:00
David Conrad 28b2866f45 /nop is illegal with Apple's older version of gas, this was fixed elsewhere
but not here since it was unused before now.

Originally committed as revision 30289 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-12 19:03:09 +00:00
Zuxy Meng 845e37e770 Make sure that sfence is used after any non temporal stores.
Originally committed as revision 30287 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-12 02:34:33 +00:00
Zuxy Meng 52c0fcaf52 Avoid redefinition of RGB_PLANAR2PACKED24 as the template is included for
multiple times.

Originally committed as revision 30273 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-11 08:21:31 +00:00
Ramiro Polla 996de2fefa cosmetics: {} placement.
Originally committed as revision 30272 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-11 07:30:28 +00:00
Zuxy Meng 23b0072ad7 MMX(2) accelerated yuv420->rgb24 routine, trivial as essentially as it just
swaps R and B inputs for the existing yuv420->bgr24 routine.

Originally committed as revision 30254 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-09 17:20:49 +00:00
Zuxy Meng 4b19045566 Remove unused PREFETCHW macro
Originally committed as revision 30253 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-09 14:44:20 +00:00
Reimar Döffinger 1b168a428d Ignore 0-height slice in sws_scale, otherwise a final 0-height slice will
cause libswscale to assume the incorrect slice order and complain about
slices starting in the middle.

Originally committed as revision 30246 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-08 19:31:33 +00:00
Stefano Sabatini 8e9767f6fd Implement sws_isSupportedInput() and sws_isSupportedOutput().
Originally committed as revision 30236 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-07 19:07:47 +00:00
Zuxy Meng bb34acd8a4 Remove const to avoid a bunch of GCC warnings against discarded qualifiers and
incompatible pointer type.

Originally committed as revision 30234 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-07 07:13:18 +00:00
Stefano Sabatini 634116df3e Prefer enum PixelFormat over int for the type of the format parameter
of getSubSampleFactors().

Originally committed as revision 30184 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-03 15:20:07 +00:00
Stefano Sabatini 997980f0d8 Prefer "*FUNC_NAME(" over "* FUNC_NAME(" for the
swscale_configuration() and swscale_license() functions, consistent
with the rest of FFmpeg.

Originally committed as revision 30180 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-03 14:35:20 +00:00
Stefano Sabatini f412d5e97a Simplify usePal() macro, make it use av_pix_fmt_descriptors.
Originally committed as revision 30172 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-03 00:22:49 +00:00
Stefano Sabatini b3cf7cb144 Simplify getSubSampleFactors(), make it use the values provided by
av_pix_fmt_descriptors().

Originally committed as revision 30171 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-03 00:09:24 +00:00
Reimar Döffinger f514b4f937 Do not needlessly use the BP register in x86_64-specific code, there are
enough other registers available that are less likely to cause issues.

Originally committed as revision 30160 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-01 09:46:24 +00:00
Diego Biurrun c887b30d79 Remove unused variable, fixes the warning:
libswscale/swscale_template.c:2575: warning: unused variable ‘srcFormat’

Originally committed as revision 30132 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-12-28 12:05:20 +00:00
Ramiro Polla aaba7e6c66 Remove parameters no longer used in h[yc]scale().
Originally committed as revision 30099 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-12-21 01:59:34 +00:00
Ramiro Polla a1f4b4bb6e Move fast bilinear scaler code to the existing h[yc]scale_fast() functions.
Originally committed as revision 30098 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-12-21 01:54:59 +00:00
Ramiro Polla bb53e1d188 Rename function pointers used to convert from the input pixel format to the
intermediate YV12 to a more descriptive name.

Originally committed as revision 30097 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-12-21 01:41:29 +00:00
Ramiro Polla e7a47515ab Check if chroma horizontal scaler is needed in sws_init_swScale().
Originally committed as revision 30096 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-12-21 01:34:45 +00:00
Ramiro Polla 6f9771d7a6 Remove unused fields from SwsContext.
Originally committed as revision 30095 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-12-21 01:30:55 +00:00
Ramiro Polla d3243d1431 Indentation.
Originally committed as revision 30087 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-12-20 17:42:35 +00:00
Ramiro Polla e77ddfa293 Indent.
Originally committed as revision 30086 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-12-20 17:15:01 +00:00
Ramiro Polla b501a1f56a Set fast_bilinear functions in sws_init_swScale().
Originally committed as revision 30085 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-12-20 17:09:46 +00:00
Ramiro Polla bae76dc3eb Set horizontal scaler's range conversion in context in sws_init_swScale().
Originally committed as revision 30082 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-12-20 16:32:58 +00:00
Ramiro Polla 84011f10d5 Set horizontal scaler's src offsets in context in sws_init_swScale().
Originally committed as revision 30081 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-12-20 16:21:25 +00:00
Ramiro Polla a8bcc7b42b Document the differences between the two asm fragments in initMMX2HScaler().
Originally committed as revision 29978 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-12-07 03:52:55 +00:00
Ramiro Polla 75084e47ff Start using intermediate buffers at index 0.
These index variables are incremented before each use, so they should be
initialized to -1.

Originally committed as revision 29977 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-12-06 22:01:25 +00:00
Ramiro Polla e470691aa8 Fix compilation with runtime cpu detection.
All functions in swscale_template.c should be declared with the RENAME macro.

Originally committed as revision 29976 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-12-05 09:44:19 +00:00
Ramiro Polla f415be684d Add support for nv12/nv21 input.
Originally committed as revision 29974 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-12-03 18:18:13 +00:00
Stefano Sabatini a9af75ae85 Make sws_format_name() use av_pix_fmt_descriptors.
This also introduces a dependency of libswscale on libavutil.

Originally committed as revision 29968 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-11-26 21:08:45 +00:00
Diego Biurrun bd381fd3f6 Add functions to return library license and library configuration.
Originally committed as revision 29932 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-11-18 17:16:02 +00:00
NVIDIA Corporation 8cbcb1c732 Support VDPAU hardware accelerated decoding of MPEG-4 ASP on capable
hardware.

Original patch by NVIDIA corporation.

Originally committed as revision 29885 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-11-10 19:11:13 +00:00
Carl Eugen Hoyos b411dfff4c Use enum PixelFormat instead of int for srcFormat and dstFormat.
Originally committed as revision 29857 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-11-08 23:31:43 +00:00
Stefano Sabatini 2e0a80a128 Document sws_freeContext().
Originally committed as revision 29844 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-11-07 09:23:11 +00:00
Stefano Sabatini a520e9f235 Document slice ordering assumption done by sws_scale().
Originally committed as revision 29804 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-10-30 14:13:25 +00:00
Diego Biurrun 53e5462040 Replace manual gcc version check by AV_GCC_VERSION_AT_LEAST macro.
Originally committed as revision 29701 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-09-22 14:38:49 +00:00
Ramiro Polla c866c7d041 Cleanup buffer debugs in swScale().
Originally committed as revision 29686 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-09-16 22:34:48 +00:00
Ramiro Polla 953c821f9b Use correct buffers in vertical scaler in unscaled YV12 case.
Originally committed as revision 29685 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-09-16 22:31:43 +00:00
Ramiro Polla 749fac310c Reset slice direction at end of each frame.
Originally committed as revision 29675 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-09-13 01:49:40 +00:00
Ramiro Polla 9451b59fc6 Remove ; after while(0) in macros.
Originally committed as revision 29674 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-09-12 20:10:22 +00:00
Ramiro Polla 30715d4273 Document that slices can be bottom to top or top to bottom.
Originally committed as revision 29665 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-09-09 21:43:25 +00:00
Ramiro Polla 7d73d1c336 Indent.
Originally committed as revision 29654 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-09-07 16:29:32 +00:00
Ramiro Polla 9cf484d06e Rename CHECKED_ALLOC(Z) to FF_ALLOC(Z)_OR_GOTO and add context and label
parameters.

Originally committed as revision 29652 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-09-06 00:07:35 +00:00
Ramiro Polla c2613a3137 Indent.
Originally committed as revision 29651 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-09-05 23:35:59 +00:00
Lars Täuber 991e579cae Make 16bit YUV formats compatible with NE avcodec_get_pix_fmt().
Patch by Lars Täuber <lars <dot> taeuber <at> gmx <dot> net>.

Originally committed as revision 29650 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-09-05 23:33:11 +00:00
Ramiro Polla 67c2c5bb2e Curly brackets cosmetics for previous commit.
Originally committed as revision 29587 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-08-29 23:08:32 +00:00
Ramiro Polla 1ddb5747df Check for return value of initFilter().
Originally committed as revision 29586 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-08-29 23:06:22 +00:00
Ramiro Polla dd653355fa Revert mistakenly commited hunk.
Originally committed as revision 29585 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-08-29 23:03:14 +00:00
Ramiro Polla 7248797c03 swscale: Check for return values of malloc.
Originally committed as revision 29584 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-08-29 23:02:01 +00:00