Commit Graph

596 Commits

Author SHA1 Message Date
Michael Niedermayer
14fa7fc6a8 swscale/swscale: fix srcStride/srcSlice typo
Fixes part of Ticket3466
Found by: Andrey_Karpov / PVS-Studio
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-16 02:09:39 +02:00
Michael Niedermayer
a2f088c0f9 swscale: factor ff_sws_init_range_convert() out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-14 23:25:28 +02:00
Michael Niedermayer
3751e5a821 swscale/swscale: clear to/from convert pointers when they used.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-14 23:15:31 +02:00
Michael Niedermayer
28875c4188 Merge commit '60c4660ba035bbfbcc84ac34129ce40e037c70ad'
* commit '60c4660ba035bbfbcc84ac34129ce40e037c70ad':
  swscale: fix an implementation-defined unsigned-to-signed conversion

Conflicts:
	libswscale/swscale_unscaled.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-13 01:26:49 +02:00
Michael Niedermayer
c9c0451224 swscale/swscale: fix integer overflow
Should fix fate failure with clang ftrapv

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-24 05:01:32 +01:00
Michael Niedermayer
ab9d7e0b12 swscale: fix rgb48Toxyz12() endianness
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-10 17:26:39 +01:00
Michael Niedermayer
01cac26f68 Merge commit '1909f6b1b6da2db371c179bed5a19aaf979b7557'
* commit '1909f6b1b6da2db371c179bed5a19aaf979b7557':
  swscale: cosmetics: Drop silly camelCase from swScale function pointer name

Conflicts:
	libswscale/swscale_unscaled.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-29 15:56:03 +02:00
Michael Niedermayer
5ff1b588eb Merge commit 'c2503d9c8ab42ea55922e9f5a10c8bfbbbfeaf19'
* commit 'c2503d9c8ab42ea55922e9f5a10c8bfbbbfeaf19':
  swscale: ppc: Hide arch-specific initialization details

Conflicts:
	libswscale/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-29 15:10:09 +02:00
Michael Niedermayer
db6b389c7f Merge commit 'a519583991c38d38503ab08357716513facc5725'
* commit 'a519583991c38d38503ab08357716513facc5725':
  swscale: x86: Hide arch-specific initialization details

Conflicts:
	libswscale/x86/Makefile
	libswscale/x86/swscale.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-29 14:42:34 +02:00
Diego Biurrun
1909f6b1b6 swscale: cosmetics: Drop silly camelCase from swScale function pointer name 2013-08-29 10:23:54 +02:00
Diego Biurrun
c2503d9c8a swscale: ppc: Hide arch-specific initialization details
Also give consistent names to init functions.
2013-08-29 10:23:41 +02:00
Diego Biurrun
a519583991 swscale: x86: Hide arch-specific initialization details
Also give consistent names to init functions.
2013-08-28 23:59:24 +02:00
Michael Niedermayer
c62801270f swscale: change ff_dither_8x8_128 dimensions to be consistent with the others
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-16 16:06:59 +02:00
Michael Niedermayer
c14fc4585c Merge commit 'aa2ba8c99e5708884a56aea9c1d96e014866f8a3'
* commit 'aa2ba8c99e5708884a56aea9c1d96e014866f8a3':
  swscale: Move extern declarations for tables to swscale_internal.h

Conflicts:
	libswscale/output.c
	libswscale/swscale_internal.h
	libswscale/swscale_unscaled.c
	libswscale/utils.c
	libswscale/yuv2rgb.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-16 12:56:48 +02:00
Michael Niedermayer
1ef0b8f9cc Merge commit 'd258531502b24cb653204fe4f003c8815755bdc4'
* commit 'd258531502b24cb653204fe4f003c8815755bdc4':
  swscale: Mark a bunch of tables only used within one file static

Conflicts:
	libswscale/swscale_unscaled.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-16 12:40:32 +02:00
Michael Niedermayer
1e0e193240 sws: add dither enum
This allows specifying more dither algorithms without using up flags and
without ambiguities.

