ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@outlook.com> | 
Wed Mar 19 13:26:37 2025 +0100| [35fecd3e6866448ab646cdd1d60fe1cca7327693] | 
committer: Andreas Rheinhardt

avcodec/motion_est: Move ff_h263_round_chroma() to h263.h

Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=35fecd3e6866448ab646cdd1d60fe1cca7327693
---

 libavcodec/h263.h             | 10 ++++++++++
 libavcodec/motion_est.c       |  1 +
 libavcodec/motion_est.h       | 10 ----------
 libavcodec/mpegvideo_dec.c    |  1 +
 libavcodec/mpegvideo_motion.c |  1 +
 5 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/libavcodec/h263.h b/libavcodec/h263.h
index 27a5f31c59..59f937070e 100644
--- a/libavcodec/h263.h
+++ b/libavcodec/h263.h
@@ -27,6 +27,16 @@
 
 #define H263_GOB_HEIGHT(h) ((h) <= 400 ? 1 : (h) <= 800 ? 2 : 4)
 
+static inline int ff_h263_round_chroma(int x)
+{
+    //FIXME static or not?
+    static const uint8_t h263_chroma_roundtab[16] = {
+    //  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+        0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1,
+    };
+    return h263_chroma_roundtab[x & 0xf] + (x >> 3);
+}
+
 av_const int ff_h263_aspect_to_info(AVRational aspect);
 int16_t *ff_h263_pred_motion(MpegEncContext * s, int block, int dir,
                              int *px, int *py);
diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c
index 4fd773aa14..e8c0e880bf 100644
--- a/libavcodec/motion_est.c
+++ b/libavcodec/motion_est.c
@@ -32,6 +32,7 @@
 #include <limits.h>
 
 #include "avcodec.h"
+#include "h263.h"
 #include "mathops.h"
 #include "motion_est.h"
 #include "mpegutils.h"
diff --git a/libavcodec/motion_est.h b/libavcodec/motion_est.h
index 16975abfe1..fe3d61fafb 100644
--- a/libavcodec/motion_est.h
+++ b/libavcodec/motion_est.h
@@ -106,16 +106,6 @@ typedef struct MotionEstContext {
                              int size, int h);
 } MotionEstContext;
 
-static inline int ff_h263_round_chroma(int x)
-{
-    //FIXME static or not?
-    static const uint8_t h263_chroma_roundtab[16] = {
-    //  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
-        0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1,
-    };
-    return h263_chroma_roundtab[x & 0xf] + (x >> 3);
-}
-
 /**
  * Performs one-time initialization of the MotionEstContext.
  */
diff --git a/libavcodec/mpegvideo_dec.c b/libavcodec/mpegvideo_dec.c
index 8c84b59c5e..4019b4f0da 100644
--- a/libavcodec/mpegvideo_dec.c
+++ b/libavcodec/mpegvideo_dec.c
@@ -32,6 +32,7 @@
 
 #include "avcodec.h"
 #include "decode.h"
+#include "h263.h"
 #include "h264chroma.h"
 #include "internal.h"
 #include "mpegutils.h"
diff --git a/libavcodec/mpegvideo_motion.c b/libavcodec/mpegvideo_motion.c
index 6e9368dd9c..edc4931092 100644
--- a/libavcodec/mpegvideo_motion.c
+++ b/libavcodec/mpegvideo_motion.c
@@ -29,6 +29,7 @@
 
 #include "avcodec.h"
 #include "h261.h"
+#include "h263.h"
 #include "mpegutils.h"
 #include "mpegvideo.h"
 #include "mpeg4videodec.h"

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to