1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

sws/tests/pixdesc_query: sort pixel formats

This commit is contained in:
Clément Bœsch 2017-03-23 23:32:35 +01:00
parent ca23d3491d
commit d2c70fc887
2 changed files with 700 additions and 689 deletions

View File

@ -18,6 +18,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#include <stdlib.h>
#include "libavutil/mem.h" #include "libavutil/mem.h"
#include "libswscale/swscale_internal.h" #include "libswscale/swscale_internal.h"
@ -44,6 +46,13 @@ static const struct {
{"usePal", usePal}, {"usePal", usePal},
}; };
static int cmp_str(const void *a, const void *b)
{
const char *s1 = *(const char **)a;
const char *s2 = *(const char **)b;
return strcmp(s1, s2);
}
int main(void) int main(void)
{ {
int i, j; int i, j;
@ -60,6 +69,8 @@ int main(void)
} }
if (pix_fmts) { if (pix_fmts) {
qsort(pix_fmts, nb_pix_fmts, sizeof(*pix_fmts), cmp_str);
printf("%s:\n", query_tab[i].class); printf("%s:\n", query_tab[i].class);
for (j = 0; j < nb_pix_fmts; j++) for (j = 0; j < nb_pix_fmts; j++)
printf(" %s\n", pix_fmts[j]); printf(" %s\n", pix_fmts[j]);

File diff suppressed because it is too large Load Diff