Commit ac2570a8 authored by Michael Niedermayer's avatar Michael Niedermayer

flac fixes:

fix data types of residual&decoded
fix twos complement bitfields
fix utf8 (no, utf8 is not the same as the simple and compact uvlc used in nut)
add truncated bitstream support, both ogg and flac demuxers in mplayer cvs provide incomplete frames, and furthermore it isnt possible to find frameboundaries in flac without decoding it completly
add escape-less golomb rice decoder (=flac style golomb rice) (ultra efficient, the longest vlc code is just 2^32-1 bits)
printf->av_log
fix bps for non independant channels
fix a few +-1 bugs
fix sample order for independant channels
fix data_size

Originally committed as revision 2791 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 4f52c312
......@@ -19,7 +19,8 @@ OBJS= common.o utils.o mem.o allcodecs.o \
vp3.o asv1.o 4xm.o cabac.o ffv1.o ra144.o ra288.o vcr1.o cljr.o \
roqvideo.o dpcm.o interplayvideo.o xan.o rpza.o cinepak.o msrle.o \
msvideo1.o vqavideo.o idcinvideo.o adx.o rational.o faandct.o 8bps.o \
smc.o parser.o flicvideo.o truemotion1.o vmdav.o lcl.o qtrle.o g726.o
smc.o parser.o flicvideo.o truemotion1.o vmdav.o lcl.o qtrle.o g726.o \
flac.o
ifeq ($(AMR_NB),yes)
ifeq ($(AMR_NB_FIXED),yes)
......
......@@ -154,6 +154,7 @@ void avcodec_register_all(void)
register_avcodec(&interplay_dpcm_decoder);
register_avcodec(&xan_dpcm_decoder);
register_avcodec(&qtrle_decoder);
register_avcodec(&flac_decoder);
#endif /* CONFIG_DECODERS */
#ifdef AMR_NB
......
......@@ -17,7 +17,7 @@ extern "C" {
#define FFMPEG_VERSION_INT 0x000408
#define FFMPEG_VERSION "0.4.8"
#define LIBAVCODEC_BUILD 4702
#define LIBAVCODEC_BUILD 4703
#define LIBAVCODEC_VERSION_INT FFMPEG_VERSION_INT
#define LIBAVCODEC_VERSION FFMPEG_VERSION
......@@ -132,6 +132,8 @@ enum CodecID {
CODEC_ID_INTERPLAY_DPCM,
CODEC_ID_XAN_DPCM,
CODEC_ID_FLAC,
CODEC_ID_MPEG2TS, /* _FAKE_ codec to indicate a raw MPEG2 transport
stream (only used by libavformat) */
};
......@@ -623,11 +625,6 @@ typedef struct AVCodecContext {
*/
int width, height;
#define FF_ASPECT_SQUARE 1
#define FF_ASPECT_4_3_625 2
#define FF_ASPECT_4_3_525 3
#define FF_ASPECT_16_9_625 4
#define FF_ASPECT_16_9_525 5
#define FF_ASPECT_EXTENDED 15
/**
......@@ -1729,6 +1726,7 @@ extern AVCodec roq_dpcm_decoder;
extern AVCodec interplay_dpcm_decoder;
extern AVCodec xan_dpcm_decoder;
extern AVCodec qtrle_decoder;
extern AVCodec flac_decoder;
/* pcm codecs */
#define PCM_CODEC(id, name) \
......
This diff is collapsed.
......@@ -256,6 +256,14 @@ static inline int get_ur_golomb_jpegls(GetBitContext *gb, int k, int limit, int
}
}
/**
* read unsigned golomb rice code (flac).
*/
static inline int get_sr_golomb_flac(GetBitContext *gb, int k, int limit, int esc_len){
int v= get_ur_golomb_jpegls(gb, k, limit, esc_len);
return (v>>1) ^ -(v&1);
}
#ifdef TRACE
static inline int get_ue(GetBitContext *s, char *file, char *func, int line){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment