[FFmpeg-cvslog] avcodec: remove AVCodecContext.dsp_mask
Mans Rullgard
git at videolan.org
Sat Apr 21 23:24:50 CEST 2012
ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Fri Apr 20 14:31:08 2012 +0100| [95510be8c35753da8f48062b28b65e7acdab965f] | committer: Mans Rullgard
avcodec: remove AVCodecContext.dsp_mask
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 at mansr.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=95510be8c35753da8f48062b28b65e7acdab965f
---
libavcodec/avcodec.h | 12 +++++-------
libavcodec/pthread.c | 1 -
libavcodec/version.h | 3 +++
libavcodec/x86/dsputil_mmx.c | 7 -------
4 files changed, 8 insertions(+), 15 deletions(-)
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 92a5d0a..9e937d3 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2559,15 +2559,13 @@ typedef struct AVCodecContext {
#define FF_IDCT_SIMPLEALPHA 23
#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).
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index dc9220a..1889d2a 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -457,7 +457,6 @@ static int update_context_from_user(AVCodecContext *dst, AVCodecContext *src)
dst->release_buffer = src->release_buffer;
dst->opaque = src->opaque;
- dst->dsp_mask = src->dsp_mask;
dst->debug = src->debug;
dst->debug_mv = src->debug_mv;
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 58a228c..5119874 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -68,5 +68,8 @@
#ifndef FF_API_SUB_ID
#define FF_API_SUB_ID (LIBAVCODEC_VERSION_MAJOR < 55)
#endif
+#ifndef FF_API_DSP_MASK
+#define FF_API_DSP_MASK (LIBAVCODEC_VERSION_MAJOR < 55)
+#endif
#endif /* AVCODEC_VERSION_H */
diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c
index 192c5c3..6695caf 100644
--- a/libavcodec/x86/dsputil_mmx.c
+++ b/libavcodec/x86/dsputil_mmx.c
@@ -3103,13 +3103,6 @@ void ff_dsputil_init_mmx(DSPContext *c, AVCodecContext *avctx)
{
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
av_log(avctx, AV_LOG_INFO, "libavcodec: CPU flags:");
if (mm_flags & AV_CPU_FLAG_MMX)
More information about the ffmpeg-cvslog
mailing list