Also initialize the new field based on the flags and use it.
Note, improving the logic of the checks is left to subsequent
commits, this here only switches from flags to enum.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-15 21:39:32 +02:00
Diego Biurrun
aa2ba8c99e swscale: Move extern declarations for tables to swscale_internal.h
Also add missing ff_ prefixes where necessary.
2013-08-15 14:38:03 +02:00
Diego Biurrun
d258531502 swscale: Mark a bunch of tables only used within one file static 2013-08-15 14:38:03 +02:00
clook
b9b1a2c3e4 libswscale: Adding RGB => XYZ support 2013-07-23 01:02:41 +02:00
Michael Niedermayer
6d323ff57a swscale: remove unneeded include assert.h
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-19 18:52:41 +02:00
Michael Niedermayer
c7c71f95f8 replace remaining PIX_FMT_* flags with AV_PIX_FMT_FLAG_*
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-15 11:23:14 +02:00
Michael Niedermayer
b2cf655d6e sws: add casts to silence pointer type mismatch warnings
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-10 20:36:12 +02:00
Clément Bœsch
570d63eef3 lavu: add FF_CEIL_RSHIFT and use it in various places. 2013-05-09 16:59:42 +02:00
Paul B Mahol
5c057433cc libswscale: GBRAP input & output and GBRAP16 input support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-05-08 12:48:05 +00:00
Michael Niedermayer
cb23b06e5e sws: fix typo in xyz2rgb matrix use.
Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-28 19:57:45 +02:00
Michael Niedermayer
24ec7a5e04 sws: Check for malloc failure of rgb0_tmp
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-28 19:31:16 +02:00
Michael Niedermayer
0c47c9028b sws: support xyz input
The implementation is heavily based on Matthias Buerchers and Nicolas Bertrands vf_xyz2rgb.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-28 19:30:01 +02:00
Michael Niedermayer
9aafb95ae2 sws: init input_rgb2yuv_table depending on yuv colorspace
For the default table we keep using the exact previous
coefficients, this way individual functions can be updated seperately
without breaking fate

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-15 01:30:15 +02:00
Michael Niedermayer
3662e49dde sws: move RGB2YUV_SHIFT to swscale_internal.h
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-15 01:23:29 +02:00
Michael Niedermayer
d4956b0bfb sws/input: replace hardcoded rgb2yuv coefficients by table
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-14 20:04:55 +02:00
Michael Niedermayer
353bd158f5 sws: Fix "warning: comparison of distinct pointer types lacks a cast"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-04 14:34:13 +01:00
Michael Niedermayer
4eb93bed4e swscale: GBRP output support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-01-27 15:28:07 -05:00
Michael Niedermayer
61884d1985 sws: GBRP output support
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-26 06:11:52 +01:00
Michael Niedermayer
89afa635bf sws: check that dither array is not null before memset
Fixes null pointer dereference

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-19 23:38:17 +01:00
Michael Niedermayer
8045c0167d sws: Only reset dither state for bitexact mode
the output looks better with a random initial state than
all 0

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-19 02:38:48 +01:00
Michael Niedermayer
646ade7679 sws: Support error diffusion dither for mono output
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-18 23:26:00 +01:00
Michael Niedermayer
c77eb4ee90 sws: fix warning: cast from pointer to integer of different size
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-29 20:50:43 +01:00
Michael Niedermayer
aa9507cc3d swscale: fix warning: assignment from incompatible pointer type
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-29 19:39:42 +01:00
Michael Niedermayer
d27edc038a Merge commit '511cf612ac979f536fd65e14603a87ca5ad435f3'
* commit '511cf612ac979f536fd65e14603a87ca5ad435f3':
  miscellaneous typo fixes

Conflicts:
	libavcodec/4xm.c
	libavcodec/lagarith.c
	libavcodec/parser.c
	libavcodec/ratecontrol.c
	libavcodec/shorten.c
	libavcodec/vda_h264.c
	libavformat/dvenc.c
	libavformat/wtv.c
	tools/patcheck

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-21 17:32:52 +01:00
Diego Biurrun
511cf612ac miscellaneous typo fixes 2012-12-21 00:18:34 +01:00
Michael Niedermayer
320ae9fb78 sws_scale: check input against NULL
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-07 21:50:07 +01:00
Michael Niedermayer
4d2f1d8c93 swscale.c:remove fill_plane9or10() use fillPlane16()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-30 18:51:21 +01:00
Michael Niedermayer
a201639a01 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  pixfmt: support more yuva formats
  swscale: support gray to 9bit and 10bit formats
  configure: rewrite print_config() function using awk
  FATE: fix (AD)PCM test dependencies broken in e519990
  Use ptrdiff_t instead of int for intra pred "stride" function parameter.
  x86: use PRED4x4/8x8/8x8L/16x16 macros to declare intrapred prototypes.

Conflicts:
	libavcodec/h264pred.c
	libavcodec/h264pred_template.c
	libavutil/pixfmt.h
	libswscale/swscale_unscaled.c
	tests/ref/lavfi/pixdesc
	tests/ref/lavfi/pixfmts_copy
	tests/ref/lavfi/pixfmts_null
	tests/ref/lavfi/pixfmts_scale
	tests/ref/lavfi/pixfmts_vflip

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-30 17:47:36 +01:00
Luca Barbato
26b5ad2543 swscale: support gray to 9bit and 10bit formats
With the input of Kostya and Ronald.
2012-10-30 12:02:41 +01:00
Michael Niedermayer
7a32ab5ed0 sws: get rid of C99 signed overflows try #2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 05:16:59 +02:00
Michael Niedermayer
3ee8eefbf2 sws: avoid signed C99 overflows
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 03:59:45 +02:00
Paul B Mahol
a291345b1e sws: do not use av_pix_fmt_descriptors directly
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-12 16:57:04 +00:00
Michael Niedermayer
a9bd51b1e6 Merge commit '9953ff3cd844eb5f6d8dfce98cad94b78a0fc7dc'
* commit '9953ff3cd844eb5f6d8dfce98cad94b78a0fc7dc':
  mpegvideo: fix indentation
  sws: do not use av_pix_fmt_descriptors directly.

