This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 5315d121394bba92fc8f65ad9a8481e6e8b27944
Author:     Andreas Rheinhardt <[email protected]>
AuthorDate: Fri Feb 27 08:31:05 2026 +0100
Commit:     Andreas Rheinhardt <[email protected]>
CommitDate: Mon Mar 2 12:01:15 2026 +0100

    avcodec/encode: Don't issue emms after encode callback
    
    It is no longer necessary: Most encoders don't use any MMX code
    at all any more and the ones that do issue emms on their own.
    Instead add an ff_asser1_fpu() to check that it stays that way.
    
    To add some more information, only the halfpel (and fullpel),
    qpel and motion estimation APIs use MMX in addition to the
    SBC and Snow specific dsp code. halfpel is used by the
    mpegvideo encoders, SVQ1 and Snow encoders. The same
    encoders in addition to the AC-3 ones and dvvideo use me_cmp.
    qpel is only used by the MPEG4 encoder which is part of
    mpegvideo. None of these codecs need the generic emms_c (even on
    errors):
    
    a) The AC-3 encoders only use a width 16 me_cmp function which
    can no longer use MMX since d91b1559e0f61b7ee486c46854013d6c9ddb3e84.
    b) dvvideo and SBC emit emms on their own and have no error paths
    after the start of the part that can use MMX.
    c) SVQ1 calls emms_c() on its own, even on all error paths
    that need it.
    d) Snow calls emms_c() on its ordinary (success) return path;
    it has only one error path in the part of the code that uses MMX,
    but even it is fine as ratecontrol_1pass() always calls emms_c()
    itself.
    e) For mpegvideo, the MMX code is almost confined to the part
    of the code reachable from the worker threads (if slice threading
    is in use). The exception to this is in skip_check() which always
    calls emms_c() itself. Because encode_picture() always calls
    emms_c() itself after executing the worker threads and before any
    error condition, the floating point state is clean upon exit from
    encode_picture().
    
    Signed-off-by: Andreas Rheinhardt <[email protected]>
---
 libavcodec/encode.c  | 2 +-
 libavcodec/version.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/encode.c b/libavcodec/encode.c
index 407bd8920f..f1a65a9b23 100644
--- a/libavcodec/encode.c
+++ b/libavcodec/encode.c
@@ -236,7 +236,7 @@ int ff_encode_encode_cb(AVCodecContext *avctx, AVPacket 
*avpkt,
     int ret;
 
     ret = codec->cb.encode(avctx, avpkt, frame, got_packet);
-    emms_c();
+    ff_assert1_fpu();
     av_assert0(ret <= 0);
 
     if (!ret && *got_packet) {
diff --git a/libavcodec/version.h b/libavcodec/version.h
index e0fe2eb7b8..906d0518e4 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -30,7 +30,7 @@
 #include "version_major.h"
 
 #define LIBAVCODEC_VERSION_MINOR  24
-#define LIBAVCODEC_VERSION_MICRO 100
+#define LIBAVCODEC_VERSION_MICRO 101
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
                                                LIBAVCODEC_VERSION_MINOR, \

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to