Move opts/ into util/opts/

This commit is contained in:
Kamil Trzcinski
2022-09-02 22:00:01 +02:00
parent 9a592fb00e
commit f5726fc9b2
34 changed files with 48 additions and 48 deletions

21
util/opts/fourcc.c Normal file
View File

@ -0,0 +1,21 @@
#include "fourcc.h"
fourcc_string fourcc_to_string(unsigned format)
{
fourcc_string fourcc;
char *ptr = fourcc.buf;
*ptr++ = format & 0x7F;
*ptr++ = (format >> 8) & 0x7F;
*ptr++ = (format >> 16) & 0x7F;
*ptr++ = (format >> 24) & 0x7F;
if (format & ((unsigned)1 << 31)) {
*ptr++ = '-';
*ptr++ = 'B';
*ptr++ = 'E';
*ptr++ = '\0';
} else {
*ptr++ = '\0';
}
*ptr++ = 0;
return fourcc;
}