]> git.sesse.net Git - ffmpeg/blobdiff - libswscale/yuv2rgb.c
avcodec/Makefile: Remove obsolete dependency of eatqi dec on rl.o
[ffmpeg] / libswscale / yuv2rgb.c
index 71d4b90baa75c017289fda77c5cb923b60493cf1..6a3956e8e29b5e3a56d604f3ec866a18523853aa 100644 (file)
@@ -793,7 +793,8 @@ av_cold int ff_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4],
                         c->dstFormat == AV_PIX_FMT_NE(RGB444LE, RGB444BE) ||
                         c->dstFormat == AV_PIX_FMT_NE(BGR565LE, BGR565BE) ||
                         c->dstFormat == AV_PIX_FMT_NE(BGR555LE, BGR555BE) ||
-                        c->dstFormat == AV_PIX_FMT_NE(BGR444LE, BGR444BE);
+                        c->dstFormat == AV_PIX_FMT_NE(BGR444LE, BGR444BE) ||
+                        c->dstFormat == AV_PIX_FMT_NE(X2RGB10LE, X2RGB10BE);
     const int bpp = c->dstFormatBpp;
     uint8_t *y_table;
     uint16_t *y_table16;
@@ -982,6 +983,10 @@ av_cold int ff_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4],
             y_table32[i + 2 * table_plane_size] = yval << bbase;
             yb += cy;
         }
+        if (isNotNe) {
+            for (i = 0; i < table_plane_size * 3; i++)
+                y_table32[i] = av_bswap32(y_table32[i]);
+        }
         fill_table(c->table_rV, 4, crv, y_table32 + yoffs);
         fill_table(c->table_gU, 4, cgu, y_table32 + yoffs + table_plane_size);
         fill_table(c->table_bU, 4, cbu, y_table32 + yoffs + 2 * table_plane_size);