From c25df22365b059a36f63f2810ef26abaec833231 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Wed, 26 Oct 2011 18:30:22 -0400 Subject: cook: output float samples instead of converting to int16 --- libavcodec/cook.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'libavcodec/cook.c') diff --git a/libavcodec/cook.c b/libavcodec/cook.c index 13f2dd66a6..d3e7de8c78 100644 --- a/libavcodec/cook.c +++ b/libavcodec/cook.c @@ -124,7 +124,7 @@ typedef struct cook { void (* interpolate) (struct cook *q, float* buffer, int gain_index, int gain_index_next); - void (* saturate_output) (struct cook *q, int chan, int16_t *out); + void (* saturate_output) (struct cook *q, int chan, float *out); AVCodecContext* avctx; GetBitContext gb; @@ -229,7 +229,7 @@ static av_cold int init_cook_mlt(COOKContext *q) { q->mlt_window[j] *= sqrt(2.0 / q->samples_per_channel); /* Initialize the MDCT. */ - if (ff_mdct_init(&q->mdct_ctx, av_log2(mlt_size)+1, 1, 1.0)) { + if (ff_mdct_init(&q->mdct_ctx, av_log2(mlt_size)+1, 1, 1.0/32768.0)) { av_free(q->mlt_window); return -1; } @@ -867,22 +867,18 @@ decode_bytes_and_gain(COOKContext *q, COOKSubpacket *p, const uint8_t *inbuffer, } /** - * Saturate the output signal to signed 16bit integers. + * Saturate the output signal and interleave. * * @param q pointer to the COOKContext * @param chan channel to saturate * @param out pointer to the output vector */ -static void -saturate_output_float (COOKContext *q, int chan, int16_t *out) +static void saturate_output_float(COOKContext *q, int chan, float *out) { int j; float *output = q->mono_mdct_output + q->samples_per_channel; - /* Clip and convert floats to 16 bits. - */ for (j = 0; j < q->samples_per_channel; j++) { - out[chan + q->nb_channels * j] = - av_clip_int16(lrintf(output[j])); + out[chan + q->nb_channels * j] = av_clipf(output[j], -1.0, 1.0); } } @@ -902,7 +898,7 @@ saturate_output_float (COOKContext *q, int chan, int16_t *out) static inline void mlt_compensate_output(COOKContext *q, float *decode_buffer, cook_gains *gains_ptr, float *previous_buffer, - int16_t *out, int chan) + float *out, int chan) { imlt_gain(q, decode_buffer, gains_ptr, previous_buffer); q->saturate_output (q, chan, out); @@ -917,7 +913,9 @@ mlt_compensate_output(COOKContext *q, float *decode_buffer, * @param inbuffer pointer to the inbuffer * @param outbuffer pointer to the outbuffer */ -static void decode_subpacket(COOKContext *q, COOKSubpacket* p, const uint8_t *inbuffer, int16_t *outbuffer) { +static void decode_subpacket(COOKContext *q, COOKSubpacket *p, + const uint8_t *inbuffer, float *outbuffer) +{ int sub_packet_size = p->size; /* packet dump */ // for (i=0 ; isubpacket[i].bits_per_subpacket = (q->subpacket[i].size*8)>>q->subpacket[i].bits_per_subpdiv; q->subpacket[i].ch_idx = chidx; av_log(avctx,AV_LOG_DEBUG,"subpacket[%i] size %i js %i %i block_align %i\n",i,q->subpacket[i].size,q->subpacket[i].joint_stereo,offset,avctx->block_align); - decode_subpacket(q, &q->subpacket[i], buf + offset, (int16_t*)data); + decode_subpacket(q, &q->subpacket[i], buf + offset, data); offset += q->subpacket[i].size; chidx += q->subpacket[i].num_channels; av_log(avctx,AV_LOG_DEBUG,"subpacket[%i] %i %i\n",i,q->subpacket[i].size * 8,get_bits_count(&q->gb)); } - *data_size = sizeof(int16_t) * q->nb_channels * q->samples_per_channel; + *data_size = q->nb_channels * q->samples_per_channel * + av_get_bytes_per_sample(avctx->sample_fmt); /* Discard the first two frames: no valid audio. */ if (avctx->frame_number < 2) *data_size = 0; @@ -1240,7 +1239,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) return -1; } - avctx->sample_fmt = AV_SAMPLE_FMT_S16; + avctx->sample_fmt = AV_SAMPLE_FMT_FLT; if (channel_mask) avctx->channel_layout = channel_mask; else -- cgit v1.2.3 From 776e9815a523eb817b47dd34ac56e4cbdabff17e Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Wed, 26 Oct 2011 18:36:08 -0400 Subject: cook: remove unneeded #includes --- libavcodec/cook.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'libavcodec/cook.c') diff --git a/libavcodec/cook.c b/libavcodec/cook.c index d3e7de8c78..93e1758665 100644 --- a/libavcodec/cook.c +++ b/libavcodec/cook.c @@ -42,12 +42,7 @@ * available. */ -#include -#include -#include - #include "libavutil/lfg.h" -#include "libavutil/random_seed.h" #include "avcodec.h" #include "get_bits.h" #include "dsputil.h" -- cgit v1.2.3 From e694831f9d0cb75225b8ce300db4f20da85b7438 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Wed, 26 Oct 2011 20:42:02 -0400 Subject: cook: avoid hardcoded sizes in sizeof() --- libavcodec/cook.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'libavcodec/cook.c') diff --git a/libavcodec/cook.c b/libavcodec/cook.c index 93e1758665..25a698c21d 100644 --- a/libavcodec/cook.c +++ b/libavcodec/cook.c @@ -215,7 +215,7 @@ static av_cold int init_cook_mlt(COOKContext *q) { int j; int mlt_size = q->samples_per_channel; - if ((q->mlt_window = av_malloc(sizeof(float)*mlt_size)) == 0) + if ((q->mlt_window = av_malloc(mlt_size * sizeof(*q->mlt_window))) == 0) return -1; /* Initialize the MLT window: simple sine window. */ @@ -405,9 +405,9 @@ static void categorize(COOKContext *q, COOKSubpacket *p, int* quant_index_table, //av_log(q->avctx, AV_LOG_ERROR, "bits_left = %d\n",bits_left); } - memset(&exp_index1,0,102*sizeof(int)); - memset(&exp_index2,0,102*sizeof(int)); - memset(&tmp_categorize_array,0,128*2*sizeof(int)); + memset(&exp_index1, 0, sizeof(exp_index1)); + memset(&exp_index2, 0, sizeof(exp_index2)); + memset(&tmp_categorize_array, 0, sizeof(tmp_categorize_array)); bias=-32; @@ -628,8 +628,8 @@ static void mono_decode(COOKContext *q, COOKSubpacket *p, float* mlt_buffer) { int quant_index_table[102]; int category[128]; - memset(&category, 0, 128*sizeof(int)); - memset(&category_index, 0, 128*sizeof(int)); + memset(&category, 0, sizeof(category)); + memset(&category_index, 0, sizeof(category_index)); decode_envelope(q, p, quant_index_table); q->num_vectors = get_bits(&q->gb,p->log2_numvector_size); @@ -728,7 +728,8 @@ static void imlt_gain(COOKContext *q, float *inbuffer, } /* Save away the current to be previous block. */ - memcpy(previous_buffer, buffer0, sizeof(float)*q->samples_per_channel); + memcpy(previous_buffer, buffer0, + q->samples_per_channel * sizeof(*previous_buffer)); } @@ -806,11 +807,11 @@ static void joint_decode(COOKContext *q, COOKSubpacket *p, float* mlt_buffer1, const float* cplscale; memset(decouple_tab, 0, sizeof(decouple_tab)); - memset(decode_buffer, 0, sizeof(decode_buffer)); + memset(decode_buffer, 0, sizeof(q->decode_buffer_0)); /* Make sure the buffers are zeroed out. */ - memset(mlt_buffer1,0, 1024*sizeof(float)); - memset(mlt_buffer2,0, 1024*sizeof(float)); + memset(mlt_buffer1, 0, 1024 * sizeof(*mlt_buffer1)); + memset(mlt_buffer2, 0, 1024 * sizeof(*mlt_buffer2)); decouple_info(q, p, decouple_tab); mono_decode(q, p, decode_buffer); -- cgit v1.2.3 From f193c96f49c5a0778a06ed1279593cc6ed536052 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Wed, 26 Oct 2011 20:46:36 -0400 Subject: cook: return appropriate error codes instead of -1 --- libavcodec/cook.c | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) (limited to 'libavcodec/cook.c') diff --git a/libavcodec/cook.c b/libavcodec/cook.c index 25a698c21d..957775727b 100644 --- a/libavcodec/cook.c +++ b/libavcodec/cook.c @@ -212,11 +212,11 @@ static av_cold int init_cook_vlc_tables(COOKContext *q) { } static av_cold int init_cook_mlt(COOKContext *q) { - int j; + int j, ret; int mlt_size = q->samples_per_channel; if ((q->mlt_window = av_malloc(mlt_size * sizeof(*q->mlt_window))) == 0) - return -1; + return AVERROR(ENOMEM); /* Initialize the MLT window: simple sine window. */ ff_sine_window_init(q->mlt_window, mlt_size); @@ -224,9 +224,9 @@ static av_cold int init_cook_mlt(COOKContext *q) { q->mlt_window[j] *= sqrt(2.0 / q->samples_per_channel); /* Initialize the MDCT. */ - if (ff_mdct_init(&q->mdct_ctx, av_log2(mlt_size)+1, 1, 1.0/32768.0)) { - av_free(q->mlt_window); - return -1; + if ((ret = ff_mdct_init(&q->mdct_ctx, av_log2(mlt_size)+1, 1, 1.0/32768.0))) { + av_free(q->mlt_window); + return ret; } av_log(q->avctx,AV_LOG_DEBUG,"MDCT initialized, order = %d.\n", av_log2(mlt_size)+1); @@ -975,7 +975,7 @@ static int cook_decode_frame(AVCodecContext *avctx, q->subpacket[0].size -= q->subpacket[i].size + 1; if (q->subpacket[0].size < 0) { av_log(avctx,AV_LOG_DEBUG,"frame subpacket size total > avctx->block_align!\n"); - return -1; + return AVERROR_INVALIDDATA; } } @@ -1048,12 +1048,13 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) int extradata_size = avctx->extradata_size; int s = 0; unsigned int channel_mask = 0; + int ret; q->avctx = avctx; /* Take care of the codec specific extradata. */ if (extradata_size <= 0) { av_log(avctx,AV_LOG_ERROR,"Necessary extradata missing!\n"); - return -1; + return AVERROR_INVALIDDATA; } av_log(avctx,AV_LOG_DEBUG,"codecdata_length=%d\n",avctx->extradata_size); @@ -1098,7 +1099,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) case MONO: if (q->nb_channels != 1) { av_log_ask_for_sample(avctx, "Container channels != 1.\n"); - return -1; + return AVERROR(ENOTSUP); } av_log(avctx,AV_LOG_DEBUG,"MONO\n"); break; @@ -1112,7 +1113,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) case JOINT_STEREO: if (q->nb_channels != 2) { av_log_ask_for_sample(avctx, "Container channels != 2.\n"); - return -1; + return AVERROR(ENOTSUP); } av_log(avctx,AV_LOG_DEBUG,"JOINT_STEREO\n"); if (avctx->extradata_size >= 16){ @@ -1150,12 +1151,12 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) break; default: av_log_ask_for_sample(avctx, "Unknown Cook version.\n"); - return -1; + return AVERROR(ENOTSUP); } if(s > 1 && q->subpacket[s].samples_per_channel != q->samples_per_channel) { av_log(avctx,AV_LOG_ERROR,"different number of samples per channel!\n"); - return -1; + return AVERROR_INVALIDDATA; } else q->samples_per_channel = q->subpacket[0].samples_per_channel; @@ -1166,18 +1167,18 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) /* Try to catch some obviously faulty streams, othervise it might be exploitable */ if (q->subpacket[s].total_subbands > 53) { av_log_ask_for_sample(avctx, "total_subbands > 53\n"); - return -1; + return AVERROR(ENOTSUP); } if ((q->subpacket[s].js_vlc_bits > 6) || (q->subpacket[s].js_vlc_bits < 2*q->subpacket[s].joint_stereo)) { av_log(avctx,AV_LOG_ERROR,"js_vlc_bits = %d, only >= %d and <= 6 allowed!\n", q->subpacket[s].js_vlc_bits, 2*q->subpacket[s].joint_stereo); - return -1; + return AVERROR_INVALIDDATA; } if (q->subpacket[s].subbands > 50) { av_log_ask_for_sample(avctx, "subbands > 50\n"); - return -1; + return AVERROR(ENOTSUP); } q->subpacket[s].gains1.now = q->subpacket[s].gain_1; q->subpacket[s].gains1.previous = q->subpacket[s].gain_2; @@ -1188,7 +1189,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) s++; if (s > MAX_SUBPACKETS) { av_log_ask_for_sample(avctx, "Too many subpackets > 5\n"); - return -1; + return AVERROR(ENOTSUP); } } /* Generate tables */ @@ -1196,12 +1197,12 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) init_gain_table(q); init_cplscales_table(q); - if (init_cook_vlc_tables(q) != 0) - return -1; + if ((ret = init_cook_vlc_tables(q))) + return ret; if(avctx->block_align >= UINT_MAX/2) - return -1; + return AVERROR(EINVAL); /* Pad the databuffer with: DECODE_BYTES_PAD1 or DECODE_BYTES_PAD2 for decode_bytes(), @@ -1211,11 +1212,11 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) + DECODE_BYTES_PAD1(avctx->block_align) + FF_INPUT_BUFFER_PADDING_SIZE); if (q->decoded_bytes_buffer == NULL) - return -1; + return AVERROR(ENOMEM); /* Initialize transform. */ - if ( init_cook_mlt(q) != 0 ) - return -1; + if ((ret = init_cook_mlt(q))) + return ret; /* Initialize COOK signal arithmetic handling */ if (1) { @@ -1232,7 +1233,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) av_log_ask_for_sample(avctx, "unknown amount of samples_per_channel = %d\n", q->samples_per_channel); - return -1; + return AVERROR(ENOTSUP); } avctx->sample_fmt = AV_SAMPLE_FMT_FLT; -- cgit v1.2.3 From c9c841e2314ab9812f4956441e91f90193fcac5e Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Wed, 26 Oct 2011 20:59:14 -0400 Subject: cook: simplify decouple_info() --- libavcodec/cook.c | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) (limited to 'libavcodec/cook.c') diff --git a/libavcodec/cook.c b/libavcodec/cook.c index 957775727b..7157a8ce01 100644 --- a/libavcodec/cook.c +++ b/libavcodec/cook.c @@ -740,27 +740,24 @@ static void imlt_gain(COOKContext *q, float *inbuffer, * @param decouple_tab decoupling array * */ +static void decouple_info(COOKContext *q, COOKSubpacket *p, int *decouple_tab) +{ + int i; + int vlc = get_bits1(&q->gb); + int start = cplband[p->js_subband_start]; + int end = cplband[p->subbands-1]; + int length = end - start + 1; -static void decouple_info(COOKContext *q, COOKSubpacket *p, int* decouple_tab){ - int length, i; - - if(get_bits1(&q->gb)) { - if(cplband[p->js_subband_start] > cplband[p->subbands-1]) return; - - length = cplband[p->subbands-1] - cplband[p->js_subband_start] + 1; - for (i=0 ; ijs_subband_start] + i] = get_vlc2(&q->gb, p->ccpl.table, p->ccpl.bits, 2); - } + if (start > end) return; - } - if(cplband[p->js_subband_start] > cplband[p->subbands-1]) return; - - length = cplband[p->subbands-1] - cplband[p->js_subband_start] + 1; - for (i=0 ; ijs_subband_start] + i] = get_bits(&q->gb, p->js_vlc_bits); + if (vlc) { + for (i = 0; i < length; i++) + decouple_tab[start + i] = get_vlc2(&q->gb, p->ccpl.table, p->ccpl.bits, 2); + } else { + for (i = 0; i < length; i++) + decouple_tab[start + i] = get_bits(&q->gb, p->js_vlc_bits); } - return; } /* -- cgit v1.2.3 From b277ebd508a0ceeb187d5ae8c463ce6ffb06b4c8 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Wed, 26 Oct 2011 21:03:49 -0400 Subject: cook: remove pointless return statements --- libavcodec/cook.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'libavcodec/cook.c') diff --git a/libavcodec/cook.c b/libavcodec/cook.c index 7157a8ce01..462a8c40fc 100644 --- a/libavcodec/cook.c +++ b/libavcodec/cook.c @@ -658,14 +658,12 @@ static void interpolate_float(COOKContext *q, float* buffer, for(i=0 ; igain_size_factor ; i++){ buffer[i]*=fc1; } - return; } else { //smooth gain fc2 = q->gain_table[11 + (gain_index_next-gain_index)]; for(i=0 ; igain_size_factor ; i++){ buffer[i]*=fc1; fc1*=fc2; } - return; } } -- cgit v1.2.3 From 6631294c26b82f11b1862bdc3a6685a201afd19d Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Wed, 26 Oct 2011 21:08:57 -0400 Subject: cook: do not needlessly set *data_size to 0 --- libavcodec/cook.c | 1 - 1 file changed, 1 deletion(-) (limited to 'libavcodec/cook.c') diff --git a/libavcodec/cook.c b/libavcodec/cook.c index 462a8c40fc..eefbf4ad48 100644 --- a/libavcodec/cook.c +++ b/libavcodec/cook.c @@ -975,7 +975,6 @@ static int cook_decode_frame(AVCodecContext *avctx, } /* decode supbackets */ - *data_size = 0; for(i=0;inum_subpackets;i++){ q->subpacket[i].bits_per_subpacket = (q->subpacket[i].size*8)>>q->subpacket[i].bits_per_subpdiv; q->subpacket[i].ch_idx = chidx; -- cgit v1.2.3 From e34c6c9708336b9445574bb6ddb48416368af963 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Wed, 26 Oct 2011 21:11:13 -0400 Subject: cook: check output buffer size before decoding --- libavcodec/cook.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'libavcodec/cook.c') diff --git a/libavcodec/cook.c b/libavcodec/cook.c index eefbf4ad48..9e3cd624a0 100644 --- a/libavcodec/cook.c +++ b/libavcodec/cook.c @@ -955,13 +955,20 @@ static int cook_decode_frame(AVCodecContext *avctx, const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; COOKContext *q = avctx->priv_data; - int i; + int i, out_size; int offset = 0; int chidx = 0; if (buf_size < avctx->block_align) return buf_size; + out_size = q->nb_channels * q->samples_per_channel * + av_get_bytes_per_sample(avctx->sample_fmt); + if (*data_size < out_size) { + av_log(avctx, AV_LOG_ERROR, "Output buffer is too small\n"); + return AVERROR(EINVAL); + } + /* estimate subpacket sizes */ q->subpacket[0].size = avctx->block_align; @@ -984,8 +991,7 @@ static int cook_decode_frame(AVCodecContext *avctx, chidx += q->subpacket[i].num_channels; av_log(avctx,AV_LOG_DEBUG,"subpacket[%i] %i %i\n",i,q->subpacket[i].size * 8,get_bits_count(&q->gb)); } - *data_size = q->nb_channels * q->samples_per_channel * - av_get_bytes_per_sample(avctx->sample_fmt); + *data_size = out_size; /* Discard the first two frames: no valid audio. */ if (avctx->frame_number < 2) *data_size = 0; -- cgit v1.2.3 From 5c353eb8e38d4861e325a767fb18d24b316e9799 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Sat, 29 Oct 2011 14:31:11 -0400 Subject: cook: return AVERROR_PATCHWELCOME instead of ENOTSUP ENOTSUP is not defined on some systems --- libavcodec/cook.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'libavcodec/cook.c') diff --git a/libavcodec/cook.c b/libavcodec/cook.c index 9e3cd624a0..5a3822d4c7 100644 --- a/libavcodec/cook.c +++ b/libavcodec/cook.c @@ -1099,7 +1099,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) case MONO: if (q->nb_channels != 1) { av_log_ask_for_sample(avctx, "Container channels != 1.\n"); - return AVERROR(ENOTSUP); + return AVERROR_PATCHWELCOME; } av_log(avctx,AV_LOG_DEBUG,"MONO\n"); break; @@ -1113,7 +1113,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) case JOINT_STEREO: if (q->nb_channels != 2) { av_log_ask_for_sample(avctx, "Container channels != 2.\n"); - return AVERROR(ENOTSUP); + return AVERROR_PATCHWELCOME; } av_log(avctx,AV_LOG_DEBUG,"JOINT_STEREO\n"); if (avctx->extradata_size >= 16){ @@ -1151,7 +1151,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) break; default: av_log_ask_for_sample(avctx, "Unknown Cook version.\n"); - return AVERROR(ENOTSUP); + return AVERROR_PATCHWELCOME; } if(s > 1 && q->subpacket[s].samples_per_channel != q->samples_per_channel) { @@ -1167,7 +1167,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) /* Try to catch some obviously faulty streams, othervise it might be exploitable */ if (q->subpacket[s].total_subbands > 53) { av_log_ask_for_sample(avctx, "total_subbands > 53\n"); - return AVERROR(ENOTSUP); + return AVERROR_PATCHWELCOME; } if ((q->subpacket[s].js_vlc_bits > 6) || (q->subpacket[s].js_vlc_bits < 2*q->subpacket[s].joint_stereo)) { @@ -1178,7 +1178,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) if (q->subpacket[s].subbands > 50) { av_log_ask_for_sample(avctx, "subbands > 50\n"); - return AVERROR(ENOTSUP); + return AVERROR_PATCHWELCOME; } q->subpacket[s].gains1.now = q->subpacket[s].gain_1; q->subpacket[s].gains1.previous = q->subpacket[s].gain_2; @@ -1189,7 +1189,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) s++; if (s > MAX_SUBPACKETS) { av_log_ask_for_sample(avctx, "Too many subpackets > 5\n"); - return AVERROR(ENOTSUP); + return AVERROR_PATCHWELCOME; } } /* Generate tables */ @@ -1233,7 +1233,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) av_log_ask_for_sample(avctx, "unknown amount of samples_per_channel = %d\n", q->samples_per_channel); - return AVERROR(ENOTSUP); + return AVERROR_PATCHWELCOME; } avctx->sample_fmt = AV_SAMPLE_FMT_FLT; -- cgit v1.2.3