summaryrefslogtreecommitdiff
path: root/libavcodec/screenpresso.c
Commit message (Collapse)AuthorAge
* avcodec: use the new AVFrame key_frame flag in all decoders and encodersJames Almer2023-05-04
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/codec_internal: Add macro to set AVCodec.long_nameAndreas Rheinhardt2022-09-03
| | | | | | | | It reduces typing: Before this patch, there were 105 codecs whose long_name-definition exceeded the 80 char line length limit. Now there are only nine of them. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/internal: Move ff_reget_buffer() to decode.hAndreas Rheinhardt2022-08-27
| | | | | | | | | Only used by decoders. Also clean up the headers a bit while removing now unnecessary internal.h inclusions. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec: Make init-threadsafety the defaultAndreas Rheinhardt2022-07-18
| | | | | | | | | | | and remove FF_CODEC_CAP_INIT_THREADSAFE All our native codecs are already init-threadsafe (only wrappers for external libraries and hwaccels are typically not marked as init-threadsafe yet), so it is only natural for this to also be the default state. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/codec_internal: Use union for FFCodec decode/encode callbacksAndreas Rheinhardt2022-04-05
| | | | | | | | | | | This is possible, because every given FFCodec has to implement exactly one of these. Doing so decreases sizeof(FFCodec) and therefore decreases the size of the binary. Notice that in case of position-independent code the decrease is in .data.rel.ro, so that this translates to decreased memory consumption. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/codec_internal: Make FFCodec.decode use AVFrame*Andreas Rheinhardt2022-04-05
| | | | | | | | This increases type-safety by avoiding conversions from/through void*. It also avoids the boilerplate "AVFrame *frame = data;" line for non-subtitle decoders. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/codec_internal: Add FFCodec, hide internal part of AVCodecAndreas Rheinhardt2022-03-21
| | | | | | | | | | | | | | | | Up until now, codec.h contains both public and private parts of AVCodec. This exposes the internals of AVCodec to users and leads them into the temptation of actually using them and forces us to forward-declare structures and types that users can't use at all. This commit changes this by adding a new structure FFCodec to codec_internal.h that extends AVCodec, i.e. contains the public AVCodec as first member; the private fields of AVCodec are moved to this structure, leaving codec.h clean. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/internal: Move FF_CODEC_CAP_* to a new header codec_internal.hAndreas Rheinhardt2022-03-21
| | | | | | | | | | Also move FF_CODEC_TAGS_END as well as struct AVCodecDefault. This reduces the amount of files that have to include internal.h (which comes with quite a lot of indirect inclusions), as e.g. most encoders don't need it. It is furthemore in preparation for moving the private part of AVCodec out of the public codec.h. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec: Constify AVCodecsAndreas Rheinhardt2021-04-27
| | | | | | | | | | Given that the AVCodec.next pointer has now been removed, most of the AVCodecs are not modified at all any more and can therefore be made const (as this patch does); the only exceptions are the very few codecs for external libraries that have a init_static_data callback. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/screenpresso: Optimize sum_delta_flipped()Michael Niedermayer2020-01-30
| | | | | | | | | 553 -> 332 sec Testcase: 20280/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SCREENPRESSO_fuzzer-6238663432470528 Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/decode: add a flags parameter to ff_reget_buffer()James Almer2019-09-04
| | | | | | | | | | Some decoders may not need a writable buffer in some specific cases, but only a reference to the existing buffer with updated frame properties instead, for the purpose of returning duplicate frames. For this, the FF_REGET_BUFFER_FLAG_READONLY flag is added, which will prevent potential allocations and buffer copies when they are not needed. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/screenpresso: return the packet size instead of 0Michael Niedermayer2016-12-15
| | | | | | | | Most decoders return the amount of data used. This is more consistent Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc/screenpresso: Fix 32bit pix_fmt, there is no transparency.Carl Eugen Hoyos2016-08-13
| | | | Fixes a remaining issue of ticket #5025.
* Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch2016-06-21
|\ | | | | | | | | | | | | * commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
| * cosmetics: Fix spelling mistakesVittorio Giovara2016-05-04
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit 'ec8a69fab657f9cce624e8b0f4069d12696890bf'Derek Buitenhuis2016-05-08
|\| | | | | | | | | | | | | * commit 'ec8a69fab657f9cce624e8b0f4069d12696890bf': screenpresso: Correctly handle keyframes Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * screenpresso: Correctly handle keyframesVittorio Giovara2016-04-04
| | | | | | | | | | | | | | | | The first byte contains compression level together with keyframe status. When a frame is not interpreted correctly, its data is summed to the reference, and would degrade over time, producing an incorrect result. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit '95db8c757cb003a71b040b567f38be74151deb5c'Derek Buitenhuis2016-05-08
|\| | | | | | | | | | | | | * commit '95db8c757cb003a71b040b567f38be74151deb5c': screenpresso: Add extended pixel format support Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * screenpresso: Add extended pixel format supportVittorio Giovara2016-04-04
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit 'e25cac50e05d29a15d7a52c01c394ba913c97aee'Derek Buitenhuis2015-11-19
|\| | | | | | | | | | | | | * commit 'e25cac50e05d29a15d7a52c01c394ba913c97aee': lavc: Add missing mem.h header to libxvid and screenpresso Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * lavc: Add missing mem.h header to libxvid and screenpressoVittorio Giovara2015-11-12
| |
* | Merge commit '3c5cf2a31b4b29a8e4282cbe6a3f0617c14698b8'Hendrik Leppkes2015-10-27
|\| | | | | | | | | | | | | * commit '3c5cf2a31b4b29a8e4282cbe6a3f0617c14698b8': screenpresso: Drop parameter change check Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * screenpresso: Drop parameter change checkVittorio Giovara2015-10-25
| | | | | | | | | | Size can never change, allowing us to use ff_reget_buffer, and to simplify the code a little.
* | Merge commit '9a3202a98b2e095b54dd784c3e01a09a676fc3fa'Hendrik Leppkes2015-10-03
|/ | | | | | | * commit '9a3202a98b2e095b54dd784c3e01a09a676fc3fa': Screenpresso SPV1 decoder Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
* Screenpresso SPV1 decoderVittorio Giovara2015-09-30
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>