aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/aptx.c
Commit message (Collapse)AuthorAgeFilesLines
* avcodec/aptx: Use AVCodecContext.frame_size according to the APIAndreas Rheinhardt2022-09-191-9/+0
| | | | | | | | | | | | | | | | | | Currently the APTX (HD) codecs set frame_size if unset and check whether it is divisible by block_size (corresponding to block_align as used by other codecs). But this is based upon a misunderstanding of the API: frame_size is not in bytes, but in samples. Said value is also not intended to be set by the user at all, but set by encoders and (possibly) decoders if the number of channels in a frame is constant. The latter condition is not fulfilled here, so only set it for encoders. Given that the encoder can handle any number of samples as long as it is divisible by four and given that it worked to set a custom frame size before, the encoders accept any multiple of four; otherwise the value is set to the value that it already had for APTX: 1024 samples (per channel). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/aptx: Move AudioFrameQueue to aptxenc.cAndreas Rheinhardt2022-08-271-1/+0
| | | | | | It is only used by the encoder. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/internal: Move FF_SIGNBIT and ff_log2_run to mathops.hAndreas Rheinhardt2022-03-211-1/+1
| | | | | | | It is a more fitting place for them. Also move the definition of ff_log2_run to mathtables.c. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/internal: Move FF_CODEC_CAP_* to a new header codec_internal.hAndreas Rheinhardt2022-03-211-0/+1
| | | | | | | | | | 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>
* aptx: convert to new channel layout APIAnton Khirnov2022-03-151-1/+1
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/aptx: split decoder and encoder into separate filesJames Almer2020-02-051-633/+6
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/aptx: Check the number of channelsMichael Niedermayer2019-11-011-0/+3
| | | | | | | | Fixes: store to null pointer of type 'uint32_t' (aka 'unsigned int') Fixes: 18021/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APTX_HD_fuzzer-5761738313564160 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/aptx: Fix multiple shift anomaliesMichael Niedermayer2019-09-301-8/+8
| | | | | | | | | Fixes: left shift of negative value -24576 Fixes: 17719/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APTX_fuzzer-5710508002377728 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* aptx: indentation (cosmetics only)Aurelien Jacobs2018-02-091-52/+52
|
* aptx: implement the aptX HD bluetooth codecAurelien Jacobs2018-02-091-27/+325
|
* aptx: do some clipping to match original codec in extreme casesAurelien Jacobs2018-02-091-1/+2
|
* aptx: factorize FFABS calculationAurelien Jacobs2018-02-091-3/+5
|
* aptx: simplify by pre-calculating factor_maxAurelien Jacobs2018-02-091-9/+7
|
* aptx: add codec cap SMALL_LAST_FRAME and INIT_THREADSAFE as appropriateAurelien Jacobs2017-12-181-0/+3
|
* aptx: implement the aptX bluetooth codecAurelien Jacobs2017-11-101-0/+860
The encoder was reverse engineered from binary library and from EP0398973B1 patent (long expired). The decoder was simply deduced from the encoder.