aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale
Commit message (Collapse)AuthorAgeFilesLines
* swscale: dont loose precission on RGB/BGR48 input, that is dont drop half ↵Michael Niedermayer2011-05-272-103/+59
| | | | | | the bits. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swscale: Do not loose precission on yuv values after rgb->yuv.Michael Niedermayer2011-05-265-82/+87
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-05-262-19/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (32 commits) doc: create separate section for audio encoders swscale: Remove orphaned, commented-out function declaration. swscale: Eliminate rgb24toyv12_c() duplication. Remove h263_msmpeg4 from MpegEncContext. APIchanges: Fill in git hash for fps_probe_size (30315a8) avformat: Add fpsprobesize as an AVOption. avoptions: Return explicitly NAN or {0,0} if the option isn't found rtmp: Reindent rtmp: Don't try to do av_malloc(0) tty: replace AVFormatParameters.sample_rate abuse with a private option. Fix end time of last chapter in compute_chapters_end ffmpeg: get rid of useless AVInputStream.nb_streams. ffmpeg: simplify managing input files and streams ffmpeg: purge redundant AVInputStream.index. lavf: deprecate AVFormatParameters.channel. libdc1394: add a private option for channel. dv1394: add a private option for channel. v4l2: reindent. v4l2: add a private option for channel. lavf: deprecate AVFormatParameters.standard. ... Conflicts: doc/APIchanges doc/encoders.texi ffmpeg.c libavdevice/alsa-audio.h libavformat/version.h libavutil/opt.c libswscale/rgb2rgb.h libswscale/rgb2rgb_template.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * swscale: Remove orphaned, commented-out function declaration.Diego Biurrun2011-05-261-8/+0
| |
| * swscale: Eliminate rgb24toyv12_c() duplication.Michael Niedermayer2011-05-263-51/+8
| | | | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | swscale: document SWS_CPU_CAPS*Michael Niedermayer2011-05-251-0/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Revert removial of SWS flags from e66149e714006d099d1ebfcca3f22ca74fc7dcf4Michael Niedermayer2011-05-251-0/+7
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale: remove duplicatiopn of rgb24toyv12_c()Michael Niedermayer2011-05-253-47/+9
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Return -1 on invalid input instead of crashing.Jean-Tiare Le Bigot2011-05-251-1/+1
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-05-2518-2045/+384
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (22 commits) configure: enable memalign_hack automatically when needed swscale: unbreak the build on non-x86 systems. swscale: remove if(bitexact) branch from functions. swscale: remove if(canMMX2BeUsed) conditional. swscale: remove swScale_{c,MMX,MMX2} duplication. swscale: use emms_c(). Move emms_c() from libavcodec to libavutil. tiff: set palette in the context when specified in TIFF_PAL tag rtsp: use strtoul to parse rtptime and seq values. pgssubdec: fix incorrect colors. dvdsubdec: fix incorrect colors. ape: Allow demuxing of files with metadata tags. swscale: remove dead macro WRITEBGR24OLD. swscale: remove AMD3DNOW "optimizations". swscale: remove duplicate code in ppc/ subdirectory. swscale: remove duplicated x86/ functions. swscale: force --enable-runtime-cpudetect and remove SWS_CPU_CAPS_*. vsrc_buffer.h: add file doxy vsrc_buffer: tweak error message in init() msmpeg4: reindent. ... Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * swscale: unbreak the build on non-x86 systems.Ronald S. Bultje2011-05-241-2/+6
| |
| * swscale: remove if(bitexact) branch from functions.Ronald S. Bultje2011-05-241-23/+11
| | | | | | | | | | | | | | 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.
| * swscale: remove if(canMMX2BeUsed) conditional.Ronald S. Bultje2011-05-241-91/+8
| | | | | | | | | | | | Instead, set function pointers conditionally during init. This patch also reveals a whole branch of dead assembly code that is therefore also removed.
| * swscale: remove swScale_{c,MMX,MMX2} duplication.Ronald S. Bultje2011-05-243-302/+28
| |
| * swscale: use emms_c().Ronald S. Bultje2011-05-242-5/+3
| |
| * swscale: remove dead macro WRITEBGR24OLD.Ronald S. Bultje2011-05-241-56/+0
| |
| * swscale: remove AMD3DNOW "optimizations".Ronald S. Bultje2011-05-242-35/+2
| | | | | | | | | | | | 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.
| * swscale: remove duplicate code in ppc/ subdirectory.Ronald S. Bultje2011-05-242-794/+3
| |
| * swscale: remove duplicated x86/ functions.Ronald S. Bultje2011-05-241-196/+16
| |
| * swscale: force --enable-runtime-cpudetect and remove SWS_CPU_CAPS_*.Ronald S. Bultje2011-05-2416-340/+171
| |
* | Merge swscale bloatupMichael Niedermayer2011-05-2511-4608/+6916
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will be cleaned up in the next merge Authorship / merged commits: commit f668afd4896ee65683619b6f165dda4cdd46766f Author: Janne Grunau <janne-libav@jannau.net> Date: Fri Apr 15 09:12:34 2011 +0200 swscale: fix "ISO C90 forbids mixed declarations and code" warning only hit with --enable-runtime-cpudetect commit 7f2ae5c7af374dfe254195a9375974a2ff9395a7 Author: Janne Grunau <janne-libav@jannau.net> Date: Fri Apr 15 02:09:44 2011 +0200 swscale: fix compilation with --enable-runtime-cpudetect commit b6cad3df822969b31bb93eaf677e52a72416bc97 Author: Janne Grunau <janne-libav@jannau.net> Date: Fri Apr 15 00:31:04 2011 +0200 swscale: correct include path to fix ppc altivec build commit 6216fc70b74e01a5272085329aa92f5ac797f9cf Author: Luca Barbato <lu_zero@gentoo.org> Date: Thu Apr 14 22:03:45 2011 +0200 swscale: simplify rgb2rgb templating MMX is always built. Drop the ifdefs commit 33a0421bbaa64f4e9c3d852b7f225ede8dad1388 Author: Josh Allmann <joshua.allmann@gmail.com> Date: Wed Apr 13 20:57:32 2011 +0200 swscale: simplify initialization code Simplify the fallthrough case when no accelerated functions can be initialized. commit 735bf1951171a1e0ee4292e84a1b1beac45dd0ab Author: Josh Allmann <joshua.allmann@gmail.com> Date: Wed Apr 13 20:57:31 2011 +0200 swscale: further cleanup swscale.c Move x86-specific constants out of swscale.c commit 86330b4c9258d5e583c0db033d1e68f46443307c Author: Luca Barbato <lu_zero@gentoo.org> Date: Wed Apr 13 20:57:30 2011 +0200 swscale: partially move the arch specific code left PPC and x86 code is split off from swscale_template.c. Lots of code is still duplicated and should be removed later. Again uniformize the init system to be more similar to the dsputil one. Unset h*scale_fast in the x86 init in order to make the output consistent with the previous status. Thanks to Josh for spotting it. commit c0038328830d7b341c28d7c99b0236a33617fd21 Author: Luca Barbato <lu_zero@gentoo.org> Date: Wed Apr 13 20:57:29 2011 +0200 swscale: move away x86 specific code from rgb2rgb Keep only the plain C code in the main rgb2rgb.c and move the x86 specific optimizations to x86/rgb2rgb.c Change the initialization pattern a little so some of it can be factorized to behave more like dsputils. Conflicts: libswscale/rgb2rgb.c libswscale/swscale_template.c
* | swscale: MMX optim of hscale16()Michael Niedermayer2011-05-251-0/+143
| | | | | | | | | | code is based on existing 8bit MMX code Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale: dont loose bits on planar >8bit yuv ind gray nput.Michael Niedermayer2011-05-254-24/+52
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale: Switch to ronalds yuv2yuvX16inC_template() its very similar to ↵Michael Niedermayer2011-05-251-45/+1
| | | | | | | | | | | | | | | | baptsites and supports alpha Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-05-241-4/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: configure: Add -U__STRICT_ANSI__ to CPPFLAGS on Cygwin and DOS. aacdec: fix typo in scalefactor clipping check fate: fix fate-h264-conformance-frext-pph10i4-panasonic-a crcs. fate: update 9/10bit refs. h264: Properly set coded_{width, height} when parsing H.264. x86 asm: Add SECTION_TEXT to dct32_sse.asm. Fix 9/10 bit in swscale. Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Fix 9/10 bit in swscale.Kieran Kunhya2011-05-231-4/+4
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-05-221-0/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: ffmpeg: get rid of the -vglobal option. dct32: Add AVX implementation of 32-point DCT dct32: Change pass 6 permutation to allow for AVX implementation dct32: port SSE 32-point DCT to YASM multiple inclusion guard cleanup avio: document buffer must created with av_malloc() and friends avio: check AVIOContext malloc failure swscale: point out an alternative to sws_getContext svq3: Do initialization after parsing the extradata add changelog entries for 0.7_beta2 mp3lame: add #include required for AV_RB32 macro. Conflicts: Changelog libavcodec/svq3.c libavcodec/x86/dct32_sse.c libavfilter/vsrc_buffer.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * swscale: point out an alternative to sws_getContextClément Bœsch2011-05-211-0/+1
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * [PATCH] Update pixdesc_be fate refs after adding 9/10bit YUV420P formats.Ronald S. Bultje2011-05-141-49/+0
| | | | | | | | | | | | 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.
* | swscale: fix compile on mingw32Peter Belkner2011-05-141-0/+2
| | | | | | | | | | Compiling "swscale.c" breaks on MINGW32 because of multiple including "libswscale_template.c"
* | swscale: 10l forgot git add this change from ronald.Ronald S. Bultje2011-05-141-3/+4
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-05-141-17/+18
|\| | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: swscale: properly inline bits/endianness in yuv2yuvX16inC(). (We didnt pull the bug) swscale: fix clipping of 9/10bit YUV420P. Add av_clip_uintp2() function (our patch / duplicate) dfa: fix buffer overflow checks to avoid integer overflows. (our patch / duplicate) movenc: always write esds descriptor length using 4 bytes. (our patch / duplicate) ffmpeg: use parse_number_and_die() when it makes sense (No thanks) ffmpeg: get rid of the 'q' key schizofrenia Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * swscale: properly inline bits/endianness in yuv2yuvX16inC().Ronald S. Bultje2011-05-131-4/+25
| |
| * swscale: fix clipping of 9/10bit YUV420P.Ronald S. Bultje2011-05-131-17/+18
| |
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-05-134-47/+86
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (33 commits) rtpdec_qdm2: Don't try to parse data packet if no configuration is received ac3enc: put the counting of stereo rematrixing bits in the same place to make the code easier to understand. ac3enc: clean up count_frame_bits() and count_frame_bits_fixed() mpegvideo: make FF_DEBUG_DCT_COEFF output coeffs via av_log() instead of just via AVFrame. srtdec: make sure we don't write past the end of buffer wmaenc: improve channel count and bitrate error handling in encode_init() matroskaenc: make sure we don't produce invalid file with no codec ID matroskadec: check that pointers were initialized before accessing them lavf: fix function name in compute_pkt_fields2 av_dlog message lavf: fix av_find_best_stream when providing a wanted stream. lavf: fix av_find_best_stream when decoder_ret is given and using a related stream. ffmpeg: factorize quality calculation tiff: add support for SamplesPerPixel tag in tiff_decode_tag() tiff: Prefer enum TiffCompr over int for TiffContext.compr. mov: Support edit list atom version 1. configure: Enable libpostproc automatically if GPL code is enabled. Cosmetics: fix prototypes in oggdec oggdec: fix memleak with continuous streams. matroskaenc: add missing new line in av_log() call dnxhdenc: add AVClass in private context. ... swscale changes largely rewritten by me or replaced by baptsites due to lots of bugs in ronalds code. Above code is also just in case its not obvios to a large extended duplicates that where cherry picked from ffmpeg. Conflicts: configure ffmpeg.c libavformat/matroskaenc.c libavutil/pixfmt.h libswscale/ppc/swscale_template.c libswscale/swscale.c libswscale/swscale_template.c libswscale/utils.c libswscale/x86/swscale_template.c tests/fate/h264.mak tests/ref/lavfi/pixdesc_le tests/ref/lavfi/pixfmts_copy_le tests/ref/lavfi/pixfmts_null_le tests/ref/lavfi/pixfmts_scale_le tests/ref/lavfi/pixfmts_vflip_le Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * configure: Do not unconditionally add -D_POSIX_C_SOURCE to CPPFLAGS.Diego Biurrun2011-05-121-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * swscale: fix YUV420P 9/10bit support.Ronald S. Bultje2011-05-116-56/+173
| | | | | | | | | | | | | | 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.
* | sws-PPC: fix after VOFW change.Michael Niedermayer2011-05-122-6/+6
| | | | | | | | | | | | It seems sws-PPC did hardcode 2048 at various places instead of using VOFW. This also means that all past VOFW benchmarks on PPC are meaningless Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Use VOFW 21503 as a default value for all types of the CPUsami_stuff2011-05-121-4/+0
| |
* | swscale: remove fork bug that i missed in the merge.Michael Niedermayer2011-05-111-4/+0
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-05-111-0/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (30 commits) AVOptions: make default_val a union, as proposed in AVOption2. arm/h264pred: add missing argument type. h264dsp_mmx: place bracket outside #if/#endif block. lavf/utils: fix ff_interleave_compare_dts corner case. fate: add 10-bit H264 tests. h264: do not print "too many references" warning for intra-only. Enable decoding of high bit depth h264. Adds 8-, 9- and 10-bit versions of some of the functions used by the h264 decoder. Add support for higher QP values in h264. Add the notion of pixel size in h264 related functions. Make the h264 loop filter bit depth aware. Template dsputil_template.c with respect to pixel size, etc. Template h264idct_template.c with respect to pixel size, etc. Preparatory patch for high bit depth h264 decoding support. Move some functions in dsputil.c into a new file dsputil_template.c. Move the functions in h264idct into a new file h264idct_template.c. Move the functions in h264pred.c into a new file h264pred_template.c. Preparatory patch for high bit depth h264 decoding support. Add pixel formats for 9- and 10-bit yuv420p. Choose h264 chroma dc dequant function dynamically. ... Conflicts: doc/APIchanges ffmpeg.c ffplay.c libavcodec/alpha/dsputil_alpha.c libavcodec/arm/dsputil_init_arm.c libavcodec/arm/dsputil_init_armv6.c libavcodec/arm/dsputil_init_neon.c libavcodec/arm/dsputil_iwmmxt.c libavcodec/arm/h264pred_init_arm.c libavcodec/bfin/dsputil_bfin.c libavcodec/dsputil.c libavcodec/h264.c libavcodec/h264.h libavcodec/h264_cabac.c libavcodec/h264_cavlc.c libavcodec/h264_loopfilter.c libavcodec/h264_ps.c libavcodec/h264_refs.c libavcodec/h264dsp.c libavcodec/h264idct.c libavcodec/h264pred.c libavcodec/mlib/dsputil_mlib.c libavcodec/options.c libavcodec/ppc/dsputil_altivec.c libavcodec/ppc/dsputil_ppc.c libavcodec/ppc/h264_altivec.c libavcodec/ps2/dsputil_mmi.c libavcodec/sh4/dsputil_align.c libavcodec/sh4/dsputil_sh4.c libavcodec/sparc/dsputil_vis.c libavcodec/utils.c libavcodec/version.h libavcodec/x86/dsputil_mmx.c libavformat/options.c libavformat/utils.c libavutil/pixfmt.h libswscale/swscale.c libswscale/swscale_internal.h libswscale/swscale_template.c tests/ref/seek/lavf_avi Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * AVOptions: make default_val a union, as proposed in AVOption2.Anton Khirnov2011-05-101-33/+33
| | | | | | | | This breaks API and ABI.
| * Add pixel formats for 9- and 10-bit yuv420p.Oskar Arvidsson2011-05-104-1/+70
| | | | | | | | | | | | | | | | Also add support for these formats in libswscale. Needed for high bit depth h264 decoding. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* | swscale: Fix scaling for unscaled dithered planar convertions.Michael Niedermayer2011-05-101-11/+30
| | | | | | | | | | | | | | This fixes some overflow in bright areas and ensures that the maximum brightness level is mapped to the maximum without cliping and without showing dither patterens in flat max brightness areas. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale: use Nbit code to handle !is16BPS(c->srcFormat) && is16BPS(c->dstFormat)Michael Niedermayer2011-05-101-10/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale: Support dither in is16BPS(c->srcFormat) && !is16BPS(c->dstFormat)Michael Niedermayer2011-05-101-9/+3
| | | | | | | | | | This is done by just letting the Nbit code handle it, which now can do it. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale: support unscaled planar Nbit->8bit with non native endian source.Michael Niedermayer2011-05-101-1/+5
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale: fix unscaled yuv422p16be -> yuv422p10leMichael Niedermayer2011-05-101-2/+5
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale: make DITHER_COPY() support non native endian sourceMichael Niedermayer2011-05-101-12/+13
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale: factor shift out of DITHER_COPY().Michael Niedermayer2011-05-091-9/+10
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>