This removes all references to AVCodecContext.dsp_mask and marks it for eviction at the next version bump. It has been superseded by av_set_cpu_flag_mask() which, unlike this field, works everywhere. Signed-off-by: Mans Rullgard <mans@mansr.com>tags/n0.11
| @@ -2559,15 +2559,13 @@ typedef struct AVCodecContext { | |||||
| #define FF_IDCT_SIMPLEALPHA 23 | #define FF_IDCT_SIMPLEALPHA 23 | ||||
| #define FF_IDCT_BINK 24 | #define FF_IDCT_BINK 24 | ||||
| #if FF_API_DSP_MASK | |||||
| /** | /** | ||||
| * dsp_mask could be add used to disable unwanted CPU features | |||||
| * CPU features (i.e. MMX, SSE. ...) | |||||
| * | |||||
| * With the FORCE flag you may instead enable given CPU features. | |||||
| * (Dangerous: Usable in case of misdetection, improper usage however will | |||||
| * result into program crash.) | |||||
| * Unused. | |||||
| * @deprecated use av_set_cpu_flags_mask() instead. | |||||
| */ | */ | ||||
| unsigned dsp_mask; | |||||
| attribute_deprecated unsigned dsp_mask; | |||||
| #endif | |||||
| /** | /** | ||||
| * bits per sample/pixel from the demuxer (needed for huffyuv). | * bits per sample/pixel from the demuxer (needed for huffyuv). | ||||
| @@ -457,7 +457,6 @@ static int update_context_from_user(AVCodecContext *dst, AVCodecContext *src) | |||||
| dst->release_buffer = src->release_buffer; | dst->release_buffer = src->release_buffer; | ||||
| dst->opaque = src->opaque; | dst->opaque = src->opaque; | ||||
| dst->dsp_mask = src->dsp_mask; | |||||
| dst->debug = src->debug; | dst->debug = src->debug; | ||||
| dst->debug_mv = src->debug_mv; | dst->debug_mv = src->debug_mv; | ||||
| @@ -68,5 +68,8 @@ | |||||
| #ifndef FF_API_SUB_ID | #ifndef FF_API_SUB_ID | ||||
| #define FF_API_SUB_ID (LIBAVCODEC_VERSION_MAJOR < 55) | #define FF_API_SUB_ID (LIBAVCODEC_VERSION_MAJOR < 55) | ||||
| #endif | #endif | ||||
| #ifndef FF_API_DSP_MASK | |||||
| #define FF_API_DSP_MASK (LIBAVCODEC_VERSION_MAJOR < 55) | |||||
| #endif | |||||
| #endif /* AVCODEC_VERSION_H */ | #endif /* AVCODEC_VERSION_H */ | ||||
| @@ -3103,13 +3103,6 @@ void ff_dsputil_init_mmx(DSPContext *c, AVCodecContext *avctx) | |||||
| { | { | ||||
| int mm_flags = av_get_cpu_flags(); | int mm_flags = av_get_cpu_flags(); | ||||
| if (avctx->dsp_mask) { | |||||
| if (avctx->dsp_mask & AV_CPU_FLAG_FORCE) | |||||
| mm_flags |= avctx->dsp_mask & 0xffff; | |||||
| else | |||||
| mm_flags &= ~(avctx->dsp_mask & 0xffff); | |||||
| } | |||||
| #if 0 | #if 0 | ||||
| av_log(avctx, AV_LOG_INFO, "libavcodec: CPU flags:"); | av_log(avctx, AV_LOG_INFO, "libavcodec: CPU flags:"); | ||||
| if (mm_flags & AV_CPU_FLAG_MMX) | if (mm_flags & AV_CPU_FLAG_MMX) | ||||