summaryrefslogtreecommitdiff
path: root/libavcodec/dolby_e.c
Commit message (Collapse)AuthorAge
* 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>
* dolby_e: convert to new channel layout APIAnton Khirnov2022-03-15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/avcodec: Stop including channel_layout.h in avcodec.hAndreas Rheinhardt2021-07-22
| | | | | | Also include channel_layout.h directly wherever used. 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/dolby_e: Avoid duplicating sample rate tableAndreas Rheinhardt2021-01-30
| | | | | | | Set the sample rate when parsing the header instead and only copy the value in the decoder and the parser. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/dolby_e: Avoid code duplication when converting inputAndreas Rheinhardt2021-01-30
| | | | | | | | | convert_input, a nontrivial auxiliary function used by both the general parsing code as well as the decoder itself, has been duplicated in c7016e35a624a75bb5b82bee932ddfe28d013b3f; this commit removes said duplication. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/dolby_e_parse: Merge ff_dolby_e_parse_init/headerAndreas Rheinhardt2021-01-30
| | | | | | | | | | | These two functions are always called after another; after all, what ff_dolby_e_parse_init does is obviously part of parsing the frame header. Also move the DolbyEHeaderInfo into DBEContext so that parsing the frame header only needs one struct (both users used a DBEContext immediately followed by a separate DolbyEHeaderInfo). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/dolby_e: split decoder and parser more thoroughlyJames Almer2021-01-25
| | | | | | | | | Neither module should depend on the other. Move shared functions to its own file for this purpose, and ensure source files are compiled only when the required modules are enabled. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/dolby_e: Split decoder/parser filesNicolas Gaullier2021-01-25
|
* avcodec/dolby_e: Add a parserNicolas Gaullier2021-01-25
|
* lavu: move LOCAL_ALIGNED from internal.h to mem_internal.hAnton Khirnov2021-01-01
| | | | That is a more appropriate place for it.
* lavc/dolby_e: fix make checkheaders warningJun Zhao2018-06-10
| | | | | | | move the the function init_tables() definitions from header file to .c file to fix make checkheaders warning. Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* avcodec/dolby_e: fix potentially undefined pointer arithmeticfoo862017-07-26
| | | | | | | | Avoid undefined behavior in skip_input() by checking that enough data is available before incrementing input pointer. Check return values of parse_key() and skip_input() and exit early with error if there is not enough data.
* avcodec/dolby_e: add AV_CODEC_CAP_CHANNEL_CONF capabilityfoo862017-07-26
|
* avcodec/dolby_e: use av_clip_uintp2()James Almer2017-07-19
| | | | Fixes fate-source.
* avcodec: add Dolby E decoderfoo862017-07-19