Commit Graph

71 Commits

Author SHA1 Message Date
Ronald S. Bultje ce863d7f36 Rename ff_log_missing_feature() to av_log_missing_feature().
Originally committed as revision 19294 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-06-29 19:07:04 +00:00
Stefano Sabatini 9106a698e7 Rename bitstream.h to get_bits.h.
Originally committed as revision 18494 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-13 16:20:26 +00:00
Thilo Borgmann 7a00bbad21 Implement avcodec_decode_video2(), _audio3() and _subtitle2() which takes an
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
2009-04-07 15:59:50 +00:00
Justin Ruggles d7520f217a cosmetics: add an @return to documentation for decode_frame_header()
Originally committed as revision 18179 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-24 22:44:12 +00:00
Justin Ruggles cd98a03024 flacdec: split frame header decoding and validation into a separate
function

Originally committed as revision 18175 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-24 01:17:55 +00:00
Justin Ruggles e8b0395236 flacdec: cosmetics: white space
Originally committed as revision 18167 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-22 23:22:44 +00:00
Justin Ruggles fbc4d9c964 flacdec: cosmetics: separate the pure frame header parsing code from
other frame header decoding code

Originally committed as revision 18166 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-22 23:19:49 +00:00
Justin Ruggles e7e6b06802 flacdec: allow sample rate to change mid-stream, but log a warning
message when it does

Originally committed as revision 18162 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-22 22:38:06 +00:00
Justin Ruggles 1448907465 flacdec: cosmetics: indentation
Originally committed as revision 18159 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-22 22:12:03 +00:00
Justin Ruggles e2a38af96e flacdec: change frame bps validation to return an error value if bps
changes since this is not currently supported by the decoder.

Originally committed as revision 18157 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-22 22:10:33 +00:00
Justin Ruggles f91eaf5deb flacdec: cosmetics: add some braces to if/else statements
Originally committed as revision 18156 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-22 21:53:28 +00:00
Justin Ruggles b6fa746e39 flacdec: skip frame when allocated data size is too small
Originally committed as revision 18155 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-22 21:31:23 +00:00
Justin Ruggles 492cc392fa 10l: don't check against current layout until after validating ch_mode.
should have been in last commit.

Originally committed as revision 18154 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-22 21:13:10 +00:00
Justin Ruggles 7660dc6f4f flacdec: give a more accurate error message when validating channel
layout. differentiates between invalid values and unsupported values.

Originally committed as revision 18153 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-22 21:07:43 +00:00
Justin Ruggles 02b26d2d5c flacdec: move data size check to flac_decode_frame()
Originally committed as revision 18151 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-22 20:19:20 +00:00
Justin Ruggles 4285c2923c flacdec: comments and white space.
move skipping of frame header to decode_frame()

Originally committed as revision 18150 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-22 19:12:02 +00:00
Justin Ruggles 5c3e0340d9 flacdec: remove unneeded local variable
Originally committed as revision 18148 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-22 18:59:00 +00:00
Justin Ruggles 3b4d96fa68 flacdec: cosmetics: rename 3 variables
Originally committed as revision 18147 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-22 18:56:07 +00:00
Justin Ruggles 7e00bd8456 flacdec: use a local variable for GetBitContext in decode_frame()
Originally committed as revision 18146 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-22 18:52:15 +00:00
Justin Ruggles 0fb2182d46 add a function to calculate a more accurate estimate for maximum FLAC
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
2009-03-21 01:54:31 +00:00
Justin Ruggles f5187c7f04 flacdec: account for frame and subframe header overhead when calculating
estimate for maximum frame size

Originally committed as revision 18091 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-21 01:27:28 +00:00
Justin Ruggles d4df4e5088 share sample rate and blocksize tables between the FLAC encoder and FLAC
decoder

Originally committed as revision 18089 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-21 01:16:38 +00:00
Justin Ruggles d9e7fa8074 flacdec: remove unneeded variable, 'assignment'
Originally committed as revision 18085 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-21 00:48:07 +00:00
Justin Ruggles 2a34672500 flacdec: cosmetics: rename 'decorrelation' to 'ch_mode'
Originally committed as revision 18084 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-21 00:47:04 +00:00
Justin Ruggles 3159780b18 share channel mode constants between the FLAC decoder and FLAC encoder
Originally committed as revision 18082 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-21 00:44:42 +00:00
Justin Ruggles 07d16e2ecf share some constants between the FLAC encoder and FLAC decoder
Originally committed as revision 18041 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-19 03:04:21 +00:00
Justin Ruggles 5b63d33d7d flacdec: Add a shared function for parsing a FLAC metadata block header.
Originally committed as revision 17851 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-06 01:25:11 +00:00
Justin Ruggles 8d1e885fc2 flacdec: cosmetics: Add a comment with the data of the smallest FLAC
frame for future reference.

