summaryrefslogtreecommitdiff
path: root/libavcodec/speedhq.c
Commit message (Collapse)AuthorAge
* avcodec/speedhq: fix decoding non 444 subsampling when width is not multiple ↵Paul B Mahol2021-03-04
| | | | of 16
* lavu: move LOCAL_ALIGNED from internal.h to mem_internal.hAnton Khirnov2021-01-01
| | | | That is a more appropriate place for it.
* configure, libavcodec/speedhq: Fix compiling SpeedHQ encoderAndreas Rheinhardt2020-12-31
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/speedhq: Remove castAndreas Rheinhardt2020-12-31
| | | | | Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec: add SpeedHQ encoderJean-Baptiste Kempf2020-11-24
|
* avcodec/speedhq: Avoid reversing BE codes for LE bitstream readerAndreas Rheinhardt2020-10-12
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/speedhq: Don't use ff_ prefix for static symbolsAndreas Rheinhardt2020-10-12
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/speedhq: Don't pretend reading DC can failAndreas Rheinhardt2020-10-12
| | | | | | | | It can't, because the tables used don't have any loose ends. This also fixes a bug in the only caller of decode_dc_le(): It didn't check the return value. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* Speedhq: Decode field 2 correctlyJean-Baptiste Kempf2020-07-06
| | | | This is similar to field 1 (effd2e72)
* avcodec/speedhq: Make speedhq_vlc constMichael Niedermayer2018-10-07
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavcodec/blockdsp : add AVX versionMartin Vignali2017-10-03
| | | | | | | Also modify the required alignment, to 32 instead of 16 for several codecs Signed-off-by: James Almer <jamrial@gmail.com>
* speedhq: fix behavior of single-field decodingSteinar H. Gunderson2017-08-03
| | | | | | | | | | The height convention for decoding frames with only a single field made sense for compatibility with legacy decoders, but doesn't really match the convention used by NDI, which is the primary (only?) user. Thus, change it to simply assuming that if the two fields overlap, the frame is meant to be a single field and the frame height matches the field height. Signed-off-by: James Almer <jamrial@gmail.com>
* speedhq: fix decoding artifactsSteinar H. Gunderson2017-02-21
| | | | | | | | | | | | | | | | The quantization table is stored in the natural order, but when we access it, we use an index that's in zigzag order, causing us to read the wrong value. This causes artifacts, especially in areas with horizontal or vertical edges. The artifacts look a lot like the DCT ringing artifacts you'd expect to see from a low-bitrate file, but when comparing to NewTek's own decoder, it's obvious they're not supposed to be there. Fix by simply storing the scaled quantization table in zigzag order. Performance is unchanged. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* speedhq: fix out-of-bounds writeSteinar H. Gunderson2017-02-02
| | | | | | | | | | | | | Certain alpha run lengths (for SHQ1/SHQ3/SHQ5) could be stored in both long and short versions, and we would only accept the short version, returning -1 (invalid code) for the others. This could cause an out-of-bounds write on malicious input, as discovered by Andreas Cadhalpun during fuzzing. Fix by simply allowing both versions, leaving no invalid codes in the alpha VLC. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* avcodec/speedhq: Fix warning about "initialization from incompatible pointer ↵Michael Niedermayer2017-01-19
| | | | | | type" Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* speedhq: Align blocks variable properly.Steinar H. Gunderson2017-01-13
| | | | | | | | | Seemingly ff_clear_block_sse assumed that the block array is aligned, so make sure it is. Fixes ticket #6079 Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: add Newtek SpeedHQ decoderSteinar H. Gunderson2017-01-11
This decoder can decode all existing SpeedHQ formats (SHQ0–5, 7, and 9), including correct decoding of the alpha channel. 1080p is decoded in 142 fps on one core of my i7-4600U (2.1 GHz Haswell), about evenly split between bitstream reader and IDCT. There is currently no attempt at slice or frame threading, even though the format trivially supports both. NewTek very helpfully provided a full set of SHQ samples, as well as source code for an SHQ2 encoder (not included) and assistance with understanding some details of the format.