|
|
@ -968,10 +968,10 @@ AVFILTER_DEFINE_CLASS(rgbtestsrc); |
|
|
|
#define A 3 |
|
|
|
#define A 3 |
|
|
|
|
|
|
|
|
|
|
|
static void rgbtest_put_pixel(uint8_t *dst, int dst_linesize, |
|
|
|
static void rgbtest_put_pixel(uint8_t *dst, int dst_linesize, |
|
|
|
int x, int y, int r, int g, int b, enum AVPixelFormat fmt, |
|
|
|
int x, int y, unsigned r, unsigned g, unsigned b, enum AVPixelFormat fmt, |
|
|
|
uint8_t rgba_map[4]) |
|
|
|
uint8_t rgba_map[4]) |
|
|
|
{ |
|
|
|
{ |
|
|
|
int32_t v; |
|
|
|
uint32_t v; |
|
|
|
uint8_t *p; |
|
|
|
uint8_t *p; |
|
|
|
|
|
|
|
|
|
|
|
switch (fmt) { |
|
|
|
switch (fmt) { |
|
|
@ -991,7 +991,7 @@ static void rgbtest_put_pixel(uint8_t *dst, int dst_linesize, |
|
|
|
case AV_PIX_FMT_BGRA: |
|
|
|
case AV_PIX_FMT_BGRA: |
|
|
|
case AV_PIX_FMT_ARGB: |
|
|
|
case AV_PIX_FMT_ARGB: |
|
|
|
case AV_PIX_FMT_ABGR: |
|
|
|
case AV_PIX_FMT_ABGR: |
|
|
|
v = (r << (rgba_map[R]*8)) + (g << (rgba_map[G]*8)) + (b << (rgba_map[B]*8)) + (255 << (rgba_map[A]*8)); |
|
|
|
v = (r << (rgba_map[R]*8)) + (g << (rgba_map[G]*8)) + (b << (rgba_map[B]*8)) + (255U << (rgba_map[A]*8)); |
|
|
|
p = dst + 4*x + y*dst_linesize; |
|
|
|
p = dst + 4*x + y*dst_linesize; |
|
|
|
AV_WL32(p, v); |
|
|
|
AV_WL32(p, v); |
|
|
|
break; |
|
|
|
break; |
|
|
|