FFmpeg
|
wavpack.c
Go to the documentation of this file.
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
Definition: mem.c:205
static void wavpack_decode_flush(AVCodecContext *avctx)
Definition: wavpack.c:1171
Definition: wavpack.c:94
struct WavpackFrameContext WavpackFrameContext
Definition: wavpack.c:60
Definition: wavpack.c:63
Definition: wavpack.c:66
Definition: wavpack.c:73
Definition: wavpack.c:70
Definition: wavpack.c:53
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
Definition: libavcodec/avcodec.h:2553
Definition: libavcodec/avcodec.h:406
void av_freep(void *arg)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
Definition: mem.c:198
static int wv_get_value_integer(WavpackFrameContext *s, uint32_t *crc, int S)
Definition: wavpack.c:407
Definition: wavpack.c:65
static int get_unary_0_33(GetBitContext *gb)
Get unary code terminated by a 0 with a maximum length of 33.
Definition: unary.h:46
Definition: wavpack.c:72
Definition: wavpack.c:130
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
Definition: libavcodec/avcodec.h:1242
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: libavcodec/avcodec.h:743
F H1 F F H1 F F F F H1<-F-------F-------F v v v H2 H3 H2^^^F-------F-------F-> H1<-F-------F-------F|||||||||F H1 F|||||||||F H1 Funavailable fullpel samples(outside the picture for example) shall be equalto the closest available fullpel sampleSmaller pel interpolation:--------------------------if diag_mc is set then points which lie on a line between 2 vertically, horiziontally or diagonally adjacent halfpel points shall be interpolatedlinearls with rounding to nearest and halfway values rounded up.points which lie on 2 diagonals at the same time should only use the onediagonal not containing the fullpel point F--> O q O<--h1-> O q O<--F v\/v\/v O O O O O O O|/|\|q q q q q|/|\|O O O O O O O^/\^/\^h2--> O q O<--h3-> O q O<--h2 v\/v\/v O O O O O O O|\|/|q q q q q|\|/|O O O O O O O^/\^/\^F--> O q O<--h1-> O q O<--Fthe remaining points shall be bilinearly interpolated from theup to 4 surrounding halfpel and fullpel points, again rounding should be tonearest and halfway values rounded upcompliant Snow decoders MUST support 1-1/8 pel luma and 1/2-1/16 pel chromainterpolation at leastOverlapped block motion compensation:-------------------------------------FIXMELL band prediction:===================Each sample in the LL0 subband is predicted by the median of the left, top andleft+top-topleft samples, samples outside the subband shall be considered tobe 0.To reverse this prediction in the decoder apply the following.for(y=0;y< height;y++){for(x=0;x< width;x++){sample[y][x]+=median(sample[y-1][x], sample[y][x-1], sample[y-1][x]+sample[y][x-1]-sample[y-1][x-1]);}}sample[-1][*]=sample[*][-1]=0;width, height here are the width and height of the LL0 subband not of the finalvideoDequantizaton:==============FIXMEWavelet Transform:==================Snow supports 2 wavelet transforms, the symmetric biorthogonal 5/3 integertransform and a integer approximation of the symmetric biorthogonal 9/7daubechies wavelet.2D IDWT(inverse discrete wavelet transform)--------------------------------------------The 2D IDWT applies a 2D filter recursively, each time combining the4 lowest frequency subbands into a single subband until only 1 subbandremains.The 2D filter is done by first applying a 1D filter in the vertical directionand then applying it in the horizontal one.------------------------------------------------------------|LL0|HL0|||||||||||||---+---|HL1||L0|H0|HL1||LL1|HL1|||||LH0|HH0|||||||||||||-------+-------|-> L1 H1 LH1 HH1 LH1 HH1 LH1 HH1 L2
Definition: snow.txt:546
Definition: wavpack.c:62
bitstream reader API header.
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
Definition: libavcodec/avcodec.h:2546
struct Decorr Decorr
struct WvChannel WvChannel
struct WavpackContext WavpackContext
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: libavutil/internal.h:123
Definition: wavpack.c:54
Definition: avutil.h:144
external API header
#define FF_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
Definition: libavcodec/avcodec.h:561
static int wavpack_decode_block(AVCodecContext *avctx, int block_no, void *data, int *got_frame_ptr, const uint8_t *buf, int buf_size)
Definition: wavpack.c:762
audio channel layout utility functions
int err_recognition
Error recognition; may misdetect some more or less valid parts as errors.
Definition: libavcodec/avcodec.h:2459
static void wv_reset_saved_context(WavpackFrameContext *s)
Definition: wavpack.c:503
static int wv_unpack_mono(WavpackFrameContext *s, GetBitContext *gb, void *dst, const int type)
Definition: wavpack.c:641
struct SavedContext SavedContext
int av_get_bytes_per_sample(enum AVSampleFormat sample_fmt)
Return number of bytes per sample.
Definition: samplefmt.c:104
static av_cold int wavpack_decode_end(AVCodecContext *avctx)
Definition: wavpack.c:750
1i.*Xphase exp()
or(d) export
Definition: wavpack.c:76
Definition: wavpack.c:100
static float wv_get_value_float(WavpackFrameContext *s, uint32_t *crc, int S)
Definition: wavpack.c:430
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
Definition: libavcodec/utils.c:823
Definition: wavpack.c:56
Definition: wavpack.c:67
Definition: wavpack.c:55
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
Definition: get_bits.h:379
Definition: wavpack.c:68
static int wavpack_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
Definition: wavpack.c:1180
Definition: wavpack.c:71
static int wv_check_crc(WavpackFrameContext *s, uint32_t crc, uint32_t crc_extra_bits)
Definition: wavpack.c:509
static unsigned int get_bits_long(GetBitContext *s, int n)
Read 0-32 bits.
Definition: get_bits.h:306
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFilterBuffer structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later.That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another.Buffer references ownership and permissions
#define type
static int wv_get_value(WavpackFrameContext *ctx, GetBitContext *gb, int channel, int *last)
Definition: wavpack.c:283
#define CODEC_CAP_SUBFRAMES
Codec can output multiple frames per AVPacket Normally demuxers return one frame at a time...
Definition: libavcodec/avcodec.h:791
static int wv_unpack_stereo(WavpackFrameContext *s, GetBitContext *gb, void *dst, const int type)
Definition: wavpack.c:524
Definition: get_bits.h:54
common internal api header.
Definition: wavpack.c:61
Definition: wavpack.c:85
Filter the word “frame” indicates either a video frame or a group of audio samples
Definition: filter_design.txt:2
Definition: wavpack.c:64
static int decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: crystalhd.c:868
static av_cold int wv_alloc_frame_context(WavpackContext *c)
Definition: wavpack.c:706
static av_cold int wavpack_decode_init(AVCodecContext *avctx)
Definition: wavpack.c:722
Definition: wavpack.c:69
Generated on Mon Nov 18 2024 06:52:03 for FFmpeg by 1.8.11