29 #include "libavutil/intreadwrite.h"
52 8, 6, 5, 8, 12, 20, 26, 31,
53 6, 6, 7, 10, 13, 29, 30, 28,
54 7, 7, 8, 12, 20, 29, 35, 28,
55 7, 9, 11, 15, 26, 44, 40, 31,
56 9, 11, 19, 28, 34, 55, 52, 39,
57 12, 18, 28, 32, 41, 52, 57, 46,
58 25, 32, 39, 44, 52, 61, 60, 51,
59 36, 46, 48, 49, 56, 50, 52, 50
63 9, 9, 12, 24, 50, 50, 50, 50,
64 9, 11, 13, 33, 50, 50, 50, 50,
65 12, 13, 28, 50, 50, 50, 50, 50,
66 24, 33, 50, 50, 50, 50, 50, 50,
67 50, 50, 50, 50, 50, 50, 50, 50,
68 50, 50, 50, 50, 50, 50, 50, 50,
69 50, 50, 50, 50, 50, 50, 50, 50,
70 50, 50, 50, 50, 50, 50, 50, 50,
111 const uint8_t *val_table,
int nb_codes,
114 uint8_t huff_size[256] = { 0 };
115 uint16_t huff_code[256];
116 uint16_t huff_sym[256];
121 for (i = 0; i < 256; i++)
122 huff_sym[i] = i + 16 * is_ac;
125 huff_sym[0] = 16 * 256;
128 huff_code, 2, 2, huff_sym, 2, 2, 0);
163 for (i = 0; i < 2; i++) {
174 const uint8_t *src_end = src + src_size;
177 while (src < src_end) {
182 if (x == 0xFF && !*src)
185 *dst_size = dst - dst_start;
189 int plane, int16_t *
block)
192 const int is_chroma = !!plane;
201 dc = dc * qmat[0] + c->
prev_dc[plane];
227 out[0] = av_clip_uint8(Y + ( 91881 * V + 32768 >> 16));
228 out[1] = av_clip_uint8(Y + (-22554 * U - 46802 * V + 32768 >> 16));
229 out[2] = av_clip_uint8(Y + (116130 * U + 32768 >> 16));
240 int mb_w, mb_h, mb_x, mb_y, i, j;
255 mb_h = (height + 15) >> 4;
258 num_mbs = mb_w * mb_h;
260 for (i = 0; i < 3; i++)
263 for (mb_y = 0; mb_y < mb_h; mb_y++) {
264 for (mb_x = 0; mb_x < mb_w; mb_x++) {
265 if (mask && !mask[mb_x]) {
269 for (j = 0; j < 2; j++) {
270 for (i = 0; i < 2; i++) {
272 c->
block[i + j * 2])) != 0)
277 for (i = 1; i < 3; i++) {
283 for (j = 0; j < 16; j++) {
284 uint8_t *
out = dst + bx * 3 + (by + j) * dst_stride;
285 for (i = 0; i < 16; i++) {
288 Y = c->
block[(j >> 3) * 2 + (i >> 3)][(i & 7) + (j & 7) * 8];
289 U = c->
block[4 ^ swapuv][(i >> 1) + (j >> 1) * 8] - 128;
290 V = c->
block[5 ^ swapuv][(i >> 1) + (j >> 1) * 8] - 128;
310 const uint8_t *jpeg_tile,
int tile_stride,
312 const uint8_t *pal,
int npal,
int tidx)
319 if (npal <= 2) nb = 1;
320 else if (npal <= 4) nb = 2;
321 else if (npal <= 16) nb = 4;
324 for (j = 0; j <
height; j++, dst +=
stride, jpeg_tile += tile_stride) {
327 for (i = 0; i <
width; i++) {
330 memcpy(dst + i * 3, pal + col * 3, 3);
332 memcpy(dst + i * 3, jpeg_tile + i * 3, 3);
341 int hdr, zsize, npal, tidx = -1,
ret;
343 const uint8_t *src_end = src + src_size;
347 int nblocks, cblocks, bstride;
348 int bits, bitbuf, coded;
362 memcpy(transp, src, 3);
365 for (i = 0; i <
width; i++)
366 memcpy(dst + i * 3, transp, 3);
368 }
else if (sub_type == 1) {
374 memcpy(transp, src, 3);
378 memcpy(pal, src, npal * 3); src += npal * 3;
380 for (i = 0; i < npal; i++) {
381 if (!memcmp(pal + i * 3, transp, 3)) {
388 if (src_end - src < 2)
390 zsize = (src[0] << 8) | src[1]; src += 2;
392 if (src_end - src < zsize + (sub_type != 2))
402 NULL, 0, width, height, pal, npal, tidx);
406 nblocks = *src++ + 1;
408 bstride =
FFALIGN(width, 16) >> 4;
411 for (i = 0; i < (FFALIGN(height, 16) >> 4); i++) {
412 for (j = 0; j < (FFALIGN(width, 16) >> 4); j++) {
423 if (cblocks > nblocks)
436 width, height, pal, npal, tidx);
447 aligned_height = c->
height + 15;
481 uint32_t cur_size, cursor_w, cursor_h, cursor_stride;
482 uint32_t cursor_hot_x, cursor_hot_y;
486 cur_size = bytestream2_get_be32(gb);
487 cursor_w = bytestream2_get_byte(gb);
488 cursor_h = bytestream2_get_byte(gb);
489 cursor_hot_x = bytestream2_get_byte(gb);
490 cursor_hot_y = bytestream2_get_byte(gb);
491 cursor_fmt = bytestream2_get_byte(gb);
495 if (cursor_w < 1 || cursor_w > 256 ||
496 cursor_h < 1 || cursor_h > 256) {
501 if (cursor_hot_x > cursor_w || cursor_hot_y > cursor_h) {
503 cursor_hot_x, cursor_hot_y);
504 cursor_hot_x =
FFMIN(cursor_hot_x, cursor_w - 1);
505 cursor_hot_y =
FFMIN(cursor_hot_y, cursor_h - 1);
513 if (cursor_fmt != 1 && cursor_fmt != 32) {
537 for (i = 0; i < c->
cursor_w; i += 32) {
538 bits = bytestream2_get_be32(gb);
539 for (k = 0; k < 32; k++) {
540 dst[0] = !!(bits & 0x80000000);
549 for (i = 0; i < c->
cursor_w; i += 32) {
550 bits = bytestream2_get_be32(gb);
551 for (k = 0; k < 32; k++) {
552 int mask_bit = !!(bits & 0x80000000);
553 switch (dst[0] * 2 + mask_bit) {
555 dst[0] = 0xFF; dst[1] = 0x00;
556 dst[2] = 0x00; dst[3] = 0x00;
559 dst[0] = 0xFF; dst[1] = 0xFF;
560 dst[2] = 0xFF; dst[3] = 0xFF;
563 dst[0] = 0x00; dst[1] = 0x00;
564 dst[2] = 0x00; dst[3] = 0x00;
577 int val = bytestream2_get_be32(gb);
591 #define APPLY_ALPHA(src, new, alpha) \
592 src = (src * (256 - alpha) + new * alpha) >> 8
610 if (x + w > c->
width)
629 for (j = 0; j < h; j++) {
630 for (i = 0; i < w; i++) {
632 APPLY_ALPHA(dst[i * 3 + 0], cursor[i * 4 + 1], alpha);
633 APPLY_ALPHA(dst[i * 3 + 1], cursor[i * 4 + 2], alpha);
634 APPLY_ALPHA(dst[i * 3 + 2], cursor[i * 4 + 3], alpha);
642 int *got_picture_ptr,
AVPacket *avpkt)
645 int buf_size = avpkt->
size;
658 "Frame should have at least 12 bytes, got %d instead\n",
665 magic = bytestream2_get_be32(&bc);
666 if ((magic & ~0xF) !=
MKBETAG(
'G',
'2',
'M',
'0') ||
667 (magic & 0xF) < 2 || (magic & 0xF) > 4) {
672 if ((magic & 0xF) != 4) {
678 chunk_size = bytestream2_get_le32(&bc) - 1;
679 chunk_type = bytestream2_get_byte(&bc);
682 chunk_size, chunk_type);
685 switch (chunk_type) {
688 if (chunk_size < 21) {
693 c->
width = bytestream2_get_be32(&bc);
694 c->
height = bytestream2_get_be32(&bc);
698 "Invalid frame dimensions %dx%d\n",
708 "Unknown compression method %d\n",
716 "Invalid tile dimensions %dx%d\n",
723 c->
bpp = bytestream2_get_byte(&bc);
735 "No frame header - skipping tile\n");
739 if (chunk_size < 2) {
744 c->
tile_x = bytestream2_get_byte(&bc);
745 c->
tile_y = bytestream2_get_byte(&bc);
748 "Invalid tile pos %d,%d (in %dx%d grid)\n",
757 "ePIC j-b compression is not implemented yet\n");
771 if (chunk_size < 5) {
776 c->
cursor_x = bytestream2_get_be16(&bc);
777 c->
cursor_y = bytestream2_get_be16(&bc);
781 if (chunk_size < 8) {
811 for (i = 0; i < avctx->
height; i++)
817 *got_picture_ptr = 1;
const char const char void * val
av_cold void ff_dsputil_init(DSPContext *c, AVCodecContext *avctx)
static int kempf_decode_tile(G2MContext *c, int tile_x, int tile_y, const uint8_t *src, int src_size)
#define AVERROR_PATCHWELCOME
This structure describes decoded (raw) audio or video data.
static av_cold void jpg_free_context(JPGContext *ctx)
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
#define AV_LOG_WARNING
Something somehow does not look correct.
static av_cold int init(AVCodecContext *avctx)
const uint8_t avpriv_mjpeg_bits_ac_luminance[17]
packed RGB 8:8:8, 24bpp, RGBRGB...
static void kempf_restore_buf(const uint8_t *src, int len, uint8_t *dst, int stride, const uint8_t *jpeg_tile, int tile_stride, int width, int height, const uint8_t *pal, int npal, int tidx)
void avcodec_set_dimensions(AVCodecContext *s, int width, int height)
#define DECLARE_ALIGNED(n, t, v)
void av_log(void *avcl, int level, const char *fmt,...) av_printf_format(3
Send the specified message to the log if the level is less than or equal to the current av_log_level...
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
static av_always_inline void bytestream2_init(GetByteContext *g, const uint8_t *buf, int buf_size)
const uint8_t avpriv_mjpeg_bits_dc_chrominance[17]
const uint8_t avpriv_mjpeg_bits_ac_chrominance[17]
static int g2m_init_buffers(G2MContext *c)
MJPEG encoder and decoder.
static void jpg_unescape(const uint8_t *src, int src_size, uint8_t *dst, int *dst_size)
void av_freep(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
if((e=av_dict_get(options,"", NULL, AV_DICT_IGNORE_SUFFIX)))
int ff_init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes, const void *bits, int bits_wrap, int bits_size, const void *codes, int codes_wrap, int codes_size, const void *symbols, int symbols_wrap, int symbols_size, int flags)
const char * name
Name of the codec implementation.
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
void ff_mjpeg_build_huffman_codes(uint8_t *huff_size, uint16_t *huff_code, const uint8_t *bits_table, const uint8_t *val_table)
bitstream reader API header.
uint8_t idct_permutation[64]
idct input permutation.
static av_cold int g2m_decode_init(AVCodecContext *avctx)
static av_cold int jpg_init(AVCodecContext *avctx, JPGContext *c)
static double alpha(void *priv, double x, double y)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void av_free(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). ...
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(constint16_t *) pi >>8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(constint32_t *) pi >>24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(constfloat *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(constfloat *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(constfloat *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(constdouble *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(constdouble *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(constdouble *) pi *(1U<< 31))))#defineSET_CONV_FUNC_GROUP(ofmt, ifmt) staticvoidset_generic_function(AudioConvert *ac){}voidff_audio_convert_free(AudioConvert **ac){return;ff_dither_free(&(*ac) ->dc);av_freep(ac);}AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enumAVSampleFormatout_fmt, enumAVSampleFormatin_fmt, intchannels, intsample_rate, intapply_map){AudioConvert *ac;intin_planar, out_planar;ac=av_mallocz(sizeof(*ac));returnNULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method!=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt)>2){ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc){av_free(ac);returnNULL;}returnac;}in_planar=av_sample_fmt_is_planar(in_fmt);out_planar=av_sample_fmt_is_planar(out_fmt);if(in_planar==out_planar){ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar?ac->channels:1;}elseif(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;elseac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);ff_audio_convert_init_arm(ac);ff_audio_convert_init_x86(ac);returnac;}intff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in){intuse_generic=1;intlen=in->nb_samples;intp;if(ac->dc){av_dlog(ac->avr,"%dsamples-audio_convert:%sto%s(dithered)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));returnff_convert_dither(ac-> dc
static const uint16_t mask[17]
static int g2m_load_cursor(AVCodecContext *avctx, G2MContext *c, GetByteContext *gb)
static av_cold int g2m_decode_end(AVCodecContext *avctx)
static av_always_inline void bytestream2_skip(GetByteContext *g, unsigned int size)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static av_always_inline unsigned int bytestream2_get_bytes_left(GetByteContext *g)
Libavcodec external API header.
void(* idct)(int16_t *block)
static int jpg_decode_block(JPGContext *c, GetBitContext *gb, int plane, int16_t *block)
#define FF_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
enum AVPictureType pict_type
Picture type of the frame.
static int jpg_decode_data(JPGContext *c, int width, int height, const uint8_t *src, int src_size, uint8_t *dst, int dst_stride, const uint8_t *mask, int mask_stride, int num_mbs, int swapuv)
static int g2m_decode_frame(AVCodecContext *avctx, void *data, int *got_picture_ptr, AVPacket *avpkt)
void * av_realloc(void *ptr, size_t size) 1(2)
Allocate or reallocate a block of memory.
int width
picture width / height.
const uint8_t avpriv_mjpeg_bits_dc_luminance[17]
const uint8_t avpriv_mjpeg_val_dc[12]
static void g2m_paint_cursor(G2MContext *c, uint8_t *dst, int stride)
static av_always_inline int get_vlc2(GetBitContext *s, VLC_TYPE(*table)[2], int bits, int max_depth)
Parse a vlc code.
static av_always_inline int bytestream2_tell(GetByteContext *g)
static void yuv2rgb(uint8_t *out, int Y, int U, int V)
#define APPLY_ALPHA(src, new, alpha)
main external API structure.
static av_cold int build_vlc(VLC *vlc, const uint8_t *bits_table, const uint8_t *val_table, int nb_codes, int is_ac)
static void close(AVCodecParserContext *s)
static int get_xbits(GetBitContext *s, int n)
read mpeg1 dc style vlc (sign bit + mantisse with no MSB).
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
av_cold void ff_init_scantable(uint8_t *permutation, ScanTable *st, const uint8_t *src_scantable)
BYTE int const BYTE int int int height
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
#define MKBETAG(a, b, c, d)
static const uint8_t chroma_quant[64]
void avpriv_report_missing_feature(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
const uint8_t avpriv_mjpeg_val_ac_luminance[]
common internal api header.
const uint8_t ff_zigzag_direct[64]
void(* clear_block)(int16_t *block)
static const uint8_t luma_quant[64]
const uint8_t avpriv_mjpeg_val_ac_chrominance[]
#define AVERROR_INVALIDDATA
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(constint16_t *) pi >>8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(constint32_t *) pi >>24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(constfloat *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(constfloat *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(constfloat *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(constdouble *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(constdouble *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(constdouble *) pi *(1U<< 31))))#defineSET_CONV_FUNC_GROUP(ofmt, ifmt) staticvoidset_generic_function(AudioConvert *ac){}voidff_audio_convert_free(AudioConvert **ac){return;ff_dither_free(&(*ac) ->dc);av_freep(ac);}AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enumAVSampleFormatout_fmt, enumAVSampleFormatin_fmt, intchannels, intsample_rate, intapply_map){AudioConvert *ac;intin_planar, out_planar;ac=av_mallocz(sizeof(*ac));returnNULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method!=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt)>2){ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc){av_free(ac);returnNULL;}returnac;}in_planar=av_sample_fmt_is_planar(in_fmt);out_planar=av_sample_fmt_is_planar(out_fmt);if(in_planar==out_planar){ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar?ac->channels:1;}elseif(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;elseac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);ff_audio_convert_init_arm(ac);ff_audio_convert_init_x86(ac);returnac;}intff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in){intuse_generic=1;intlen=in->nb_samples;intp;if(ac->dc){av_dlog(ac->avr,"%dsamples-audio_convert:%sto%s(dithered)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));returnff_convert_dither(ac-> out
VLC_TYPE(* table)[2]
code, bits
int key_frame
1 -> keyframe, 0-> not
static int decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
This structure stores compressed data.
void ff_free_vlc(VLC *vlc)
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
void * av_mallocz(size_t size) av_malloc_attrib 1(1)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...