On Tue, Jan 19, 2016 at 07:45:25PM -0500, Vittorio Giovara wrote:
> --- a/libavcodec/eatqi.c
> +++ b/libavcodec/eatqi.c
> @@ -35,69 +35,177 @@
>  
> +/* Based off mpeg1_decode_block_intra from mpeg12dec.c */
> +static inline int decode_intra_block(AVCodecContext *avctx, int16_t *block,
> +                                     int index)
>  {
> +}
> +
> +static int tqi_decode_mb(AVCodecContext *avctx, int16_t (*block)[64])
> +{
> +    TqiContext *t = avctx->priv_data;
>      int n;
> -    s->bdsp.clear_blocks(block[0]);
> -    for (n=0; n<6; n++)
> -        if (ff_mpeg1_decode_block_intra(s, block[n], n) < 0)
> +
> +    t->bdsp.clear_blocks(block[0]);
> +    for (n = 0; n < 6; n++) {
> +        int ret = decode_intra_block(avctx, block[n], n);
> +        if (ret < 0)
>              return -1;
> +    }

ff_mpeg1_decode_block_intra() is a wrapper around mpeg1_decode_block_intra(),
which is static inline.  So that function could live in a header, given that
it will be duplicated at the object level anyway.  Or you could deinline it.

Whether or not inlining it has an actual effect on performance is a good
question.  Given that it is for MPEG-1 and not even MPEG-2, it will probably
not matter; anything you might have bought in the last 10 years should be
plenty fast enough.

Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to