| @@ -746,6 +746,24 @@ static void read_uyva_UV_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *unused0, · 745 unmodified lines |
| 746 | 746 | } |
| 747 | 747 | } |
| 748 | 748 | |
| 749 | +static void vyuToY_c(uint8_t *dst, const uint8_t *src, const uint8_t *unused0, const uint8_t *unused1, int width, |
| 750 | + uint32_t *unused2, void *opq) |
| 751 | +{ |
| 752 | + int i; |
| 753 | + for (i = 0; i < width; i++) |
| 754 | + dst[i] = src[i * 3 + 1]; |
| 755 | +} |
| 756 | + |
| 757 | +static void vyuToUV_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *unused0, const uint8_t *src, |
| 758 | + const uint8_t *unused1, int width, uint32_t *unused2, void *opq) |
| 759 | +{ |
| 760 | + int i; |
| 761 | + for (i = 0; i < width; i++) { |
| 762 | + dstU[i] = src[i * 3 + 2]; |
| 763 | + dstV[i] = src[i * 3]; |
| 764 | + } |
| 765 | +} |
| 766 | + |
| 749 | 767 | static void read_xv30le_Y_c(uint8_t *dst, const uint8_t *src, const uint8_t *unused0, const uint8_t *unused1, int width, |
| 750 | 768 | uint32_t *unused2, void *opq) |
| 751 | 769 | { |
| @@ -1342,6 +1360,9 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c, · 590 unmodified lines |
| 1342 | 1360 | case AV_PIX_FMT_UYVY422: |
| 1343 | 1361 | *chrToYV12 = uyvyToUV_c; |
| 1344 | 1362 | break; |
| 1363 | + case AV_PIX_FMT_VYU444: |
| 1364 | + *chrToYV12 = vyuToUV_c; |
| 1365 | + break; |
| 1345 | 1366 | case AV_PIX_FMT_NV12: |
| 1346 | 1367 | case AV_PIX_FMT_NV16: |
| 1347 | 1368 | case AV_PIX_FMT_NV24: |
| @@ -1905,6 +1926,9 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c, · 557 unmodified lines |
| 1905 | 1926 | case AV_PIX_FMT_UYVY422: |
| 1906 | 1927 | *lumToYV12 = uyvyToY_c; |
| 1907 | 1928 | break; |
| 1929 | + case AV_PIX_FMT_VYU444: |
| 1930 | + *lumToYV12 = vyuToY_c; |
| 1931 | + break; |
| 1908 | 1932 | case AV_PIX_FMT_BGR24: |
| 1909 | 1933 | *lumToYV12 = bgr24ToY_c; |
| 1910 | 1934 | break; |