Commit Graph

14 Commits

Author SHA1 Message Date
Michael Niedermayer
6ae1b70cb4 avcodec/magicyuv: Check that vlc len is not too large
Fixes: runtime error: shift exponent -95 is negative
Fixes: 2568/clusterfuzz-testcase-minimized-4926115716005888

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 341f01290c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-07-19 15:26:37 +02:00
Michael Niedermayer
9970fa10c0 avcodec/magicyuv: Check len to be supported
Fixes: shift exponent -1 is negative
Fixes: 1390/clusterfuzz-testcase-minimized-5452757630713856

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2162b862eb)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-14 00:21:49 +02:00
James Almer
6d4c9f2ade lossless_videodsp: rename add_hfyu_left_pred_int16 to add_left_pred_int16
Signed-off-by: James Almer <jamrial@gmail.com>
2017-01-12 22:53:05 -03:00
James Almer
47f212329e huffyuvdsp: move functions only used by huffyuv from lossless_videodsp
Signed-off-by: James Almer <jamrial@gmail.com>
2017-01-12 22:53:05 -03:00
James Almer
5ac1dd8e23 lossless_videodsp: move shared functions from huffyuvdsp
Several codecs other than huffyuv use them.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-01-12 22:53:04 -03:00
Paul B Mahol
12461636ea avcodec/magicyuv: export colorspace and color_range for YUV
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-12-26 17:34:57 +01:00
Paul B Mahol
6d09d6edbc avcodec/magicyuv: add 10 bit support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-12-20 13:32:15 +01:00
Clément Bœsch
c3e2e842fa Merge commit 'd78fd2fa21cde28465e40dd0be4446b1387d22a6'
* commit 'd78fd2fa21cde28465e40dd0be4446b1387d22a6':
  Add MagicYUV decoder

Changes observed from Libav:
- many cosmetics (function renames/move, spacing, line breaks)
- MagicYUVContext.slices_size is now unsigned
- use of pixdesc (include fixed in FFmpeg)
- mention of "Lossless" in the long name dropped (also removed from
  general.texi in FFmpeg)
- addition of the FF_CODEC_CAP_INIT_THREADSAFE caps
- use of qsort() instead of AV_QSORT() (NOT MERGED)
- use of AVCodecContext.{width,height} instead of AVCodecContext.coded_{width,height} (NOT MERGED)

See also 77f9c4b7aa

Merged-by: Clément Bœsch <u@pkh.me>
2016-07-14 18:52:20 +02:00
Paul B Mahol
d78fd2fa21 Add MagicYUV decoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-06-20 15:45:51 -04:00
Clément Bœsch
fd1d84bcf6 lavc/magicyuv: fix undefined behaviour introduced in 8a135a55b
Order of evaluation of parameters in C is not defined.
2016-06-19 19:01:14 +02:00
Paul B Mahol
8a135a55b3 avcodec/magicyuv: check dimensions
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-06-19 09:45:29 +02:00
Paul B Mahol
e8a236add8 avcodec/magicyuv: set correct size of last slice for each plane
Fixes invalid read.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-06-02 22:43:51 +02:00
Paul B Mahol
a3c2a9c736 avcodec/magicyuv: fix decoding of raw slices
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-06-02 06:59:46 +02:00
Paul B Mahol
77f9c4b7aa avocdec: add MagicYUV decoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-05-31 22:37:09 +02:00