Originally committed as revision 17822 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-05 04:40:42 +00:00
Justin Ruggles 629fb5c46a flacdec: There is an even smaller FLAC frame size possibility.
Originally committed as revision 17821 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-05 02:36:17 +00:00
Justin Ruggles 5756bc7b02 flacdec: 10l to me. I miscalculated the smallest FLAC frame. It is 16
bytes, not 24.

Originally committed as revision 17820 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-05 02:21:35 +00:00
Justin Ruggles bf1d7e285c flacdec: cosmetics: move 2 statements to immediately after frame
decoding.

Originally committed as revision 17819 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-05 01:23:53 +00:00
Justin Ruggles fd6fd470ce flacdec: Simplify frame sync by not using the bitstream reader.
Originally committed as revision 17818 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-05 01:15:38 +00:00
Justin Ruggles a8ec12bc2e flacdec: Split the metadata_parse() function into 2 separate functions,
parse_streaminfo() and get_metadata_size().

Originally committed as revision 17817 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-05 00:56:09 +00:00
Justin Ruggles 5ef4fa87b3 flacdec: Add a check for small buffer size. This ensures reading as
much of the frame header as possible without excluding the smallest
possible FLAC frame.  It also fixes a false positive warning message
that was being emitted at the end of decoding.

Originally committed as revision 17816 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-04 23:55:10 +00:00
Justin Ruggles c51997297a flacdec: cosmetics: Use a more descriptive variable name for the number
of bytes read, instead of reusing 'i'.

Originally committed as revision 17815 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-04 23:24:44 +00:00
Justin Ruggles 549bccdbe4 flacdec: Handle 32 bps data when checking allocated size.
Originally committed as revision 17814 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-04 23:16:30 +00:00
Justin Ruggles a3d2379bdd flacdec: Check curr_bps after wasted bits are subtracted.
Originally committed as revision 17813 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-04 23:10:40 +00:00
Justin Ruggles e1374c06d6 flacdec: When there is not enough data to read the next header block,
reset the bitstream reader instead of skipping backwards.

Originally committed as revision 17798 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-04 01:08:26 +00:00
Justin Ruggles 6a85fb34c9 cosmetics: indentation after last commit
Originally committed as revision 17796 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-04 00:53:04 +00:00
Justin Ruggles 55a727383b flacdec: Check for an inline header before calling metadata_parse().
Originally committed as revision 17795 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-04 00:52:18 +00:00
Justin Ruggles 239b961fbf flacdec: Allocate buffers right after STREAMINFO is parsed.
Originally committed as revision 17794 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-04 00:21:46 +00:00
Justin Ruggles 184bc53db4 cosmetics: indentation after last commit
Originally committed as revision 17791 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-03 23:50:21 +00:00
Justin Ruggles 7d0303587d flacdec: Avoid parsing the STREAMINFO multiple times.
Originally committed as revision 17790 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-03 23:49:36 +00:00
Justin Ruggles 2e78513cee flacdec: Warn about invalid max blocksize and limit the minimum value.
Originally committed as revision 17751 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-03 05:53:38 +00:00
Justin Ruggles 0c89ca72a5 cosmetics: remove a pointless comment
Originally committed as revision 17749 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-03 05:25:58 +00:00
Justin Ruggles 95db6659d8 flacdec: Remove unused variable, min_blocksize.
Originally committed as revision 17748 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-03 05:25:23 +00:00
Justin Ruggles dde318d5d9 flacdec: Return error when blocksize code of 0 is found. It is a
reserved value per the FLAC format documentation.

Originally committed as revision 17747 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-03 05:22:44 +00:00
Justin Ruggles 5b37e2fc9a flacdec: Avoid trying to read 33 bits. This occurs when the source
is 32 bits-per-sample and channel decorrelation is used.  Such files
are valid, but not supported currently.

Originally committed as revision 17743 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-03 04:45:45 +00:00
Justin Ruggles 505cc62f75 flacdec: ALT_BITSTREAM_READER is no longer required.
Originally committed as revision 17742 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-03 02:53:11 +00:00
Justin Ruggles 9de6e090a7 flacdec: use get_sbits_long() where needed.
Originally committed as revision 17741 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-03 02:19:01 +00:00