mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
huffyuv: avoid duplicated defines
Move the defines to the dsp header. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
4991eacc06
commit
c609f803e1
@ -45,18 +45,6 @@
|
|||||||
#define MAX_N (1<<MAX_BITS)
|
#define MAX_N (1<<MAX_BITS)
|
||||||
#define MAX_VLC_N 16384
|
#define MAX_VLC_N 16384
|
||||||
|
|
||||||
#if HAVE_BIGENDIAN
|
|
||||||
#define B 3
|
|
||||||
#define G 2
|
|
||||||
#define R 1
|
|
||||||
#define A 0
|
|
||||||
#else
|
|
||||||
#define B 0
|
|
||||||
#define G 1
|
|
||||||
#define R 2
|
|
||||||
#define A 3
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef enum Predictor {
|
typedef enum Predictor {
|
||||||
LEFT = 0,
|
LEFT = 0,
|
||||||
PLANE,
|
PLANE,
|
||||||
|
@ -81,17 +81,6 @@ static int add_hfyu_left_pred_c(uint8_t *dst, const uint8_t *src, int w,
|
|||||||
return acc;
|
return acc;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_BIGENDIAN
|
|
||||||
#define B 3
|
|
||||||
#define G 2
|
|
||||||
#define R 1
|
|
||||||
#define A 0
|
|
||||||
#else
|
|
||||||
#define B 0
|
|
||||||
#define G 1
|
|
||||||
#define R 2
|
|
||||||
#define A 3
|
|
||||||
#endif
|
|
||||||
static void add_hfyu_left_pred_bgr32_c(uint8_t *dst, const uint8_t *src,
|
static void add_hfyu_left_pred_bgr32_c(uint8_t *dst, const uint8_t *src,
|
||||||
int w, int *red, int *green,
|
int w, int *red, int *green,
|
||||||
int *blue, int *alpha)
|
int *blue, int *alpha)
|
||||||
@ -115,10 +104,6 @@ static void add_hfyu_left_pred_bgr32_c(uint8_t *dst, const uint8_t *src,
|
|||||||
*blue = b;
|
*blue = b;
|
||||||
*alpha = a;
|
*alpha = a;
|
||||||
}
|
}
|
||||||
#undef B
|
|
||||||
#undef G
|
|
||||||
#undef R
|
|
||||||
#undef A
|
|
||||||
|
|
||||||
av_cold void ff_huffyuvdsp_init(HuffYUVDSPContext *c)
|
av_cold void ff_huffyuvdsp_init(HuffYUVDSPContext *c)
|
||||||
{
|
{
|
||||||
|
@ -21,6 +21,18 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#if HAVE_BIGENDIAN
|
||||||
|
#define B 3
|
||||||
|
#define G 2
|
||||||
|
#define R 1
|
||||||
|
#define A 0
|
||||||
|
#else
|
||||||
|
#define B 0
|
||||||
|
#define G 1
|
||||||
|
#define R 2
|
||||||
|
#define A 3
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct HuffYUVDSPContext {
|
typedef struct HuffYUVDSPContext {
|
||||||
void (*add_bytes)(uint8_t *dst /* align 16 */, uint8_t *src /* align 16 */,
|
void (*add_bytes)(uint8_t *dst /* align 16 */, uint8_t *src /* align 16 */,
|
||||||
int w);
|
int w);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user