summaryrefslogtreecommitdiff
path: root/libavcodec/dcaenc.c
Commit message (Collapse)AuthorAge
* avcodec/dcaenc: Avoid copying packet data, allow user-supplied buffersAndreas Rheinhardt2021-05-05
| | | | | | | | When the packet size is known in advance like here, one can avoid an intermediate buffer for the packet data by using ff_get_encode_buffer() and also set AV_CODEC_CAP_DR1 at the same time. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/dcaenc: Don't write one bit at a timeAndreas Rheinhardt2021-05-05
| | | | 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/dcaenc: Fix undefined left shift of negative numbersAndreas Rheinhardt2021-04-01
| | | | | | Affected the acodec-dca and acodec-dca2 FATE tests. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* Avoid intermediate bitcount for number of bytes in PutBitContextAndreas Rheinhardt2021-03-30
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* lavu: move LOCAL_ALIGNED from internal.h to mem_internal.hAnton Khirnov2021-01-01
| | | | That is a more appropriate place for it.
* avcodec/dcaenc: Return specific error code from subband_bufer_alloc()Michael Niedermayer2019-01-01
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* dcaenc: fix segfault when attempting to encode with invalid samplerateRostislav Pehlivanov2018-05-05
| | | | Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* dcaenc: move all tables inside context and fix incorrect coding styleRostislav Pehlivanov2018-01-13
| | | | | | | Functionally identical to the old code, with less lines wasted. Partially fixes the complete disregard for the 80 col/line guide. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* avcodec/dcaenc: Use ffmpeg mdct instead of own implementationDaniil Cherednik2018-01-13
| | | | Signed-off-by: Daniil Cherednik <dan.cherednik@gmail.com>
* dcaenc: cleanup on init failure and add a threadsafe init codec capRostislav Pehlivanov2018-01-13
| | | | | | | | | The encoder didn't clean up if a malloc failed during init. It also doesn't need any external tables to be initialized on init. Finally, it didn't need to check for whether avctx->priv_data exists during uninit. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* Remove some unneeded casts of bit_rate.Carl Eugen Hoyos2017-09-22
|
* avcodec/dcaenc: Do not abort process in case of bitrate deficitDaniil Cherednik2017-05-16
| | | | | | | | | | | | Old behaviour - abort if at least one subband has 1bit quantizer and consumed_bits still greater than frame_bits size. It was a bit strange - we still could reduce bits consumption by reducing SNR for other subbands. Same strange logic with upper threshold - stop bits allocation if at least one subband reach 26bits. New behaviour - if consumed_bits greater than frame_bits and all subbands has 1 bit quantizer we restart bits allocation and allow zero subbands.
* avcodec/dcaenc: Initial implementation of ADPCM encoding for DCA encoderDaniil Cherednik2017-05-08
|
* dcaenc: Use Huffman codes for Bit Allocation IndexDaniil Cherednik2017-01-20
| | | | Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* dcaenc: Implementation of Huffman codes for DCA encoderDaniil Cherednik2017-01-15
| | | | Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* dcaenc: Reverse data layout to prevent data copies during Huffman encoding ↵Daniil Cherednik2017-01-15
| | | | | | introduction Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* avcodec/dcaenc: move channel reordering tables to dcaenc.hfoo862016-05-01
| | | | | | | DCA core decoder no longer uses fixed tables for channel reordering. Move them into private encoder header (and drop ff_dca_ prefix). Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/dcaenc: reuse shared quant levels tablefoo862016-05-01
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* all: move ff_exp10, ff_exp10f, ff_fast_powf to lavu/ffmath.hGanesh Ajjanagadde2016-03-22
| | | | | | | | | | | The idea is to use ffmath.h for internal implementations of math functions. Currently, it is used for variants of libm functions, but is by no means limited to such things. Note that this is not exported; use lavu/mathematics for such purposes. Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanag@gmail.com>
* avcodec/dcaenc: do not change user requested bitratePaul B Mahol2016-01-25
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec/dcaenc: return correct number of bytes in output packetPaul B Mahol2016-01-25
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* lavc/dcaenc: replace pow(10,x) by ff_exp10(x)Ganesh Ajjanagadde2015-12-25
| | | | Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* lavc/dcaenc: avoid wasteful cos callsGanesh Ajjanagadde2015-12-11
| | | | | | | cos has symmetry; use this. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avcodec/dcaenc: fix lfe fir coefficientsPaul B Mahol2015-09-17
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec/dcaenc: unbreak >4 channel supportPaul B Mahol2015-09-17
| | | | | | LFE channel is still broken, search for FIXME. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* lavc: Switch bitrate to 64bit unless compatibility with avconv was requested.Michael Niedermayer2015-09-15
|
* avcodec/dcaenc: clear bitstream endMichael Niedermayer2015-08-04
| | | | | | This avoids leaving uninitialized bits in the output Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'Michael Niedermayer2015-07-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'def97856de6021965db86c25a732d78689bd6bb0': lavc: AV-prefix all codec capabilities Conflicts: cmdutils.c ffmpeg.c ffplay.c libavcodec/8svx.c libavcodec/aacenc.c libavcodec/ac3dec.c libavcodec/adpcm.c libavcodec/alac.c libavcodec/atrac3plusdec.c libavcodec/bink.c libavcodec/dnxhddec.c libavcodec/dvdec.c libavcodec/dvenc.c libavcodec/ffv1dec.c libavcodec/ffv1enc.c libavcodec/fic.c libavcodec/flacdec.c libavcodec/flacenc.c libavcodec/flvdec.c libavcodec/fraps.c libavcodec/frwu.c libavcodec/gifdec.c libavcodec/h261dec.c libavcodec/hevc.c libavcodec/iff.c libavcodec/imc.c libavcodec/libopenjpegdec.c libavcodec/libvo-aacenc.c libavcodec/libvorbisenc.c libavcodec/libvpxdec.c libavcodec/libvpxenc.c libavcodec/libx264.c libavcodec/mjpegbdec.c libavcodec/mjpegdec.c libavcodec/mpegaudiodec_float.c libavcodec/msmpeg4dec.c libavcodec/mxpegdec.c libavcodec/nvenc_h264.c libavcodec/nvenc_hevc.c libavcodec/pngdec.c libavcodec/qpeg.c libavcodec/ra288.c libavcodec/rv10.c libavcodec/s302m.c libavcodec/sp5xdec.c libavcodec/takdec.c libavcodec/tiff.c libavcodec/tta.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/vp6.c libavcodec/vp9.c libavcodec/wavpack.c libavcodec/yop.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: Add a min size parameter to ff_alloc_packet2()Michael Niedermayer2015-07-27
| | | | | | | | This parameter can be used to inform the allocation code about how much downsizing might occur, and can be used to optimize how to allocate the packet Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* dcaenc: use put_sbits()James Almer2015-04-18
| | | | | Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: James Almer <jamrial@gmail.com>
* Merge commit '3a651f599a18b023602370b67a77eb0efa309b20'Michael Niedermayer2015-02-16
| | | | | | | | | | | | * commit '3a651f599a18b023602370b67a77eb0efa309b20': dca: Move data tables from a header to an object file Conflicts: libavcodec/Makefile libavcodec/dcadata.h libavcodec/dcadec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* avcodec/dcaenc: rename DCA_SUBBANDSMichael Niedermayer2015-02-14
| | | | | | Fixes "warning: DCA_SUBBANDS redefined" Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit 'b339019de4e5f4d3c661bbdba98ae248ab77e2f0'Michael Niedermayer2015-02-14
| | | | | | | | | | | * commit 'b339019de4e5f4d3c661bbdba98ae248ab77e2f0': dca: Split code for handling the EXSS extension off into a separate file Conflicts: libavcodec/Makefile libavcodec/dcadec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* fix various typosLou Logan2014-06-03
| | | | | Signed-off-by: Lou Logan <lou@lrcd.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2014-03-04
| | | | | | | | | | * qatar/master: put_bits: Remove unused includes Conflicts: libavcodec/put_bits.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
* cosmetics: group remaining .name and .long_name.Clément Bœsch2013-10-04
| | | | See b2bed9325.
* dcaenc: silence address sanitizer warningPaul B Mahol2013-04-26
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* dcaenc: updatePaul B Mahol2013-04-25
| | | | | | | | Long story short: previous code was useless and was port of older dcaenc, this commit just "sync" with current dcaenc, hopefuly making this encoder more useful. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* normalize calls to ff_alloc_packet2James Zern2013-03-06
| | | | | | | - check ret < 0 - remove excessive error log Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* dcaenc: remove unused headerPaul B Mahol2013-01-23
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* Replace rest of libavutil/audioconvert.h with libavutil/channel_layout.hPaul B Mahol2012-11-13
| | | | | | Also remove it in once case when it is not needed. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'Michael Niedermayer2012-08-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '36ef5369ee9b336febc2c270f8718cec4476cb85': Replace all CODEC_ID_* with AV_CODEC_ID_* lavc: add AV prefix to codec ids. Conflicts: doc/APIchanges doc/examples/decoding_encoding.c doc/examples/muxing.c ffmpeg.c ffprobe.c ffserver.c libavcodec/8svx.c libavcodec/avcodec.h libavcodec/dnxhd_parser.c libavcodec/dvdsubdec.c libavcodec/error_resilience.c libavcodec/h263dec.c libavcodec/libvorbisenc.c libavcodec/mjpeg_parser.c libavcodec/mjpegenc.c libavcodec/mpeg12.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/pcm.c libavcodec/r210dec.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/version.h libavdevice/alsa-audio-dec.c libavdevice/bktr.c libavdevice/v4l2.c libavformat/asfdec.c libavformat/asfenc.c libavformat/avformat.h libavformat/avidec.c libavformat/caf.c libavformat/electronicarts.c libavformat/flacdec.c libavformat/flvdec.c libavformat/flvenc.c libavformat/framecrcenc.c libavformat/img2.c libavformat/img2dec.c libavformat/img2enc.c libavformat/ipmovie.c libavformat/isom.c libavformat/matroska.c libavformat/matroskadec.c libavformat/matroskaenc.c libavformat/mov.c libavformat/movenc.c libavformat/mp3dec.c libavformat/mpeg.c libavformat/mpegts.c libavformat/mxf.c libavformat/mxfdec.c libavformat/mxfenc.c libavformat/nsvdec.c libavformat/nut.c libavformat/oggenc.c libavformat/pmpdec.c libavformat/rawdec.c libavformat/rawenc.c libavformat/riff.c libavformat/sdp.c libavformat/utils.c libavformat/vocenc.c libavformat/wtv.c libavformat/xmv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-08-01
| | | | | | | | | | | | | | | | | | | | | | | * qatar/master: dca: Switch dca_sample_rates to avpriv_ prefix; it is used across libs ARM: use =const syntax instead of explicit literal pools ARM: use standard syntax for all LDRD/STRD instructions fft: port FFT/IMDCT 3dnow functions to yasm, and disable on x86-64. dct-test: allow to compile without HAVE_INLINE_ASM. x86/dsputilenc: bury inline asm under HAVE_INLINE_ASM. dca: Move tables used outside of dcadec.c to a separate file. dca: Rename dca.c ---> dcadec.c x86: h264dsp: Remove unused variable ff_pb_3_1 apetag: change a forgotten return to return 0 Conflicts: libavcodec/Makefile libavcodec/dca.c libavcodec/x86/fft_3dn.c libavcodec/x86/fft_3dn2.c libavcodec/x86/fft_mmx.asm Merged-by: Michael Niedermayer <michaelni@gmx.at>
* cosmetics: align more codecs declarationsPaul B Mahol2012-06-12
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* dcaenc: fix out of array readMichael Niedermayer2012-05-11
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* dcaenc: Allow encoding without specifying a channel_layout.Reimar Döffinger2012-04-07
| | | | | | | It will print a warning, making the behaviour consistent with the AC3 encoder. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* dcaenc: switch to encode2()Paul B Mahol2012-03-22
| | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* add missing long_name for amv and dca encoderPaul B Mahol2011-12-10
| | | | | Reviewed-by: Carl Eugen Hoyos Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* dcaenc: small quantization simplification.Clément Bœsch2011-06-18
|