diff options
author | hwrenx <hwrenx@126.com> | 2018-12-03 14:37:05 +0800 |
---|---|---|
committer | Steven Liu <lq@chinaffmpeg.org> | 2018-12-03 14:37:05 +0800 |
commit | 701cbbb58c76dbaa5c4e346e575cc3021d78fb02 (patch) | |
tree | a364b62919fc9cb9e7fec10fab036ebb494f3c7f /libavcodec/libdavs2.c | |
parent | 4bbb6d1ae9e6ae839c2cc1f8a7bb1afc2b1be984 (diff) | |
download | ffmpeg-701cbbb58c76dbaa5c4e346e575cc3021d78fb02.tar.gz |
libdavs2: update api version and enable avx option
Signed-off-by: hwrenx <hwrenx@126.com>
Diffstat (limited to 'libavcodec/libdavs2.c')
-rw-r--r-- | libavcodec/libdavs2.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/libdavs2.c b/libavcodec/libdavs2.c index 3da1498208..7fdafdab81 100644 --- a/libavcodec/libdavs2.c +++ b/libavcodec/libdavs2.c @@ -40,11 +40,14 @@ typedef struct DAVS2Context { static av_cold int davs2_init(AVCodecContext *avctx) { DAVS2Context *cad = avctx->priv_data; + int cpu_flags = av_get_cpu_flags(); /* init the decoder */ cad->param.threads = avctx->thread_count; cad->param.info_level = 0; cad->decoder = davs2_decoder_open(&cad->param); + cad->param.disable_avx = !(cpu_flags & AV_CPU_FLAG_AVX && + cpu_flags & AV_CPU_FLAG_AVX2); if (!cad->decoder) { av_log(avctx, AV_LOG_ERROR, "decoder created error."); |