Prevent a division by zero down the codepath.
Sample-Id: 00001721-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
This way all context fields get initialized and can be used without needing to reinit the context
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit '92b099daf4b8ef93513e38b43899cb8458a2fde3':
swscale: support converting YVYU422 pixel format
Conflicts:
libswscale/input.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
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
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>
* 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>
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>
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>
* commit '79aec43ce813a3e270743ca64fa3f31fa43df80b':
x86: Add and use more convenience macros to check CPU extension availability
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '1909f6b1b6da2db371c179bed5a19aaf979b7557':
swscale: cosmetics: Drop silly camelCase from swScale function pointer name
Conflicts:
libswscale/swscale_unscaled.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* 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>
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>