summaryrefslogtreecommitdiff
path: root/libavcodec/flacdec.c
Commit message (Collapse)AuthorAge
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-30
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (51 commits) cin audio: use sign_extend() instead of casting to int16_t cin audio: restructure decoding loop to avoid a separate counter variable cin audio: use local variable for delta value cin audio: remove unneeded cast from void* cin audio: validate the channel count cin audio: remove unneeded AVCodecContext pointer from CinAudioContext dsicin: fix several audio-related fields in the CIN demuxer flacdec: use av_get_bytes_per_sample() to get sample size dca: handle errors from dca_decode_block() dca: return error if the frame header is invalid dca: return proper error codes instead of -1 utvideo: handle empty Huffman trees binkaudio: change short to int16_t binkaudio: only decode one block at a time. binkaudio: store interleaved overlap samples in BinkAudioContext. binkaudio: pre-calculate quantization factors binkaudio: add some buffer overread checks. atrac3: support float or int16 output using request_sample_fmt atrac3: add CODEC_CAP_SUBFRAMES capability atrac3: return appropriate error codes instead of -1 ... Conflicts: libavcodec/atrac1.c libavcodec/dca.c libavformat/mov.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * flacdec: use av_get_bytes_per_sample() to get sample sizeJustin Ruggles2011-10-29
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-21
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (47 commits) lavc: hide private symbols. lavc: deprecate img_get_alpha_info(). lavc: use avpriv_ prefix for ff_toupper4. lavc: use avpriv_ prefix for ff_copy_bits and align_put_bits. lavc: use avpriv_ prefix for ff_ac3_parse_header. lavc: use avpriv_ prefix for ff_frame_rate_tab. lavc: rename ff_find_start_code to avpriv_mpv_find_start_code lavc: use avpriv_ prefix for ff_split_xiph_headers. lavc: use avpriv_ prefix for ff_dirac_parse_sequence_header. lavc: use avpriv_ prefix for some dv symbols used in lavf. lavc: use avpriv_ prefix for some flac symbols used in lavf. lavc: use avpriv_ prefix for some mpeg4audio symbols used in lavf. lavc: use avpriv_ prefix for some mpegaudio symbols used in lavf. lavc: use avpriv_ prefix for ff_aac_parse_header(). lavf: hide private symbols. lavf: use avpriv_ prefix for some dv functions. lavf: use avpriv_ prefix for ff_new_chapter(). avcodec: add CODEC_CAP_DELAY note to avcodec_decode_audio3() documentation avcodec: clarify the CODEC_CAP_DELAY note in avcodec_decode_video2() avcodec: clarify documentation of CODEC_CAP_DELAY ... Conflicts: configure doc/general.texi libavcodec/Makefile libavcodec/aacdec.c libavcodec/allcodecs.c libavcodec/avcodec.h libavcodec/dv.c libavcodec/dvdata.c libavcodec/dvdata.h libavcodec/libspeexenc.c libavcodec/mpegvideo.c libavcodec/version.h libavformat/avidec.c libavformat/dv.c libavformat/dv.h libavformat/flvenc.c libavformat/mov.c libavformat/mp3enc.c libavformat/oggparsespeex.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: use avpriv_ prefix for some flac symbols used in lavf.Anton Khirnov2011-10-20
| | | | | | | | | | Specifically, ff_flac_parse_streaminfo, ff_flac_is_extradata_valid and ff_flac_parse_block_header
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-09-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (21 commits) fate: allow testing with libavfilter disabled x86: XOP/FMA4 CPU detection support ws_snd: misc cosmetic clean-ups ws_snd: remove the 2-bit ADPCM table and just subtract 2 instead. ws_snd: use memcpy() and memset() instead of loops ws_snd: use samples pointer for loop termination instead of a separate iterator variable. ws_snd: make sure number of channels is 1 ws_snd: add some checks to prevent buffer overread or overwrite. ws_snd: decode to AV_SAMPLE_FMT_U8 instead of S16. flacdec: fix buffer size checking in get_metadata_size() rtp: Simplify ff_rtp_get_payload_type rtpenc: Add a payload type private option rtp: Correct ff_rtp_get_payload_type documentation avconv: replace all fprintf() by av_log(). avconv: change av_log verbosity from ERROR to FATAL for fatal errors. cmdutils: replace fprintf() by av_log() avtools: parse loglevel before all the other options. oggdec: add support for Xiph's CELT codec sol: return error if av_get_packet() fails. cosmetics: reindent and pretty-print ... Conflicts: avconv.c cmdutils.c libavcodec/avcodec.h libavcodec/version.h libavformat/oggparsecelt.c libavformat/utils.c libavutil/avutil.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * flacdec: fix buffer size checking in get_metadata_size()Justin Ruggles2011-09-26
| | | | | | | | | | | | Adds an additional check before reading the next block header and avoids a potential integer overflow when checking the metadata size against the remaining buffer size.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-07-30
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: mxfdec: Include FF_INPUT_BUFFER_PADDING_SIZE when allocating extradata. H.264: tweak some other x86 asm for Atom probe: Fix insane flow control. mpegts: remove invalid error check s302m: use nondeprecated audio sample format API lavc: use designated initialisers for all codecs. x86: cabac: add operand size suffixes missing from 6c32576 Conflicts: libavcodec/ac3enc_float.c libavcodec/flacenc.c libavcodec/frwu.c libavcodec/pictordec.c libavcodec/qtrleenc.c libavcodec/v210enc.c libavcodec/wmv2dec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: use designated initialisers for all codecs.Anton Khirnov2011-07-29
| | | | | | | | It's more readable and less prone to breakage.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-07-15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: configure: Automatically add more flags required on symbian mem.h: switch doxygen parameter order to match function prototype doxygen: replace @sa tag by the more readable but equivalent @see doxygen: use Doxygen markup for authors and web links where appropriate doxygen: do not include license boilerplate in Doxygen documentation ac3enc: Mark AVClasses const ffserver: Replace two loops with one loop. ffmpeg: Fix the check for experimental codecs swscale: extend mmx padding. swscale: clip unscaled colorspace conversion path. doxygen: misc consistency cosmetics doc: remove file name from @file directive in Doxygen usage example doxygen: consistently place brief description doxygen: place empty line between brief description and detailed description avformat_open_input(): Add braces to shut up gcc warning. Conflicts: libavcodec/8svx.c libavcodec/tiff.c libavcodec/tiff.h libavcodec/vaapi_h264.c libavcodec/vorbis.c libavcodec/vorbisdec.c libavcodec/vp6.c libswscale/swscale_unscaled.c libswscale/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * doxygen: use Doxygen markup for authors and web links where appropriateDiego Biurrun2011-07-15
| |
| * Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
| * Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.Diego Elio Pettenò2011-01-26
| | | | | | | | | | | | | | None of these symbols should be accessed directly, so declare them as hidden. Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.Diego Elio Pettenò2011-01-28
|/ | | | | | | | None of these symbols should be accessed directly, so declare them as hidden. Signed-off-by: Mans Rullgard <mans@mansr.com> (cherry picked from commit d36beb3f6902b1217beda576aa18abf7eb72b03c)
* Define FLAC_MIN_FRAME_SIZE and use it in the FLAC decoder.Michael Chinen2010-12-07
| | | | | | Patch by Michael Chinen [mchinen at gmail] Originally committed as revision 25916 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Simplify the FLAC decoder now that it no longer has to parse arbitrary raw FLACMichael Chinen2010-12-07
| | | | | | | data thanks to the recently added FLAC parser. Patch by Michael Chinen [mchinen at gmail] Originally committed as revision 25915 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add log_level_offset parameter to ff_flac_decode_frame_header(). It will be usedMichael Chinen2010-12-07
| | | | | | | to optionally silence the error messages. Patch by Michael Chinen [mchinen at gmail] Originally committed as revision 25912 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Move decode_frame_header() from flacdec.c to flac.c/h to share with theMichael Chinen2010-12-07
| | | | | | | forthcoming FLAC parser. Patch by Michael Chinen [mchinen at gmail] Originally committed as revision 25909 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Replace deprecated symbols SAMPLE_FMT_* with AV_SAMPLE_FMT_*, and enumStefano Sabatini2010-11-12
| | | | | | SampleFormat with AVSampleFormat. Originally committed as revision 25730 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Support decoding of FLAC files without a STREAMINFO header.Justin Ruggles2010-10-02
| | | | Originally committed as revision 25315 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove explicit filename from Doxygen @file commands.Diego Biurrun2010-04-20
| | | | | | | | Passing an explicit filename to this command is only necessary if the documentation in the @file block refers to a file different from the one the block resides in. Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Define AVMediaType enum, and use it instead of enum CodecType, whichStefano Sabatini2010-03-30
| | | | | | is deprecated and will be dropped at the next major bump. Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Set sample format in flac_decode_init() rather than inJustin Ruggles2009-11-01
| | | | | | | ff_flac_parse_streaminfo() since the latter is shared with the raw FLAC demuxer, which should not be setting the sample format. Originally committed as revision 20430 to svn://svn.ffmpeg.org/ffmpeg/trunk
* add CODEC_CAP_SUBFRAMES to the FLAC decoder capabilities. also add a FIXMEJustin Ruggles2009-09-16
| | | | | | | comment as a reminder that we can remove both capabilities once a parser is implemented. Originally committed as revision 19891 to svn://svn.ffmpeg.org/ffmpeg/trunk
* flacdec: change variable-length array to fixed lengthMåns Rullgård2009-08-19
| | | | | | | pred_order can never exceed 32, so always allocating that amount is safe and not very wasteful. Originally committed as revision 19669 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Rename ff_log_missing_feature() to av_log_missing_feature().Ronald S. Bultje2009-06-29
| | | | Originally committed as revision 19294 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Rename bitstream.h to get_bits.h.Stefano Sabatini2009-04-13
| | | | Originally committed as revision 18494 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Implement avcodec_decode_video2(), _audio3() and _subtitle2() which takes anThilo Borgmann2009-04-07
| | | | | | | | | | | AVPacket argument rather than a const uint8_t *buf + int buf_size. This allows passing of packet-specific flags from demuxer to decoder, such as the keyframe flag, which appears necessary to playback corePNG P-frames. Patch by Thilo Borgmann thilo.borgmann googlemail com, see also the thread "Google Summer of Code participation" on the mailinglist. Originally committed as revision 18351 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics: add an @return to documentation for decode_frame_header()Justin Ruggles2009-03-24
| | | | Originally committed as revision 18179 to svn://svn.ffmpeg.org/ffmpeg/trunk
* flacdec: split frame header decoding and validation into a separateJustin Ruggles2009-03-24
| | | | | | function Originally committed as revision 18175 to svn://svn.ffmpeg.org/ffmpeg/trunk
* flacdec: cosmetics: white spaceJustin Ruggles2009-03-22
| | | | Originally committed as revision 18167 to svn://svn.ffmpeg.org/ffmpeg/trunk
* flacdec: cosmetics: separate the pure frame header parsing code fromJustin Ruggles2009-03-22
| | | | | | other frame header decoding code Originally committed as revision 18166 to svn://svn.ffmpeg.org/ffmpeg/trunk
* flacdec: allow sample rate to change mid-stream, but log a warningJustin Ruggles2009-03-22
| | | | | | message when it does Originally committed as revision 18162 to svn://svn.ffmpeg.org/ffmpeg/trunk
* flacdec: cosmetics: indentationJustin Ruggles2009-03-22
| | | | Originally committed as revision 18159 to svn://svn.ffmpeg.org/ffmpeg/trunk
* flacdec: change frame bps validation to return an error value if bpsJustin Ruggles2009-03-22
| | | | | | changes since this is not currently supported by the decoder. Originally committed as revision 18157 to svn://svn.ffmpeg.org/ffmpeg/trunk
* flacdec: cosmetics: add some braces to if/else statementsJustin Ruggles2009-03-22
| | | | Originally committed as revision 18156 to svn://svn.ffmpeg.org/ffmpeg/trunk
* flacdec: skip frame when allocated data size is too smallJustin Ruggles2009-03-22
| | | | Originally committed as revision 18155 to svn://svn.ffmpeg.org/ffmpeg/trunk
* 10l: don't check against current layout until after validating ch_mode.Justin Ruggles2009-03-22
| | | | | | should have been in last commit. Originally committed as revision 18154 to svn://svn.ffmpeg.org/ffmpeg/trunk
* flacdec: give a more accurate error message when validating channelJustin Ruggles2009-03-22
| | | | | | layout. differentiates between invalid values and unsupported values. Originally committed as revision 18153 to svn://svn.ffmpeg.org/ffmpeg/trunk
* flacdec: move data size check to flac_decode_frame()Justin Ruggles2009-03-22
| | | | Originally committed as revision 18151 to svn://svn.ffmpeg.org/ffmpeg/trunk
* flacdec: comments and white space.Justin Ruggles2009-03-22
| | | | | | move skipping of frame header to decode_frame() Originally committed as revision 18150 to svn://svn.ffmpeg.org/ffmpeg/trunk
* flacdec: remove unneeded local variableJustin Ruggles2009-03-22
| | | | Originally committed as revision 18148 to svn://svn.ffmpeg.org/ffmpeg/trunk
* flacdec: cosmetics: rename 3 variablesJustin Ruggles2009-03-22
| | | | Originally committed as revision 18147 to svn://svn.ffmpeg.org/ffmpeg/trunk
* flacdec: use a local variable for GetBitContext in decode_frame()Justin Ruggles2009-03-22
| | | | Originally committed as revision 18146 to svn://svn.ffmpeg.org/ffmpeg/trunk
* add a function to calculate a more accurate estimate for maximum FLACJustin Ruggles2009-03-21
| | | | | | frame size and use the function in the FLAC decoder and FLAC encoder Originally committed as revision 18092 to svn://svn.ffmpeg.org/ffmpeg/trunk
* flacdec: account for frame and subframe header overhead when calculatingJustin Ruggles2009-03-21
| | | | | | estimate for maximum frame size Originally committed as revision 18091 to svn://svn.ffmpeg.org/ffmpeg/trunk
* share sample rate and blocksize tables between the FLAC encoder and FLACJustin Ruggles2009-03-21
| | | | | | decoder Originally committed as revision 18089 to svn://svn.ffmpeg.org/ffmpeg/trunk
* flacdec: remove unneeded variable, 'assignment'Justin Ruggles2009-03-21
| | | | Originally committed as revision 18085 to svn://svn.ffmpeg.org/ffmpeg/trunk
* flacdec: cosmetics: rename 'decorrelation' to 'ch_mode'Justin Ruggles2009-03-21
| | | | Originally committed as revision 18084 to svn://svn.ffmpeg.org/ffmpeg/trunk
* share channel mode constants between the FLAC decoder and FLAC encoderJustin Ruggles2009-03-21
| | | | Originally committed as revision 18082 to svn://svn.ffmpeg.org/ffmpeg/trunk
* share some constants between the FLAC encoder and FLAC decoderJustin Ruggles2009-03-19
| | | | Originally committed as revision 18041 to svn://svn.ffmpeg.org/ffmpeg/trunk