summaryrefslogtreecommitdiffstats
path: root/libavcodec/wavpackenc.c
Commit message (Collapse)AuthorAgeFilesLines
* avcodec/wavpackenc: use put_sbitsJames Almer2016-01-201-2/+1
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/wavpackenc: print channel count in av_log callJames Almer2016-01-131-1/+1
| | | | Fixes a warning with -Wformat-extra-args
* avcodec/wavpackenc: Check the number of channelsMichael Niedermayer2016-01-111-0/+5
| | | | | | They are stored in a byte, thus more than 255 is not possible Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/wavpackenc: Headers are per channelMichael Niedermayer2016-01-111-1/+1
| | | | | | | | Fixes: 1b8b83a53bfa751f01b1daa65a4758db/signal_sigabrt_7ffff6ae7cb7_7488_403f71d1a2565b598d01b6cb110fac8f.aiff Fixes: assertion failure Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/wavpackenc: use AV_OPT_TYPE_BOOL for all optionsPaul B Mahol2015-09-091-10/+5
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'Michael Niedermayer2015-07-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-271-1/+1
| | | | | | | | 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>
* wavpackenc: use put_sbits()James Almer2015-04-181-7/+3
| | | | | Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/wavpackenc: remove unneeded L suffixesMichael Niedermayer2015-02-021-4/+4
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* wavpackenc: reset trailer info on block encodingChristophe Gisquet2014-08-221-0/+3
| | | | | | | | | | | In some cases, in particular if several blocks are needed because of the channel layout (e.g. 2.1), the information used to write the trailing bits terminating the sample data was not reset. This would cause potential desync on the decoder, although decoded samples were actually mostly fine. Fixes ticket #3879.
* wavpackenc: make assert more thoroughChristophe Gisquet2014-08-221-1/+1
| | | | | | | It was only validating that normal data wasn't filling the buffer. However, extra data may be written afterwards. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* wavpackenc: fix number of samples per blockChristophe Gisquet2014-08-221-1/+1
| | | | | | | | | | Currently, the encoder will try to reduce it down to 150000, but the decoder will complain starting at 131072 (WV_MAX_SAMPLES). Therefore, change the loop limit. Fixes ticket #3881. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* wavpackenc: assert on too small bufferChristophe Gisquet2014-08-211-0/+2
| | | | | | | | bytestream2_* will not cause buffer overflow, but in that case, this means the allocation would be incorrect and the encoded result invalid. Therefore, assert no overflow occurred. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* wavpackenc: proper buffer allocationChristophe Gisquet2014-08-191-2/+3
| | | | | | | | | | | The allocation didn't account for headers, that can be easily 79 bytes. As a result, buffers allocated for a few samples (e.g. 5 in the original bug) could be undersized. Fixed ticket #2881. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avcodec/wavpackenc: Fix log2sample() result valueMichael Niedermayer2014-08-021-2/+2
| | | | | | Found-by: CSA Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avcodec/wavpackenc: fix () in macrosMichael Niedermayer2014-06-201-7/+7
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avcodec/wavpackenc: fix uninitialized retMichael Niedermayer2013-10-201-1/+1
| | | | | | Fixes CID1108609 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* wavpackenc: do not copy samples if they are not availablePaul B Mahol2013-08-171-2/+4
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* wavpackenc: simplify "sign = ((sample) < 0) ? 1 : 0;"Michael Niedermayer2013-08-141-1/+1
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* WavPack encoderPaul B Mahol2013-08-141-0/+2987
Signed-off-by: Paul B Mahol <onemda@gmail.com>
OpenPOWER on IntegriCloud