[FFmpeg-devel] [PATCH]Addition of MLP encoder

Michael Niedermayer michael at niedermayer.cc
Fri Apr 1 15:25:51 CEST 2016


On Fri, Apr 01, 2016 at 02:27:43PM +0530, Disha Singh wrote:
> Somehow I am not getting these warnings when I compile. (not all)
> Should I remove the functions which are defined but not used. They may be
> needed sometime later.
> I have removed the error in line 1888.

theres now an error in line 1898
all errors must be fixed so compilation passes

all warnings about pointer / integer mismatches and pointer types
must be fixed too


> I do not get any error in line 2462. What should I add in my code that the
> compiler you used does not show this error?

you can try gcc and clang but they both should display warnings
about pointer type issues


[...]

> +/** Applies the filter to the current samples, and saves the residual back
> + *  into the samples buffer. If the filter is too bad and overflows the
> + *  maximum amount of bits allowed (24), the samples buffer is left as is and
> + *  the function returns -1.
> + */
> +static int apply_filter(MLPEncodeContext *ctx, unsigned int channel)
> +{
> +    FilterParams *fp[NUM_FILTERS] = { &ctx->cur_channel_params[channel].filter_params[FIR],
> +                                      &ctx->cur_channel_params[channel].filter_params[IIR], };
> +    int32_t **filter_state_buffer = av_malloc((NUM_FILTERS)*sizeof(int32_t*));
> +    int32_t mask = MSB_MASK(ctx->cur_decoding_params->quant_step_size[channel]);
> +    int32_t *sample_buffer = ctx->sample_buffer + channel;
> +    unsigned int number_of_samples = ctx->number_of_samples;
> +    unsigned int filter_shift = fp[FIR]->shift;
> +    int filter;
> +    int i;
> +
> +    for (i = 0; i < NUM_FILTERS; i++) {
> +        filter_state_buffer[i] = (av_malloc((ctx->number_of_samples)*sizeof(int32_t));

libavcodec/mlpenc.c: In function ‘apply_filter’:
libavcodec/mlpenc.c:1897:86: error: expected ‘)’ before ‘;’ token
libavcodec/mlpenc.c:1898:5: error: expected ‘;’ before ‘}’ token


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

There will always be a question for which you do not know the correct answer.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160401/6541ec35/attachment.sig>


More information about the ffmpeg-devel mailing list