summaryrefslogtreecommitdiff
path: root/libswscale/utils.c
Commit message (Collapse)AuthorAge
* Do not set swscale sizeFactor to -1.Carl Eugen Hoyos2014-03-25
| | | | Fixes ticket #3495.
* swscale: add two spatially stable dithering methodsØyvind Kolås2014-03-25
| | | | | | | | | | | | | Both of these dithering methods are from http://pippin.gimp.org/a_dither/ for GIF they can be considered better than bayer (provides more gray-levels), and spatial stability - often more than twice as good compression and less visual flicker than error diffusion methods (the methods also avoids error-shadow artifacts of diffusion dithers). These methods are similar to blue/green noise type dither masks; but are simple enough to generate their mask on the fly. They are still research work in progress; though more expensive to generate masks (which can be used in a LUT) like 'void and cluster' and similar methods will yield superior results
* swscale/utils: Fix color range of gray16Carl Eugen Hoyos2014-03-18
| | | | | | | | | | | Improves rgb -> gray16 conversion Fixes Ticket3422 The pam and png output files look visually similar, in both cases the dynamics increase to 0x0 -> 0xfffb. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* libswscale: bayer to rgb24 & yv12 colorspace convertersPeter Ross2014-02-23
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swscale/utils: fix wrong deprecated message with rgb0Michael Niedermayer2013-12-24
| | | | | Fixes Ticket3242 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swscale/utils: check chroma width for fast bilinear scalerMichael Niedermayer2013-12-15
| | | | | | Fixes artifacts where fast bilinear was used for downscaling chroma Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swscale/utils: remove useless ()Michael Niedermayer2013-12-15
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swscale/utils: factor (d + 1 < 4) outMichael Niedermayer2013-12-15
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swscale/utils: fill xyz tables only when they will be usedMichael Niedermayer2013-12-07
| | | | | | makes the first call to sws_getContext() 1ms faster Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lsws/utils: introduce scale_algorithms arrayStefano Sabatini2013-11-05
| | | | Allow some dumb factorizations, slightly decrease spaghetti factor.
* lsws/utils: fix typoStefano Sabatini2013-11-05
|
* lsws: use av_pix_fmt_get_chroma_sub_sample()Stefano Sabatini2013-10-24
| | | | Remove duplicated getSubSampleFactors() function. Simplify.
* swscale/utils: check mprotect() return codeMichael Niedermayer2013-10-23
| | | | | Found-by: wm4 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swscale/utils/sws_setColorspaceDetails(): fix indentionMichael Niedermayer2013-10-17
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swscale: Use full resolution chroma for yuv2rgb when the input has full chromaMichael Niedermayer2013-10-10
| | | | | | See Ticket3028 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit '6b3ff6f91a535d6383f41ca7bdf760165dcb6015'Michael Niedermayer2013-10-06
|\ | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * swscale: provide a default scaler if none is setVittorio Giovara2013-10-05
| | | | | | | | | | | | | | | | | | | | 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>
* | swscale/utils: dont divide by zero with zero vectorsMichael Niedermayer2013-10-01
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale/utils: remove redundant NULL checks before sws_freeVec()Michael Niedermayer2013-09-17
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale/utils: simplify cpu caps printing codeMichael Niedermayer2013-09-17
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale/utils: Simplify scaler name printing codeMichael Niedermayer2013-09-17
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale/utils: Allow sws_setColorspaceDetails() to use the tables from ↵Michael Niedermayer2013-09-17
| | | | | | | | | | | | | | | | | | 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>
* | swscale/utils: use memcpy instead of loop in sws_cloneVec()Michael Niedermayer2013-09-08
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '79aec43ce813a3e270743ca64fa3f31fa43df80b'Michael Niedermayer2013-08-30
|\| | | | | | | | | | | | | * commit '79aec43ce813a3e270743ca64fa3f31fa43df80b': x86: Add and use more convenience macros to check CPU extension availability Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * x86: Add and use more convenience macros to check CPU extension availabilityDiego Biurrun2013-08-29
| |
* | Merge commit '1909f6b1b6da2db371c179bed5a19aaf979b7557'Michael Niedermayer2013-08-29
|\| | | | | | | | | | | | | | | | | | | * commit '1909f6b1b6da2db371c179bed5a19aaf979b7557': swscale: cosmetics: Drop silly camelCase from swScale function pointer name Conflicts: libswscale/swscale_unscaled.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * swscale: cosmetics: Drop silly camelCase from swScale function pointer nameDiego Biurrun2013-08-29
| |
* | Merge commit 'c2503d9c8ab42ea55922e9f5a10c8bfbbbfeaf19'Michael Niedermayer2013-08-29
|\| | | | | | | | | | | | | | | | | | | * commit 'c2503d9c8ab42ea55922e9f5a10c8bfbbbfeaf19': swscale: ppc: Hide arch-specific initialization details Conflicts: libswscale/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * swscale: ppc: Hide arch-specific initialization detailsDiego Biurrun2013-08-29
| | | | | | | | Also give consistent names to init functions.
* | Merge commit 'f61bece684d9685b07895508e6c1c733b5564ccf'Michael Niedermayer2013-08-29
|\| | | | | | | | | | | | | | | | | | | * 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>
| * ppc: Add and use convenience macro to check for AltiVec availabilityDiego Biurrun2013-08-28
| |
* | swscale: improve dither checksMichael Niedermayer2013-08-19
| | | | | | | | | | | | Bssed on patch by Øyvind Kolås <pippin@gimp.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale: set dither to a specific value for rgb/bgr8 outputMichael Niedermayer2013-08-19
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'aa2ba8c99e5708884a56aea9c1d96e014866f8a3'Michael Niedermayer2013-08-16
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * swscale: Move extern declarations for tables to swscale_internal.hDiego Biurrun2013-08-15
| | | | | | | | Also add missing ff_ prefixes where necessary.
* | sws: add dither enumMichael Niedermayer2013-08-15
| | | | | | | | | | | | | | | | | | | | | | 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>
* | swscale/utils: Fix potential overflow of srcPos*C before converting to 64bitMichael Niedermayer2013-08-08
| | | | | | | | | | | | Fixes CID1061054 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale/utils: Fix potential overflow of dstPos*xInc before converting to 64bitMichael Niedermayer2013-08-08
| | | | | | | | | | | | Fixes CID1061053 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale/fill_rgb2yuv_table: fix default detectionMichael Niedermayer2013-07-27
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale/sws_getColorspaceDetails: dont fail for non yuvMichael Niedermayer2013-07-25
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale: exchange src & dst chroma posMichael Niedermayer2013-07-24
| | | | | | | | | | Found-by: wm4 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | libswscale: Adding RGB => XYZ supportclook2013-07-23
| |
* | swscale: Add support to specify chroma positionMichael Niedermayer2013-07-17
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale: move default colorspace setup to sws_init_filter()Michael Niedermayer2013-07-16
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale: call handle_format() from the functions that need itMichael Niedermayer2013-07-14
| | | | | | | | | | | | This should fix some hypothetical issues with alloc/init_context() usage Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale: make handle_formats() safe to be called multiple timesMichael Niedermayer2013-07-14
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale: move format handling to its own functionMichael Niedermayer2013-07-14
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale: treat gray as a fullrage (0-255) formatMichael Niedermayer2013-07-08
| | | | | | | | | | | | Fixes Ticket2684 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale: fix filter alignment reduction without inline asmHendrik Leppkes2013-06-21
| | | | | | | | | | | | | | | | 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>
* | add YUVJ411PMichael Niedermayer2013-05-21
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>