23 #ifndef AVCODEC_MOTIONPIXELS_TABLEGEN_H
24 #define AVCODEC_MOTIONPIXELS_TABLEGEN_H
36 r = (1000 * y + 701 * v) / 1000;
37 g = (1000 * y - 357 * v - 172 * u) / 1000;
38 b = (1000 * y + 886 * u) / 1000;
40 return ((cm[r * 8] & 0xF8) << 7) | ((cm[g * 8] & 0xF8) << 2) | (cm[b * 8] >> 3);
41 if ((
unsigned)r < 32 && (unsigned)g < 32 && (
unsigned)b < 32)
42 return (r << 10) | (g << 5) | b;
46 #if CONFIG_HARDCODED_TABLES
47 #define motionpixels_tableinit()
48 #include "libavcodec/motionpixels_tables.h"
56 for (i = 0; i < 31; ++i) {
57 for (j = 31; j > i; --j)
58 if (!(p[j].u | p[j].v | p[j].y))
60 for (j = 0; j < 31 - i; ++j)
61 if (!(p[j].u | p[j].v | p[j].y))
70 for (y = 0; y <= 31; ++y)
71 for (v = -31; v <= 31; ++v)
72 for (u = -31; u <= 31; ++u) {
74 if (i < (1 << 15) && !(p[i].u | p[i].v | p[i].y)) {
80 for (i = 0; i < 1024; ++i)
86 if (!mp_rgb_yuv_table[0].u)