History

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

Andreas Rheinhardt committed 1 year ago

Commit 35fecd31 parent ec6c8e55 files · +13 −10Browse files

Unified · Split

5 files
  1. libavcodec/h263.h +10 −0
  2. libavcodec/motion_est.c +1 −0
  3. libavcodec/motion_est.h +0 −10
  4. libavcodec/mpegvideo_dec.c +1 −0
  5. libavcodec/mpegvideo_motion.c +1 −0
libavcodec/h263.h+10−0
@@ -27,6 +27,16 @@ · 26 unmodified lines
2727
2828 #define H263_GOB_HEIGHT(h) ((h) <= 400 ? 1 : (h) <= 800 ? 2 : 4)
2929
30+static inline int ff_h263_round_chroma(int x)
31+{
32+ //FIXME static or not?
33+ static const uint8_t h263_chroma_roundtab[16] = {
34+ // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
35+ 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1,
36+ };
37+ return h263_chroma_roundtab[x & 0xf] + (x >> 3);
38+}
39+
3040 av_const int ff_h263_aspect_to_info(AVRational aspect);
3141 int16_t *ff_h263_pred_motion(MpegEncContext * s, int block, int dir,
3242 int *px, int *py);
libavcodec/motion_est.c+1−0
@@ -32,6 +32,7 @@ · 31 unmodified lines
3232 #include <limits.h>
3333
3434 #include "avcodec.h"
35+#include "h263.h"
3536 #include "mathops.h"
3637 #include "motion_est.h"
3738 #include "mpegutils.h"
libavcodec/motion_est.h+0−10
@@ -106,16 +106,6 @@ typedef struct MotionEstContext { · 105 unmodified lines
106106 int size, int h);
107107 } MotionEstContext;
108108
109−static inline int ff_h263_round_chroma(int x)
110−{
111− //FIXME static or not?
112− static const uint8_t h263_chroma_roundtab[16] = {
113− // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
114− 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1,
115− };
116− return h263_chroma_roundtab[x & 0xf] + (x >> 3);
117−}
118−
119109 /**
120110 * Performs one-time initialization of the MotionEstContext.
121111 */
libavcodec/mpegvideo_dec.c+1−0
@@ -32,6 +32,7 @@ · 31 unmodified lines
3232
3333 #include "avcodec.h"
3434 #include "decode.h"
35+#include "h263.h"
3536 #include "h264chroma.h"
3637 #include "internal.h"
3738 #include "mpegutils.h"
libavcodec/mpegvideo_motion.c+1−0
@@ -29,6 +29,7 @@ · 28 unmodified lines
2929
3030 #include "avcodec.h"
3131 #include "h261.h"
32+#include "h263.h"
3233 #include "mpegutils.h"
3334 #include "mpegvideo.h"
3435 #include "mpeg4videodec.h"

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t