summaryrefslogtreecommitdiffstats
path: root/libswscale/swscale.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove PI definition and use M_PI instead.stefano2010-05-191-6/+1
| | | | | | M_PI is defined by the included file libavutil/mathematics.h. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31185 b3059339-0415-0410-9bf9-f77b7e298cf2
* Revert r31153. It failed to build on:ramiro2010-05-121-8/+8
| | | | | | | | | | | | 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. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31170 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use int instead of long to pass width parameters in non-public functions.ramiro2010-05-111-8/+8
| | | | | | | long was being incorrectly used as an x86-sized register, both for 32 and 64 bits, but this is not the case in win64. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31153 b3059339-0415-0410-9bf9-f77b7e298cf2
* libswscale: Relicense almost all x86 assembler optimizations as LGPL.diego2010-03-271-19/+16
| | | | | | | | This is of course done with permissions from the authors. The only GPL component left are MMX optimizations for YUV to RGB conversion. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30965 b3059339-0415-0410-9bf9-f77b7e298cf2
* AltiVec implies a PPC CPU, so there is no need to check for both.diego2010-03-231-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30954 b3059339-0415-0410-9bf9-f77b7e298cf2
* Check whether COMPILE_ALTIVEC is defined, not if it is set to a 0/1 value.diego2010-03-191-1/+1
| | | | | | | COMPILE_ALTIVEC is never set to 1, it is just #defined. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30937 b3059339-0415-0410-9bf9-f77b7e298cf2
* Extend the generic path of the yuv2rgb converter with support for rgb444cehoyos2010-03-181-1/+18
| | | | | | | | | output format. Patch by Janusz Krzysztofik, jkrzyszt A tis D icnet D pl git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30934 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix compilation on powerpc with --disable-altivecsiretart2010-03-091-2/+2
| | | | | | | | | in case altivec is disabled, even compilation of code using altivec keywords or asm must be avoided. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30869 b3059339-0415-0410-9bf9-f77b7e298cf2
* Avoid duplication of usePal() macro.stefano2010-03-061-1/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30856 b3059339-0415-0410-9bf9-f77b7e298cf2
* libswscale: Extend the unaccelerated path of the unscaled yuv2rgb specialbenoit2010-03-051-1/+8
| | | | | | | | converter with support for rgb444 output format. Patch by Janusz Krzysztofik jkrzyszt chez tis icnet pl git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30841 b3059339-0415-0410-9bf9-f77b7e298cf2
* Support BGR555, BGR565, RGB555 and RGB565 foreign endian output incehoyos2010-03-041-4/+8
| | | | | | | | | libswscale. Patch by Alexis Ballier, alexis D ballier A gmail git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30840 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fill the r, g, b values used for computing the c->pal_yuv table in thestefano2010-03-041-0/+2
| | | | | | | | | 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. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30826 b3059339-0415-0410-9bf9-f77b7e298cf2
* Implement shuffle_bytes_abcd() functions and use them for shufflingstefano2010-02-031-6/+30
| | | | | | | | | | | | | 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 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30501 b3059339-0415-0410-9bf9-f77b7e298cf2
* Reindent.stefano2010-01-301-4/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30467 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use a consistent convention for the names of the internal wrapperstefano2010-01-301-30/+30
| | | | | | | functions. Improve readability. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30466 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use isAnyRGB() where possiblemichael2010-01-261-7/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30435 b3059339-0415-0410-9bf9-f77b7e298cf2
* Rename isRGB() and isBGR() as their meaning is confusing.michael2010-01-261-11/+11
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30433 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix mis-computation of the needsDither variable erroneously introducedstefano2010-01-241-1/+1
| | | | | | | | | in r30419, which was causing a swscale-example regression. Also increase my liter count by 20.0 units. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30431 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use av_get_bits_per_pixel() for computing the bits per pixel of thestefano2010-01-241-7/+7
| | | | | | | | | source and destination format, cache those values in the newly added SwsContext:srcFormatBpp and SwsContext:dstFormatBpp fields, and remove the fmt_depth() function. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30419 b3059339-0415-0410-9bf9-f77b7e298cf2
* Indent.ramiro2010-01-241-94/+94
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30413 b3059339-0415-0410-9bf9-f77b7e298cf2
* Split swscale.c into scaler code (swscale.c) and utility code (utils.c).ramiro2010-01-241-1538/+13
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30411 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move array specifiers outside DECLARE_ALIGNED() invocationsmru2010-01-221-11/+11
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30385 b3059339-0415-0410-9bf9-f77b7e298cf2
* More const-correctness for sws_scaleconrad2010-01-211-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30381 b3059339-0415-0410-9bf9-f77b7e298cf2
* Split overly long line.stefano2010-01-191-1/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30378 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make const prototypes for input sources of sws_scale_* stricter.benoit2010-01-191-2/+2
| | | | | | | Patch by Alexis Ballier gmailify($firstname, $familyname) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30374 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove useless forward declaration.ramiro2010-01-191-2/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30371 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove stray '\' at the end of macro definitions.stefano2010-01-171-15/+14
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30362 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove duplicated or pointless newlines.stefano2010-01-171-12/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30361 b3059339-0415-0410-9bf9-f77b7e298cf2
* Factorize error message logging, log it if the converter cannot bestefano2010-01-171-7/+6
| | | | | | | set. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30360 b3059339-0415-0410-9bf9-f77b7e298cf2
* Reindent after the last commit.stefano2010-01-171-15/+15
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30359 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make the pal2rgbWrapper set and use the converter in pal2rgbWrapperstefano2010-01-171-2/+3
| | | | | | | | | only if the input format is paletted. Fix potential crashes/weirdness if the input format is non-paletted. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30358 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove double constmru2010-01-171-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30357 b3059339-0415-0410-9bf9-f77b7e298cf2
* Factorize error message logging in rgb2rgbWrapper().stefano2010-01-171-8/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30356 b3059339-0415-0410-9bf9-f77b7e298cf2
* Reindentmru2010-01-171-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30350 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove inline from initFilter()mru2010-01-171-1/+1
| | | | | | It makes no sense having that function inlined. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30349 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add a const qualifier in a cast, fix the gcc warning:stefano2010-01-171-1/+1
| | | | | | | | swscale.c: In function ‘sws_scale’: swscale.c:2968: warning: cast discards qualifiers from pointer target type git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30341 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add a const qualifier in a cast, fix the gcc warning:stefano2010-01-171-1/+1
| | | | | | | | swscale.c: In function ‘planarCopy’: swscale.c:2256: warning: cast discards qualifiers from pointer target type git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30340 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix typo, "get rid off" -> "get rid of".stefano2010-01-161-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30338 b3059339-0415-0410-9bf9-f77b7e298cf2
* Revert r30331, which broke compilation.stefano2010-01-161-3/+12
| | | | | | | | swScale_C is not templated if any optimization is to be used and !runtime_cpudetect. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30334 b3059339-0415-0410-9bf9-f77b7e298cf2
* Factorize the code which calls the non optimized C functions instefano2010-01-161-12/+3
| | | | | | | getSwsFunc(). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30331 b3059339-0415-0410-9bf9-f77b7e298cf2
* Prefer "to %s%s" over "to%s %s", slightly more readable.stefano2010-01-161-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30330 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify code in sws_getContext() which logs if the destination formatstefano2010-01-161-6/+5
| | | | | | | | support dithering, remove the const char *dither variable and use a literal string instead. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30329 b3059339-0415-0410-9bf9-f77b7e298cf2
* Reuse h{lum,chr}Filter{,Pos} variables for MMX2 fast_bilinear horizontal scaler.ramiro2010-01-161-10/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30327 b3059339-0415-0410-9bf9-f77b7e298cf2
* Factorize code which logs the source and destination formats instefano2010-01-161-6/+4
| | | | | | | sws_getContext(). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30326 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify reset_ptr(): employ usePal() macro rather than enumeratingstefano2010-01-161-6/+2
| | | | | | | all the paletted formats. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30317 b3059339-0415-0410-9bf9-f77b7e298cf2
* Don't initialize normal horizontal filter if MMX2 filter is used.ramiro2010-01-151-17/+18
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30313 b3059339-0415-0410-9bf9-f77b7e298cf2
* Const correctness for src pointer. Remove all constness related warnings inzuxy2010-01-151-26/+26
| | | | | | | libswscale. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30306 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix typo.stefano2010-01-151-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30304 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove unused clip_table code.ramiro2010-01-141-14/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30303 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add const qualifier to rgb48 to YV12 functions' src.ramiro2010-01-141-4/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30301 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add missing parameter to rgb48 to YV12 functions.ramiro2010-01-141-3/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30300 b3059339-0415-0410-9bf9-f77b7e298cf2
* Ignore 0-height slice in sws_scale, otherwise a final 0-height slice willreimar2010-01-081-0/+4
| | | | | | | | cause libswscale to assume the incorrect slice order and complain about slices starting in the middle. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30246 b3059339-0415-0410-9bf9-f77b7e298cf2
* Implement sws_isSupportedInput() and sws_isSupportedOutput().stefano2010-01-071-0/+12
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30236 b3059339-0415-0410-9bf9-f77b7e298cf2
* Prefer enum PixelFormat over int for the type of the format parameterstefano2010-01-031-1/+1
| | | | | | | of getSubSampleFactors(). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30184 b3059339-0415-0410-9bf9-f77b7e298cf2
* Prefer "*FUNC_NAME(" over "* FUNC_NAME(" for thestefano2010-01-031-2/+2
| | | | | | | | swscale_configuration() and swscale_license() functions, consistent with the rest of FFmpeg. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30180 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify usePal() macro, make it use av_pix_fmt_descriptors.stefano2010-01-031-7/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30172 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify getSubSampleFactors(), make it use the values provided bystefano2010-01-031-47/+2
| | | | | | | av_pix_fmt_descriptors(). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30171 b3059339-0415-0410-9bf9-f77b7e298cf2
* Indentation.ramiro2009-12-201-6/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30087 b3059339-0415-0410-9bf9-f77b7e298cf2
* Document the differences between the two asm fragments in initMMX2HScaler().ramiro2009-12-071-0/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29978 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add support for nv12/nv21 input.ramiro2009-12-031-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29974 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make sws_format_name() use av_pix_fmt_descriptors.stefano2009-11-261-109/+4
| | | | | | | This also introduces a dependency of libswscale on libavutil. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29968 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add functions to return library license and library configuration.diego2009-11-181-0/+11
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29932 b3059339-0415-0410-9bf9-f77b7e298cf2
* Support VDPAU hardware accelerated decoding of MPEG-4 ASP on capablecehoyos2009-11-101-0/+2
| | | | | | | | | hardware. Original patch by NVIDIA corporation. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29885 b3059339-0415-0410-9bf9-f77b7e298cf2
* Reset slice direction at end of each frame.ramiro2009-09-131-0/+8
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29675 b3059339-0415-0410-9bf9-f77b7e298cf2
* Rename CHECKED_ALLOC(Z) to FF_ALLOC(Z)_OR_GOTO and add context and labelramiro2009-09-061-20/+20
| | | | | | | parameters. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29652 b3059339-0415-0410-9bf9-f77b7e298cf2
* Indent.ramiro2009-09-051-6/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29651 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make 16bit YUV formats compatible with NE avcodec_get_pix_fmt().ramiro2009-09-051-30/+30
| | | | | | Patch by Lars Täuber <lars <dot> taeuber <at> gmx <dot> net>. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29650 b3059339-0415-0410-9bf9-f77b7e298cf2
* Curly brackets cosmetics for previous commit.ramiro2009-08-291-6/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29587 b3059339-0415-0410-9bf9-f77b7e298cf2
* Check for return value of initFilter().ramiro2009-08-291-8/+12
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29586 b3059339-0415-0410-9bf9-f77b7e298cf2
* swscale: Check for return values of malloc.ramiro2009-08-291-22/+38
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29584 b3059339-0415-0410-9bf9-f77b7e298cf2
* Restore comment that was partially removed.ramiro2009-08-291-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29582 b3059339-0415-0410-9bf9-f77b7e298cf2
* Check return values of sws_allocVec() and sws_getConstVec().ramiro2009-08-201-0/+21
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29543 b3059339-0415-0410-9bf9-f77b7e298cf2
*