Conflicts:
	libavcodec/mpegvideo.c
	libswscale/swscale_internal.h
	libswscale/swscale_unscaled.c
	libswscale/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-12 15:57:28 +02:00
Anton Khirnov
0a7068fa5d sws: do not use av_pix_fmt_descriptors directly. 2012-10-12 12:45:38 +02:00
Michael Niedermayer
ac627b3d38 Merge commit '716d413c13981da15323c7a3821860536eefdbbb'
* commit '716d413c13981da15323c7a3821860536eefdbbb':
  Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat

Conflicts:
	doc/examples/muxing.c
	ffmpeg.h
	ffmpeg_filter.c
	ffmpeg_opt.c
	ffplay.c
	ffprobe.c
	libavcodec/8bps.c
	libavcodec/aasc.c
	libavcodec/aura.c
	libavcodec/avcodec.h
	libavcodec/avs.c
	libavcodec/bfi.c
	libavcodec/bmp.c
	libavcodec/bmpenc.c
	libavcodec/c93.c
	libavcodec/cscd.c
	libavcodec/cyuv.c
	libavcodec/dpx.c
	libavcodec/dpxenc.c
	libavcodec/eatgv.c
	libavcodec/escape124.c
	libavcodec/ffv1.c
	libavcodec/flashsv.c
	libavcodec/fraps.c
	libavcodec/h264.c
	libavcodec/huffyuv.c
	libavcodec/iff.c
	libavcodec/imgconvert.c
	libavcodec/indeo3.c
	libavcodec/kmvc.c
	libavcodec/libopenjpegdec.c
	libavcodec/libopenjpegenc.c
	libavcodec/libx264.c
	libavcodec/ljpegenc.c
	libavcodec/mjpegdec.c
	libavcodec/mjpegenc.c
	libavcodec/motionpixels.c
	libavcodec/mpeg12.c
	libavcodec/mpeg12enc.c
	libavcodec/mpeg4videodec.c
	libavcodec/mpegvideo_enc.c
	libavcodec/pamenc.c
	libavcodec/pcxenc.c
	libavcodec/pgssubdec.c
	libavcodec/pngdec.c
	libavcodec/pngenc.c
	libavcodec/pnm.c
	libavcodec/pnmdec.c
	libavcodec/pnmenc.c
	libavcodec/ptx.c
	libavcodec/qdrw.c
	libavcodec/qpeg.c
	libavcodec/qtrleenc.c
	libavcodec/raw.c
	libavcodec/rawdec.c
	libavcodec/rl2.c
	libavcodec/sgidec.c
	libavcodec/sgienc.c
	libavcodec/snowdec.c
	libavcodec/snowenc.c
	libavcodec/sunrast.c
	libavcodec/targa.c
	libavcodec/targaenc.c
	libavcodec/tiff.c
	libavcodec/tiffenc.c
	libavcodec/tmv.c
	libavcodec/truemotion2.c
	libavcodec/utils.c
	libavcodec/vb.c
	libavcodec/vp3.c
	libavcodec/wnv1.c
	libavcodec/xl.c
	libavcodec/xwddec.c
	libavcodec/xwdenc.c
	libavcodec/yop.c
	libavdevice/v4l2.c
	libavdevice/x11grab.c
	libavfilter/avfilter.c
	libavfilter/avfilter.h
	libavfilter/buffersrc.c
	libavfilter/drawutils.c
	libavfilter/formats.c
	libavfilter/src_movie.c
	libavfilter/vf_ass.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fade.c
	libavfilter/vf_format.c
	libavfilter/vf_hflip.c
	libavfilter/vf_lut.c
	libavfilter/vf_overlay.c
	libavfilter/vf_pad.c
	libavfilter/vf_scale.c
	libavfilter/vf_transpose.c
	libavfilter/vf_yadif.c
	libavfilter/video.c
	libavfilter/vsrc_testsrc.c
	libavformat/movenc.c
	libavformat/mxf.h
	libavformat/utils.c
	libavformat/yuv4mpeg.c
	libavutil/imgutils.c
	libavutil/pixdesc.c
	libswscale/input.c
	libswscale/output.c
	libswscale/swscale_internal.h
	libswscale/swscale_unscaled.c
	libswscale/utils.c
	libswscale/x86/swscale_template.c
	libswscale/x86/yuv2rgb.c
	libswscale/x86/yuv2rgb_template.c
	libswscale/yuv2rgb.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-08 21:06:57 +02:00