[FFmpeg-devel] [PATCH] checkasm: remove use of deprecated av_set_cpu_flags_mask()

Ronald S. Bultje rsbultje at gmail.com
Sat Sep 26 18:28:31 CEST 2015


Hi,

On Sat, Sep 26, 2015 at 9:54 AM, Henrik Gramner <henrik at gramner.com> wrote:

> ---
> A working implementation of the original patch if we actually do want to
> get
> rid of av_set_cpu_flags_mask().
> ---
>  tests/checkasm/checkasm.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c
> index 2f967e3..8c75cc9 100644
> --- a/tests/checkasm/checkasm.c
> +++ b/tests/checkasm/checkasm.c
> @@ -357,8 +357,9 @@ static void check_cpu_flag(const char *name, int flag)
>      int old_cpu_flag = state.cpu_flag;
>
>      flag |= old_cpu_flag;
> -    av_set_cpu_flags_mask(flag);
> -    state.cpu_flag = av_get_cpu_flags();
> +    av_force_cpu_flags(-1);
> +    state.cpu_flag = flag & av_get_cpu_flags();
> +    av_force_cpu_flags(state.cpu_flag);


Sounds like we do, right? So I guess it's fine.

(Although I never checked why we'd deprecate _mask or whether force is
better.)

Ronald


More information about the ffmpeg-devel mailing list