sws/tests/pixdesc_query: replace rgb based pix fmts with endianess agnostic names

Fixes ticket #6554
This commit is contained in:
Clément Bœsch
2017-03-24 00:51:32 +01:00
parent d2c70fc887
commit 4158fba3cd
2 changed files with 33 additions and 26 deletions

View File

@@ -64,8 +64,15 @@ int main(void)
while ((pix_desc = av_pix_fmt_desc_next(pix_desc))) {
enum AVPixelFormat pix_fmt = av_pix_fmt_desc_get_id(pix_desc);
if (query_tab[i].cond(pix_fmt))
av_dynarray_add(&pix_fmts, &nb_pix_fmts, (void *)pix_desc->name);
if (query_tab[i].cond(pix_fmt)) {
const char *pix_name = pix_desc->name;
if (pix_fmt == AV_PIX_FMT_RGB32) pix_name = "rgb32";
else if (pix_fmt == AV_PIX_FMT_RGB32_1) pix_name = "rgb32_1";
else if (pix_fmt == AV_PIX_FMT_BGR32) pix_name = "bgr32";
else if (pix_fmt == AV_PIX_FMT_BGR32_1) pix_name = "bgr32_1";
av_dynarray_add(&pix_fmts, &nb_pix_fmts, (void *)pix_name);
}
}
if (pix_fmts) {