Diego Biurrun <[email protected]> writes:

> Previously the JPEG DCTs were enabled for all encoders, now they are
> only selected for the handful of encoders that actually need them.

Are you sure these are the only ones?  Since the DCT is mostly accessed
through a function pointer, it would build even with the DCTs
erroneously disabled only to fail or crash at runtime.

Moreover, since there are multiple choices of DCT, none of them are
strictly required.  To allow arbitrarily disabling individual DCTs, the
selection process would need to be improved to always provide something
by default, even if the usual default is disabled.

> @@ -1373,8 +1375,8 @@ rv40_decoder_select="golomb h264chroma h264pred 
> h264qpel"
>  shorten_decoder_select="golomb"
>  sipr_decoder_select="lsp"
>  snow_decoder_select="dwt"
> -snow_encoder_select="aandct dwt"
> -svq1_encoder_select="aandct"
> +snow_encoder_select="aandct dwt jpegdct"
> +svq1_encoder_select="aandct jpegdct"

Since when does snow use DCT?

> diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
> index 5088c6a..34a74ff 100644
> --- a/libavcodec/dsputil.c
> +++ b/libavcodec/dsputil.c
> @@ -2780,7 +2780,7 @@ av_cold void ff_dsputil_init(DSPContext* c, 
> AVCodecContext *avctx)
>
>      ff_check_alignment();
>
> -#if CONFIG_ENCODERS
> +#if CONFIG_JPEGDCT
>      if (avctx->bits_per_raw_sample == 10) {
>          c->fdct    = ff_jpeg_fdct_islow_10;
>          c->fdct248 = ff_fdct248_islow_10;
> @@ -2800,7 +2800,7 @@ av_cold void ff_dsputil_init(DSPContext* c, 
> AVCodecContext *avctx)
>              c->fdct248 = ff_fdct248_islow_8;
>          }
>      }
> -#endif //CONFIG_ENCODERS
> +#endif /* CONFIG_JPEGDCT */

This is wrong.  That ifdef covers all the DCTs, not only the jpeg ones.

-- 
Måns Rullgård
[email protected]
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to