Commit Graph

299 Commits

Author SHA1 Message Date
Peter Ross 02b63246cf libswscale: bayer to rgb24 & yv12 colorspace converters
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-23 02:38:22 +01:00
Michael Niedermayer 51fed95dde swscale/utils: fix wrong deprecated message with rgb0
Fixes Ticket3242
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-24 22:47:49 +01:00
Michael Niedermayer 037fc3b054 swscale/utils: check chroma width for fast bilinear scaler
Fixes artifacts where fast bilinear was used for downscaling chroma

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-15 14:13:55 +01:00
Michael Niedermayer 554e913fd7 swscale/utils: remove useless ()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-15 14:10:02 +01:00
Michael Niedermayer dc54bd4e8d swscale/utils: factor (d + 1 < 4) out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-15 13:49:20 +01:00
Michael Niedermayer 4d18060e56 swscale/utils: fill xyz tables only when they will be used
makes the first call to sws_getContext() 1ms faster

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-07 02:04:31 +01:00
Stefano Sabatini 2a6c95d85f lsws/utils: introduce scale_algorithms array
Allow some dumb factorizations, slightly decrease spaghetti factor.
2013-11-05 14:01:53 +01:00
Stefano Sabatini 246e323de8 lsws/utils: fix typo 2013-11-05 00:04:17 +01:00
Stefano Sabatini ff9d11f95d lsws: use av_pix_fmt_get_chroma_sub_sample()
Remove duplicated getSubSampleFactors() function. Simplify.
2013-10-24 08:12:38 +02:00
Michael Niedermayer eb4205cc89 swscale/utils: check mprotect() return code
Found-by: wm4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-23 10:14:05 +02:00
Michael Niedermayer 2db6547237 swscale/utils/sws_setColorspaceDetails(): fix indention
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-17 14:02:43 +02:00
Michael Niedermayer a830915b78 swscale: Use full resolution chroma for yuv2rgb when the input has full chroma
See Ticket3028

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-10 17:28:59 +02:00
Michael Niedermayer 5710f55e49 Merge commit '6b3ff6f91a535d6383f41ca7bdf760165dcb6015'
* commit '6b3ff6f91a535d6383f41ca7bdf760165dcb6015':
  swscale: provide a default scaler if none is set

Conflicts:
	libswscale/utils.c

The default is left at bicubic until someone has compared the scalers
properly speed and quality wise.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-06 11:44:05 +02:00
Vittorio Giovara 6b3ff6f91a swscale: provide a default scaler if none is set
Lanczos for general case, sinc for upscaling, Gaussian for
downscaling. According to current literature these scalers
should be the best quality-wise algorithms for each case.

Inspired from a patch by wm4 <nfxjfg@googlemail.com>

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-10-05 18:38:55 +02:00
Michael Niedermayer 2e2a2d8801 swscale/utils: dont divide by zero with zero vectors
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-01 00:27:28 +02:00
Michael Niedermayer 2d28950da9 swscale/utils: remove redundant NULL checks before sws_freeVec()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 21:48:54 +02:00
Michael Niedermayer a446657d8c swscale/utils: simplify cpu caps printing code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 21:31:58 +02:00
Michael Niedermayer 9d052adbeb swscale/utils: Simplify scaler name printing code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 21:29:42 +02:00
Michael Niedermayer aec91de549 swscale/utils: Allow sws_setColorspaceDetails() to use the tables from sws_getColorspaceDetails()
Previously this would have lead to a memcpy(a,a) which violates the
requirement of non overlapping src and dst.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 17:21:13 +02:00
Michael Niedermayer c914c99d4b swscale/utils: use memcpy instead of loop in sws_cloneVec()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-08 16:39:38 +02:00
Michael Niedermayer f0a3562382 Merge commit '79aec43ce813a3e270743ca64fa3f31fa43df80b'
* commit '79aec43ce813a3e270743ca64fa3f31fa43df80b':
  x86: Add and use more convenience macros to check CPU extension availability

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-30 11:57:35 +02: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 29daad5b98 Merge commit 'f61bece684d9685b07895508e6c1c733b5564ccf'
* commit 'f61bece684d9685b07895508e6c1c733b5564ccf':
  ppc: Add and use convenience macro to check for AltiVec availability

Conflicts:
	libavcodec/ppc/dsputil_ppc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-29 14:24:07 +02:00
Diego Biurrun 79aec43ce8 x86: Add and use more convenience macros to check CPU extension availability 2013-08-29 13:07:37 +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 f61bece684 ppc: Add and use convenience macro to check for AltiVec availability 2013-08-28 23:54:15 +02:00
Michael Niedermayer 23b3141261 swscale: improve dither checks
Bssed on patch by Øyvind Kolås <pippin@gimp.org>

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-19 18:33:50 +02:00
Michael Niedermayer 8c50ea2251 swscale: set dither to a specific value for rgb/bgr8 output
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-19 18:31:35 +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 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
Michael Niedermayer 8d745281a4 swscale/utils: Fix potential overflow of srcPos*C before converting to 64bit
Fixes CID1061054

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-08 02:56:26 +02:00
Michael Niedermayer bc721ac9f7 swscale/utils: Fix potential overflow of dstPos*xInc before converting to 64bit
Fixes CID1061053

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-08 02:51:52 +02:00
Michael Niedermayer 8efe96ee6f swscale/fill_rgb2yuv_table: fix default detection
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-27 01:11:37 +02:00
Michael Niedermayer a7e45cfa11 swscale/sws_getColorspaceDetails: dont fail for non yuv
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-25 02:50:46 +02:00
Michael Niedermayer 436616fd42 swscale: exchange src & dst chroma pos
Found-by: wm4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-24 22:43:50 +02:00
clook b9b1a2c3e4 libswscale: Adding RGB => XYZ support 2013-07-23 01:02:41 +02:00
Michael Niedermayer b405f4e916 swscale: Add support to specify chroma position
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-17 01:59:10 +02:00
Michael Niedermayer 37f4aa133d swscale: move default colorspace setup to sws_init_filter()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-16 02:44:25 +02:00
Michael Niedermayer c75dde6074 swscale: call handle_format() from the functions that need it
This should fix some hypothetical issues with alloc/init_context() usage

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-14 03:36:19 +02:00
Michael Niedermayer 0fc11e7bad swscale: make handle_formats() safe to be called multiple times
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-14 03:36:19 +02:00
Michael Niedermayer d5f5e51662 swscale: move format handling to its own function
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-14 03:36:19 +02:00
Michael Niedermayer 1ba01d3d46 swscale: treat gray as a fullrage (0-255) format
Fixes Ticket2684

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-08 15:21:48 +02:00
Hendrik Leppkes 7cdf574c22 swscale: fix filter alignment reduction without inline asm
Fixes scaling in MSVC/ICL, where inline asm is not present, but the
YASM scaling code is.

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-21 21:01:11 +02:00
Michael Niedermayer a90baa63c3 add YUVJ411P
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-21 12:56:11 +02:00
Paul B Mahol e1746d057b swscale: RGBA64 output
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-12 21:47:19 +02:00
Michael Niedermayer 63725d158d Revert "sws: support endianness conversion for AV_PIX_FMT_RGBA64"
This reverts commit 23f7b14f28.

This commit broke fate
2013-05-12 15:05:25 +02:00
Paul B Mahol 23f7b14f28 sws: support endianness conversion for AV_PIX_FMT_RGBA64
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-05-12 11:44:20 +00:00