summaryrefslogtreecommitdiff
path: root/libswscale
Commit message (Collapse)AuthorAge
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: FATE: add tests for targa ARM: fix Thumb-mode simple_idct_arm ARM: 4-byte align start of all asm functions rgb2rgb: rgb12to15() swscale-test: fix stack overread. swscale: fix invalid conversions and memory problems. cabac: split cabac.h into declarations and function definitions cabac: Mark ff_h264_mps_state array as static, it is only used within cabac.c. cabac: Remove ff_h264_lps_state array. Conflicts: libswscale/rgb2rgb.h libswscale/swscale_unscaled.c tests/fate/image.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rgb2rgb: rgb12to15()Paul B Mahol2012-01-12
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * swscale-test: fix stack overread.Ronald S. Bultje2012-01-12
| | | | | | | | | | Fixes problems in swscale-test where it gives a 3-member array to a function expecting a 4-member array.
| * swscale: fix invalid conversions and memory problems.Ronald S. Bultje2012-01-12
| | | | | | | | | | | | | | | | | | | | Fixes problems where rgbToRgbWrapper() is called even though it doesn't support this particular conversion (e.g. converting from RGB444 to anything). Thirdly, fixes issues where rgbToRgbWrapper() is called for non-native endiannness conversions (e.g. RGB555BE on a LE system). Fourthly, fixes crashes when converting from e.g. monowhite to monowhite, which calls planarCopyWrapper() and overwrites/reads because n_bytes != n_pixels.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-13
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (21 commits) utils: Check for extradata size overflows. ARM: rv34: fix asm syntax in dc transform functions avio: Fix the value of the deprecated URL_FLAG_NONBLOCK rv34: fix and optimise frame dependency checking rv34: NEON optimised dc only inverse transform avprobe: use avio_size() instead of deprecated AVFormatContext.file_size. ffmenc: remove references to deprecated AVFormatContext.timestamp. lavf: undeprecate read_seek(). avserver: remove code using deprecated CODEC_CAP_PARSE_ONLY. lavc: replace some remaining FF_I_TYPE with AV_PICTURE_TYPE_I lavc: ifdef out parse_only AVOption nellymoserdec: SAMPLE_FMT -> AV_SAMPLE_FMT mpegvideo_enc: ifdef out/replace references to deprecated codec flags. riff: remove references to sonic codec ids indeo4: add some missing static and const qualifiers rv34: DC-only inverse transform avconv: use AVFrame.width/height/format instead of corresponding AVCodecContext fields lavfi: move version macros to a new installed header version.h vsrc_buffer: release the buffer on uninit. rgb2rgb: rgb12tobgr12() ... Conflicts: avconv.c doc/APIchanges ffprobe.c libavfilter/Makefile libavfilter/avfilter.h libswscale/rgb2rgb.c libswscale/rgb2rgb.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rgb2rgb: rgb12tobgr12()Paul B Mahol2012-01-11
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* | Fix compilation with yasm-0.6.2Carl Eugen Hoyos2012-01-12
| |
* | sws: yuv2rgb asm, add memory clobber.Michael Niedermayer2012-01-12
| | | | | | | | | | | | | | This fixes dithering for rgb555le, it appears gcc had moved the setup of the variables after the asm or something like that. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | sws: Remove unneeded YUV cliping from yuv2rgb_X_c_template()Michael Niedermayer2012-01-11
| | | | | | | | | | | | This should slightly improve speed. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale: Force full horizontal chroma internally when the output has a odd size.Michael Niedermayer2012-01-11
| | | | | | | | | | | | | | This fixes a gray line on the right side due to 1 column of pixels being skiped. Fixes Ticket891 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | sws: Move yuv2rgb clipping into the tables.Michael Niedermayer2012-01-11
| | | | | | | | | | | | | | | | This fixes some cases where the clipping was entirely missing. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Thanks (for the comments and review) -to: Reimar, beastd, Ronald
* | sws: fix unscaled LE<->BE rgb<->bgrMichael Niedermayer2012-01-11
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (22 commits) rv34: frame-level multi-threading mpegvideo: claim ownership of referenced pictures aacsbr: prevent out of bounds memcpy(). ipmovie: fix pts for CODEC_ID_INTERPLAY_DPCM sierravmd: fix audio pts bethsoftvideo: Use bytestream2 functions to prevent buffer overreads. bmpenc: support for PIX_FMT_RGB444 swscale: fix crash in fast_bilinear code when compiled with -mred-zone. swscale: specify register type. rv34: use get_bits_left() avconv: reinitialize the filtergraph on resolution change. vsrc_buffer: error on changing frame parameters. avconv: fix -copyinkf. fate: Update file checksums after the mov muxer change in a78dbada55d6 movenc: Don't store a nonzero creation time if nothing was set by the caller bmpdec: support for rgb444 with bitfields compression rgb2rgb: allow conversion for <15 bpp doc: fix stray reference to FFmpeg v4l2: use C99 struct initializer v4l2: poll the file descriptor ... Conflicts: avconv.c libavcodec/aacsbr.c libavcodec/bethsoftvideo.c libavcodec/kmvc.c libavdevice/v4l2.c libavfilter/vsrc_buffer.c libswscale/swscale_unscaled.c libswscale/x86/input.asm tests/ref/acodec/alac tests/ref/acodec/pcm_s16be tests/ref/acodec/pcm_s24be tests/ref/acodec/pcm_s32be tests/ref/acodec/pcm_s8 tests/ref/lavf/mov tests/ref/vsynth1/dnxhd_1080i tests/ref/vsynth1/mpeg4 tests/ref/vsynth1/qtrle tests/ref/vsynth1/svq1 tests/ref/vsynth2/dnxhd_1080i tests/ref/vsynth2/mpeg4 tests/ref/vsynth2/qtrle tests/ref/vsynth2/svq1 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * swscale: fix crash in fast_bilinear code when compiled with -mred-zone.Ronald S. Bultje2012-01-10
| | | | | | | | | | | | | | Additional comments from Måns Rullgard have been integrated by Reinhard Tartler. Signed-off-by: Reinhard Tartler <siretart@tauware.de>
| * swscale: specify register type.Oka Motofumi2012-01-10
| | | | | | | | | | | | Fixes a compilation failure on win64. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * rgb2rgb: allow conversion for <15 bppPaul B Mahol2012-01-09
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* | Merge remote-tracking branch 'richardpl/sws'Michael Niedermayer2012-01-10
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * richardpl/sws: rgb2rgb: remove unused bgr8torgb8() rgb2rgb: rgb12tobgr12() rgb2rgb: allow conversion for <15 bpp bmpenc: support for PIX_FMT_RGB444 bmpdec: support for rgb444 with bitfields compression Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * | rgb2rgb: remove unused bgr8torgb8()Paul B Mahol2012-01-10
| | | | | | | | | | | | RGB8 and BGR8 are paletted formats now.
| * | rgb2rgb: rgb12tobgr12()Paul B Mahol2012-01-10
| | |
| * | rgb2rgb: allow conversion for <15 bppPaul B Mahol2012-01-10
| | |
* | | Revert "swscale: fix integer overflows in RGB pixel writing."Michael Niedermayer2012-01-10
|/ / | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 77d88b872d8cbb42738ede2d4fc098c16f204236. The revert fixes actual overflows and a segfault as the variables are signed and can be negative. Conflicts: libswscale/swscale.c Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: fate: Add tests for more AAC features. aacps: Add missing newline in error message. fate: Add tests for vc1/wmapro in ism. aacdec: Add a fate test for 5.1 channel SBR. aacdec: Turn off PS for multichannel files that use PCE based configs. cabac: remove put_cabac_u/ueg from cabac-test. swscale: RGB4444 and BGR444 input FATE: add test for xWMA demuxer. FATE: add test for SMJPEG demuxer and associated IMA ADPCM audio decoder. mpegaudiodec: optimized iMDCT transform mpegaudiodec: change imdct window arrangment for better pointer alignment mpegaudiodec: move imdct and windowing function to mpegaudiodsp mpegaudiodec: interleave iMDCT buffer to simplify future SIMD implementations swscale: convert yuy2/uyvy/nv12/nv21ToY/UV from inline asm to yasm. FATE: test to exercise WTV demuxer. mjpegdec: K&R formatting cosmetics swscale: K&R formatting cosmetics for code examples swscale: K&R reformatting cosmetics for header files FATE test: cvid-grayscale; ensures that the grayscale Cinepak variant is exercised. Conflicts: libavcodec/cabac.c libavcodec/mjpegdec.c libavcodec/mpegaudiodec.c libavcodec/mpegaudiodsp.c libavcodec/mpegaudiodsp.h libavcodec/mpegaudiodsp_template.c libavcodec/x86/Makefile libavcodec/x86/imdct36_sse.asm libavcodec/x86/mpegaudiodec_mmx.c libswscale/swscale-test.c libswscale/swscale.c libswscale/swscale_internal.h libswscale/x86/swscale_template.c tests/fate/demux.mak tests/fate/microsoft.mak tests/fate/video.mak tests/fate/wma.mak tests/ref/lavfi/pixfmts_scale Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * swscale: RGB4444 and BGR444 inputPaul B Mahol2012-01-08
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * swscale: convert yuy2/uyvy/nv12/nv21ToY/UV from inline asm to yasm.Ronald S. Bultje2012-01-08
| | | | | | | | Also implement SSE2/AVX variants.
| * swscale: K&R formatting cosmetics for code examplesDiego Biurrun2012-01-08
| |
| * swscale: K&R reformatting cosmetics for header filesDiego Biurrun2012-01-08
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-06
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (21 commits) ipmovie: do not read audio packets before the codec is known truemotion2: check size before GetBitContext initialisation avio: Only do implicit network initialization for network protocols avio: Add an URLProtocol flag for indicating that a protocol uses network adpcm: ADPCM Electronic Arts has always two channels matroskadec: Fix a bug where a pointer was cached to an array that might later move due to a realloc() fate: Add missing reference file from 9b4767e4. mov: Support MOV_CH_LAYOUT_USE_DESCRIPTIONS for labeled descriptions. 4xm: Prevent buffer overreads. mjpegdec: parse RSTn to prevent skipping other data in mjpeg_decode_scan vp3: add fate test for non-zero last coefficient vp3: fix streams with non-zero last coefficient swscale: remove unused U/V arguments from yuv2rgb_write(). timer: K&R formatting cosmetics lavf: cosmetics, reformat av_read_frame(). lavf: refactor av_read_frame() to make it easier to understand. Report an error if pitch_lag is zero in AMR-NB decoder. Revert "4xm: Prevent buffer overreads." 4xm: Prevent buffer overreads. 4xm: pass the correct remaining buffer size to decode_i2_frame(). ... Conflicts: libavcodec/4xm.c libavcodec/mjpegdec.c libavcodec/truemotion2.c libavformat/ipmovie.c libavformat/mov_chan.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * swscale: remove unused U/V arguments from yuv2rgb_write().Ronald S. Bultje2012-01-05
| | | | | | | | Also document the function somewhat.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-05
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (46 commits) mtv: Make sure audio_subsegments is not 0 v4l2: use V4L2_FMT_FLAG_EMULATED only if it is defined avconv: add symbolic names for -vsync parameters flvdec: Fix compiler warning for uninitialized variables rtsp: Fix compiler warning for uninitialized variable ulti: convert to new bytestream API. swscale: Use standard multiple inclusion guards in ppc/ header files. Place some START_TIMER invocations in separate blocks. v4l2: list available formats v4l2: set the proper codec_tag v4l2: refactor device_open v4l2: simplify away io_method v4l2: cosmetics v4l2: uniform and format options v4l2: do not force interlaced mode avio: exit early in fill_buffer without read_packet vc1dec: fix invalid memory access for small video dimensions rv34: fix invalid memory access for small video dimensions rv34: joint coefficient decoding and dequantization avplay: Don't call avio_set_interrupt_cb(NULL) ... Conflicts: Changelog avconv.c doc/APIchanges doc/indevs.texi libavcodec/adxenc.c libavcodec/dnxhdenc.c libavcodec/h264.c libavdevice/v4l2.c libavformat/flvdec.c libavformat/mtv.c libswscale/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * swscale: Use standard multiple inclusion guards in ppc/ header files.Diego Biurrun2012-01-04
| |
| * swscale: remove obsolete comment.Ronald S. Bultje2012-01-03
| |
| * swscale: split scale.asm.Ronald S. Bultje2012-01-03
| | | | | | | | | | scale.asm keeps horizontal scaling functions, whereas output.asm gets the vertical scaling/output functions.
| * swscale: don't show full-chroma-int warning for non-RGB output.Ronald S. Bultje2012-01-03
| | | | | | | | Non-RGB output always uses full chroma interpolation.
| * swscale: add MMX files to MMX-OBJS instead of OBJS.Ronald S. Bultje2012-01-03
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-03
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: mpegenc: use avctx->slices as number of slices v410enc: fix undefined signed left shift caused by integer promotion Release notes: mention cleaned up header includes fix Changelog file Fix a bunch of typos. Drop some pointless void* return value casts from av_malloc() invocations. wavpack: fix typos in previous cosmetic clean-up commit wavpack: cosmetics: K&R pretty-printing avconv: remove the 'codec framerate is different from stream' warning wavpack: determine sample_fmt before requesting a buffer bmv audio: implement new audio decoding API mpegaudiodec: skip all channels when skipping granules mpegenc: simplify muxrate calculation Conflicts: Changelog avconv.c doc/RELEASE_NOTES libavcodec/h264.c libavcodec/mpeg12.c libavcodec/mpegaudiodec.c libavcodec/mpegvideo.c libavformat/mpegenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Drop some pointless void* return value casts from av_malloc() invocations.Diego Biurrun2012-01-02
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-27
|\| | | | | | | | | | | | | | | | | | | | | | | * qatar/master: fate: split off vqf/twinvq FATE tests into their own file fate: split off mpc FATE tests into their own file fate: split off libavcodec FATE tests into their own file fate: split off Microsoft codec FATE tests into their own file fate: group all VP* codec FATE tests together in one file swscale: prevent invalid writes in packed_16bpc_bswap Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * swscale: prevent invalid writes in packed_16bpc_bswapJanne Grunau2011-12-26
| | | | | | | | | | Writes past the end of the destination buffer were occuring when its stride was smaller than the stride of the source. Fixes Bug #183.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-23
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: build: fix standalone compilation of OMA muxer build: fix standalone compilation of Microsoft XMV demuxer build: fix standalone compilation of Core Audio Format demuxer kvmc: fix invalid reads 4xm: Add a check in decode_i_frame to prevent buffer overreads adpcm: fix IMA SMJPEG decoding options: set minimum for "threads" to zero bsd: use number of logical CPUs as automatic thread count windows: use number of CPUs as automatic thread count linux: use number of CPUs as automatic thread count pthreads: reset active_thread_type when slice thread_init returrns early v410dec: include correct headers Drop ALT_ prefix from BITSTREAM_READER_LE name. lavfi: always build vsrc_buffer. ra144enc: zero the reflection coeffs if the filter is unstable sws: readd PAL8 to isPacked() mov: Don't stick the QuickTime field ordering atom in extradata. truespeech: fix invalid reads in truespeech_apply_twopoint_filter() Conflicts: configure libavcodec/4xm.c libavcodec/avcodec.h libavfilter/Makefile libavfilter/allfilters.c libavformat/Makefile libswscale/swscale_internal.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * sws: readd PAL8 to isPacked()Anton Khirnov2011-12-22
| | | | | | | | Fixes PAL8 to YUV conversion.
* | libswscale: increase LIBSWSCALE_VERSION_MICRO to 100Michael Niedermayer2011-12-22
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: h264: clear trailing bits in partially parsed NAL units vc1: Handle WVC1 interlaced stream xl: Fix overreads mpegts: rename payload_index to payload_size segment: introduce segmented chain muxer lavu: add AVERROR_BUG error value avplay: clear pkt_temp when pkt is freed. qcelpdec: K&R formatting cosmetics qcelpdec: cosmetics: drop some pointless parentheses x86: conditionally compile dnxhd encoder optimizations Revert "h264: skip start code search if the size of the nal unit is known" swscale: fix formatting and indentation of unscaled conversion routines. h264: skip start code search if the size of the nal unit is known cljr: fix buf_size sanity check cljr: Check if width and height are positive integers Conflicts: libavcodec/cljr.c libavcodec/vc1dec.c libavformat/Makefile libavformat/mpegtsenc.c libavformat/segment.c libswscale/swscale_unscaled.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * swscale: fix formatting and indentation of unscaled conversion routines.Nathan Adil Maxson2011-12-18
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * swscale: fix overflows in vertical scaling at top/bottom edges.Ronald S. Bultje2011-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes integer multiplication overflows in RGB48 output (vertical) scaling as detected by IOC. What happens is that for certain types of filters (lanczos, spline, bicubic), the intermediate sum of coefficients in the middle of a filter can be larger than the fixed-point equivalent of 1.0, even if the final sum is 1.0. This is fine and we support that. However, at frame edges, initFilter() will merge the coefficients for the off-screen pixels into the top or bottom pixel, such as to emulate edge extension. This means that suddenly, a single coefficient can be larger than the fixed-point equivalent of 1.0, which the vertical scaling routines do not support. Therefore, remove the merging of coefficients for edges for the vertical scaling filter, and instead add edge detection to the scaler itself so that it copies the pointers (not data) for the edges (i.e. it uses line[0] for line[-1] as well), so that a single coefficient is never larger than the fixed-point equivalent of 1.0.
* | sws: Print an error in case of av_malloc() failureMichael Niedermayer2011-12-19
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale: Fix several (real world) integer overflows.Michael Niedermayer2011-12-19
| | | | | | | | | | | | | | Fixes Ticket795 Bug Found by: Oana Stratulat Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-18
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: build: link test programs with static libraries dct-test: remove unused variable cropTbl swscale: fix overflow in gray16 vertical scaling. get_bits: remove LAST_SKIP_CACHE macro swscale: fix integer overflows in RGB pixel writing. swscale: add endian conversion for RGB555 and RGB444 pixel formats swscale: fix overflows in output of RGB48 pixels. get_bits: remove strange/obsolete comments get_bits: whitespace (mostly) cosmetics swscale: add rgb565 endianess conversion get_bits: remove unnecessary #includes mp3dec: hack: fix decoding with safe bitstream reader fate: fix eatqi test adpcm: Check for channels to be a non-zero integer swscale: fix overflows in RGB rounding constants. get_bits: introduce safe bitreading to prevent overreads. Conflicts: libswscale/swscale.c libswscale/swscale_unscaled.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * swscale: fix overflow in gray16 vertical scaling.Ronald S. Bultje2011-12-17
| | | | | | | | | | | | | | | | | | | | This fixes the same overflow as in the RGB48/16-bit YUV scaling; some filters can overflow both negatively and positively (e.g. spline/lanczos), so we bias a signed integer so it's "half signed" and "half unsigned", and can cover overflows in both directions while maintaining full 31-bit depth. Signed-off-by: Mans Rullgard <mans@mansr.com>
| * swscale: fix integer overflows in RGB pixel writing.Mans Rullgard2011-12-17
| | | | | | | | | | | | | | | | We're shifting individual components (8-bit, unsigned) left by 24, so making them unsigned should give the same results without the overflow. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * swscale: add endian conversion for RGB555 and RGB444 pixel formatsJanne Grunau2011-12-17
| | | | | | | | Add a macro to shorten the if condition.