Unified · Split
| @@ -27,6 +27,16 @@ · 26 unmodified lines | |||
| 27 | 27 | ||
| 28 | #define H263_GOB_HEIGHT(h) ((h) <= 400 ? 1 : (h) <= 800 ? 2 : 4) | 28 | #define H263_GOB_HEIGHT(h) ((h) <= 400 ? 1 : (h) <= 800 ? 2 : 4) |
| 29 | 29 | ||
| 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 | |||
| 30 | av_const int ff_h263_aspect_to_info(AVRational aspect); | 40 | av_const int ff_h263_aspect_to_info(AVRational aspect); |
| 31 | int16_t *ff_h263_pred_motion(MpegEncContext * s, int block, int dir, | 41 | int16_t *ff_h263_pred_motion(MpegEncContext * s, int block, int dir, |
| 32 | int *px, int *py); | 42 | int *px, int *py); |
| @@ -32,6 +32,7 @@ · 31 unmodified lines | |||
| 32 | #include <limits.h> | 32 | #include <limits.h> |
| 33 | 33 | ||
| 34 | #include "avcodec.h" | 34 | #include "avcodec.h" |
| 35 | #include "h263.h" | ||
| 35 | #include "mathops.h" | 36 | #include "mathops.h" |
| 36 | #include "motion_est.h" | 37 | #include "motion_est.h" |
| 37 | #include "mpegutils.h" | 38 | #include "mpegutils.h" |
| @@ -106,16 +106,6 @@ typedef struct MotionEstContext { · 105 unmodified lines | |||
| 106 | int size, int h); | 106 | int size, int h); |
| 107 | } MotionEstContext; | 107 | } MotionEstContext; |
| 108 | 108 | ||
| 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 | |||
| 119 | /** | 109 | /** |
| 120 | * Performs one-time initialization of the MotionEstContext. | 110 | * Performs one-time initialization of the MotionEstContext. |
| 121 | */ | 111 | */ |
| @@ -32,6 +32,7 @@ · 31 unmodified lines | |||
| 32 | 32 | ||
| 33 | #include "avcodec.h" | 33 | #include "avcodec.h" |
| 34 | #include "decode.h" | 34 | #include "decode.h" |
| 35 | #include "h263.h" | ||
| 35 | #include "h264chroma.h" | 36 | #include "h264chroma.h" |
| 36 | #include "internal.h" | 37 | #include "internal.h" |
| 37 | #include "mpegutils.h" | 38 | #include "mpegutils.h" |
| @@ -29,6 +29,7 @@ · 28 unmodified lines | |||
| 29 | 29 | ||
| 30 | #include "avcodec.h" | 30 | #include "avcodec.h" |
| 31 | #include "h261.h" | 31 | #include "h261.h" |
| 32 | #include "h263.h" | ||
| 32 | #include "mpegutils.h" | 33 | #include "mpegutils.h" |
| 33 | #include "mpegvideo.h" | 34 | #include "mpegvideo.h" |
| 34 | #include "mpeg4videodec.h" | 35 | #include "mpeg4videodec.h" |