| @@ -945,8 +945,9 @@ static void nv21ToUV_c(uint8_t *dstU, uint8_t *dstV, · 944 unmodified lines |
| 945 | nvXXtoUV_c(dstV, dstU, src1, width); | 945 | nvXXtoUV_c(dstV, dstU, src1, width); |
| 946 | } | 946 | } |
| 947 | | 947 | |
| 948 | #define p01x_uv_wrapper(bits, shift) \ | 948 | #define p01x_uv_wrapper(fmt, shift) \ |
| 949 | static void p0 ## bits ## LEToUV_c(uint8_t *dstU, uint8_t *dstV, \ | 949 | static void fmt ## LEToUV ## _c(uint8_t *dstU, \ |
| | 950 | uint8_t *dstV, \ |
| 950 | const uint8_t *unused0, \ | 951 | const uint8_t *unused0, \ |
| 951 | const uint8_t *src1, \ | 952 | const uint8_t *src1, \ |
| 952 | const uint8_t *src2, int width, \ | 953 | const uint8_t *src2, int width, \ |
| @@ -959,7 +960,8 @@ static void nv21ToUV_c(uint8_t *dstU, uint8_t *dstV, · 6 unmodified lines |
| 959 | } \ | 960 | } \ |
| 960 | } \ | 961 | } \ |
| 961 | \ | 962 | \ |
| 962 | static void p0 ## bits ## BEToUV_c(uint8_t *dstU, uint8_t *dstV, \ | 963 | static void fmt ## BEToUV ## _c(uint8_t *dstU, \ |
| | 964 | uint8_t *dstV, \ |
| 963 | const uint8_t *unused0, \ | 965 | const uint8_t *unused0, \ |
| 964 | const uint8_t *src1, \ | 966 | const uint8_t *src1, \ |
| 965 | const uint8_t *src2, int width, \ | 967 | const uint8_t *src2, int width, \ |
| @@ -972,8 +974,9 @@ static void nv21ToUV_c(uint8_t *dstU, uint8_t *dstV, · 6 unmodified lines |
| 972 | } \ | 974 | } \ |
| 973 | } | 975 | } |
| 974 | | 976 | |
| 975 | #define p01x_wrapper(bits, shift) \ | 977 | #define p01x_wrapper(fmt, shift) \ |
| 976 | static void p0 ## bits ## LEToY_c(uint8_t *dst, const uint8_t *src, \ | 978 | static void fmt ## LEToY ## _c(uint8_t *dst, \ |
| | 979 | const uint8_t *src, \ |
| 977 | const uint8_t *unused1, \ | 980 | const uint8_t *unused1, \ |
| 978 | const uint8_t *unused2, int width, \ | 981 | const uint8_t *unused2, int width, \ |
| 979 | uint32_t *unused, void *opq) \ | 982 | uint32_t *unused, void *opq) \ |
| @@ -984,7 +987,8 @@ static void nv21ToUV_c(uint8_t *dstU, uint8_t *dstV, · 4 unmodified lines |
| 984 | } \ | 987 | } \ |
| 985 | } \ | 988 | } \ |
| 986 | \ | 989 | \ |
| 987 | static void p0 ## bits ## BEToY_c(uint8_t *dst, const uint8_t *src, \ | 990 | static void fmt ## BEToY ## _c(uint8_t *dst, \ |
| | 991 | const uint8_t *src, \ |
| 988 | const uint8_t *unused1, \ | 992 | const uint8_t *unused1, \ |
| 989 | const uint8_t *unused2, int width, \ | 993 | const uint8_t *unused2, int width, \ |
| 990 | uint32_t *unused, void *opq) \ | 994 | uint32_t *unused, void *opq) \ |
| @@ -994,11 +998,12 @@ static void nv21ToUV_c(uint8_t *dstU, uint8_t *dstV, · 3 unmodified lines |
| 994 | AV_WN16(dst + i * 2, AV_RB16(src + i * 2) >> shift); \ | 998 | AV_WN16(dst + i * 2, AV_RB16(src + i * 2) >> shift); \ |
| 995 | } \ | 999 | } \ |
| 996 | } \ | 1000 | } \ |
| 997 | p01x_uv_wrapper(bits, shift) | 1001 | p01x_uv_wrapper(fmt, shift) |
| 998 | | 1002 | |
| 999 | p01x_wrapper(10, 6) | 1003 | p01x_wrapper(nv20, 0) |
| 1000 | p01x_wrapper(12, 4) | 1004 | p01x_wrapper(p010, 6) |
| 1001 | p01x_uv_wrapper(16, 0) | 1005 | p01x_wrapper(p012, 4) |
| | 1006 | p01x_uv_wrapper(p016, 0) |
| 1002 | | 1007 | |
| 1003 | static void bgr24ToY_c(uint8_t *_dst, const uint8_t *src, const uint8_t *unused1, const uint8_t *unused2, | 1008 | static void bgr24ToY_c(uint8_t *_dst, const uint8_t *src, const uint8_t *unused1, const uint8_t *unused2, |
| 1004 | int width, uint32_t *rgb2yuv, void *opq) | 1009 | int width, uint32_t *rgb2yuv, void *opq) |
| @@ -1910,11 +1915,17 @@ av_cold void ff_sws_init_input_funcs(SwsInternal *c, · 905 unmodified lines |
| 1910 | case AV_PIX_FMT_XV48BE: | 1915 | case AV_PIX_FMT_XV48BE: |
| 1911 | *chrToYV12 = read_xv48be_UV_c; | 1916 | *chrToYV12 = read_xv48be_UV_c; |
| 1912 | break; | 1917 | break; |
| | 1918 | case AV_PIX_FMT_NV20LE: |
| | 1919 | *chrToYV12 = nv20LEToUV_c; |
| | 1920 | break; |
| 1913 | case AV_PIX_FMT_P010LE: | 1921 | case AV_PIX_FMT_P010LE: |
| 1914 | case AV_PIX_FMT_P210LE: | 1922 | case AV_PIX_FMT_P210LE: |
| 1915 | case AV_PIX_FMT_P410LE: | 1923 | case AV_PIX_FMT_P410LE: |
| 1916 | *chrToYV12 = p010LEToUV_c; | 1924 | *chrToYV12 = p010LEToUV_c; |
| 1917 | break; | 1925 | break; |
| | 1926 | case AV_PIX_FMT_NV20BE: |
| | 1927 | *chrToYV12 = nv20BEToUV_c; |
| | 1928 | break; |
| 1918 | case AV_PIX_FMT_P010BE: | 1929 | case AV_PIX_FMT_P010BE: |
| 1919 | case AV_PIX_FMT_P210BE: | 1930 | case AV_PIX_FMT_P210BE: |
| 1920 | case AV_PIX_FMT_P410BE: | 1931 | case AV_PIX_FMT_P410BE: |
| @@ -2468,11 +2479,17 @@ av_cold void ff_sws_init_input_funcs(SwsInternal *c, · 547 unmodified lines |
| 2468 | case AV_PIX_FMT_BGRA64LE: | 2479 | case AV_PIX_FMT_BGRA64LE: |
| 2469 | *lumToYV12 = bgr64LEToY_c; | 2480 | *lumToYV12 = bgr64LEToY_c; |
| 2470 | break; | 2481 | break; |
| | 2482 | case AV_PIX_FMT_NV20LE: |
| | 2483 | *lumToYV12 = nv20LEToY_c; |
| | 2484 | break; |
| 2471 | case AV_PIX_FMT_P010LE: | 2485 | case AV_PIX_FMT_P010LE: |
| 2472 | case AV_PIX_FMT_P210LE: | 2486 | case AV_PIX_FMT_P210LE: |
| 2473 | case AV_PIX_FMT_P410LE: | 2487 | case AV_PIX_FMT_P410LE: |
| 2474 | *lumToYV12 = p010LEToY_c; | 2488 | *lumToYV12 = p010LEToY_c; |
| 2475 | break; | 2489 | break; |
| | 2490 | case AV_PIX_FMT_NV20BE: |
| | 2491 | *lumToYV12 = nv20BEToY_c; |
| | 2492 | break; |
| 2476 | case AV_PIX_FMT_P010BE: | 2493 | case AV_PIX_FMT_P010BE: |
| 2477 | case AV_PIX_FMT_P210BE: | 2494 | case AV_PIX_FMT_P210BE: |
| 2478 | case AV_PIX_FMT_P410BE: | 2495 | case AV_PIX_FMT_P410BE: |