|
|
@ -517,15 +517,14 @@ int ff_draw_round_to_sub(FFDrawContext *draw, int sub_dir, int round_dir, |
|
|
|
|
|
|
|
|
|
|
|
AVFilterFormats *ff_draw_supported_pixel_formats(unsigned flags) |
|
|
|
AVFilterFormats *ff_draw_supported_pixel_formats(unsigned flags) |
|
|
|
{ |
|
|
|
{ |
|
|
|
enum AVPixelFormat i, pix_fmts[AV_PIX_FMT_NB + 1]; |
|
|
|
enum AVPixelFormat i; |
|
|
|
unsigned n = 0; |
|
|
|
|
|
|
|
FFDrawContext draw; |
|
|
|
FFDrawContext draw; |
|
|
|
|
|
|
|
AVFilterFormats *fmts = NULL; |
|
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < AV_PIX_FMT_NB; i++) |
|
|
|
for (i = 0; av_pix_fmt_desc_get(i); i++) |
|
|
|
if (ff_draw_init(&draw, i, flags) >= 0) |
|
|
|
if (ff_draw_init(&draw, i, flags) >= 0) |
|
|
|
pix_fmts[n++] = i; |
|
|
|
ff_add_format(&fmts, i); |
|
|
|
pix_fmts[n++] = AV_PIX_FMT_NONE; |
|
|
|
return fmts; |
|
|
|
return ff_make_format_list(pix_fmts); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#ifdef TEST |
|
|
|
#ifdef TEST |
|
|
@ -540,7 +539,7 @@ int main(void) |
|
|
|
FFDrawColor color; |
|
|
|
FFDrawColor color; |
|
|
|
int r, i; |
|
|
|
int r, i; |
|
|
|
|
|
|
|
|
|
|
|
for (f = 0; f < AV_PIX_FMT_NB; f++) { |
|
|
|
for (f = 0; av_pix_fmt_desc_get(f); f++) { |
|
|
|
desc = av_pix_fmt_desc_get(f); |
|
|
|
desc = av_pix_fmt_desc_get(f); |
|
|
|
if (!desc->name) |
|
|
|
if (!desc->name) |
|
|
|
continue; |
|
|
|
continue; |
|
|
|