Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
... | ... |
@@ -674,12 +674,248 @@ YUV2PACKEDWRAPPER(yuv2, 422, uyvy422, AV_PIX_FMT_UYVY422) |
674 | 674 |
} |
675 | 675 |
|
676 | 676 |
static av_always_inline void |
677 |
+yuv2rgba64_X_c_template(SwsContext *c, const int16_t *lumFilter, |
|
678 |
+ const int32_t **lumSrc, int lumFilterSize, |
|
679 |
+ const int16_t *chrFilter, const int32_t **chrUSrc, |
|
680 |
+ const int32_t **chrVSrc, int chrFilterSize, |
|
681 |
+ const int32_t **alpSrc, uint16_t *dest, int dstW, |
|
682 |
+ int y, enum AVPixelFormat target, int hasAlpha) |
|
683 |
+{ |
|
684 |
+ int i; |
|
685 |
+ |
|
686 |
+ for (i = 0; i < ((dstW + 1) >> 1); i++) { |
|
687 |
+ int j, A1 = 0, A2 = 0; |
|
688 |
+ int Y1 = -0x40000000; |
|
689 |
+ int Y2 = -0x40000000; |
|
690 |
+ int U = -128 << 23; // 19 |
|
691 |
+ int V = -128 << 23; |
|
692 |
+ int R, G, B; |
|
693 |
+ |
|
694 |
+ for (j = 0; j < lumFilterSize; j++) { |
|
695 |
+ Y1 += lumSrc[j][i * 2] * (unsigned)lumFilter[j]; |
|
696 |
+ Y2 += lumSrc[j][i * 2 + 1] * (unsigned)lumFilter[j]; |
|
697 |
+ } |
|
698 |
+ for (j = 0; j < chrFilterSize; j++) {; |
|
699 |
+ U += chrUSrc[j][i] * (unsigned)chrFilter[j]; |
|
700 |
+ V += chrVSrc[j][i] * (unsigned)chrFilter[j]; |
|
701 |
+ } |
|
702 |
+ |
|
703 |
+ if (hasAlpha) { |
|
704 |
+ A1 = -0x40000000; |
|
705 |
+ A2 = -0x40000000; |
|
706 |
+ for (j = 0; j < lumFilterSize; j++) { |
|
707 |
+ A1 += alpSrc[j][i * 2] * (unsigned)lumFilter[j]; |
|
708 |
+ A2 += alpSrc[j][i * 2 + 1] * (unsigned)lumFilter[j]; |
|
709 |
+ } |
|
710 |
+ A1 >>= 14; // 10 |
|
711 |
+ A1 += 0x10000; |
|
712 |
+ A2 >>= 14; |
|
713 |
+ A2 += 0x10000; |
|
714 |
+ A1 -= c->yuv2rgb_y_offset; |
|
715 |
+ A2 -= c->yuv2rgb_y_offset; |
|
716 |
+ A1 *= c->yuv2rgb_y_coeff; |
|
717 |
+ A2 *= c->yuv2rgb_y_coeff; |
|
718 |
+ A1 += 1 << 13; // 21 |
|
719 |
+ A2 += 1 << 13; |
|
720 |
+ } |
|
721 |
+ |
|
722 |
+ // 8bit: 12+15=27; 16-bit: 12+19=31 |
|
723 |
+ Y1 >>= 14; // 10 |
|
724 |
+ Y1 += 0x10000; |
|
725 |
+ Y2 >>= 14; |
|
726 |
+ Y2 += 0x10000; |
|
727 |
+ U >>= 14; |
|
728 |
+ V >>= 14; |
|
729 |
+ |
|
730 |
+ // 8bit: 27 -> 17bit, 16bit: 31 - 14 = 17bit |
|
731 |
+ Y1 -= c->yuv2rgb_y_offset; |
|
732 |
+ Y2 -= c->yuv2rgb_y_offset; |
|
733 |
+ Y1 *= c->yuv2rgb_y_coeff; |
|
734 |
+ Y2 *= c->yuv2rgb_y_coeff; |
|
735 |
+ Y1 += 1 << 13; // 21 |
|
736 |
+ Y2 += 1 << 13; |
|
737 |
+ // 8bit: 17 + 13bit = 30bit, 16bit: 17 + 13bit = 30bit |
|
738 |
+ |
|
739 |
+ R = V * c->yuv2rgb_v2r_coeff; |
|
740 |
+ G = V * c->yuv2rgb_v2g_coeff + U * c->yuv2rgb_u2g_coeff; |
|
741 |
+ B = U * c->yuv2rgb_u2b_coeff; |
|
742 |
+ |
|
743 |
+ // 8bit: 30 - 22 = 8bit, 16bit: 30bit - 14 = 16bit |
|
744 |
+ output_pixel(&dest[0], av_clip_uintp2(B_R + Y1, 30) >> 14); |
|
745 |
+ output_pixel(&dest[1], av_clip_uintp2( G + Y1, 30) >> 14); |
|
746 |
+ output_pixel(&dest[2], av_clip_uintp2(R_B + Y1, 30) >> 14); |
|
747 |
+ output_pixel(&dest[3], av_clip_uintp2(A1 , 30) >> 14); |
|
748 |
+ output_pixel(&dest[4], av_clip_uintp2(B_R + Y2, 30) >> 14); |
|
749 |
+ output_pixel(&dest[5], av_clip_uintp2( G + Y2, 30) >> 14); |
|
750 |
+ output_pixel(&dest[6], av_clip_uintp2(R_B + Y2, 30) >> 14); |
|
751 |
+ output_pixel(&dest[7], av_clip_uintp2(A2 , 30) >> 14); |
|
752 |
+ dest += 8; |
|
753 |
+ } |
|
754 |
+} |
|
755 |
+ |
|
756 |
+static av_always_inline void |
|
757 |
+yuv2rgba64_2_c_template(SwsContext *c, const int32_t *buf[2], |
|
758 |
+ const int32_t *ubuf[2], const int32_t *vbuf[2], |
|
759 |
+ const int32_t *abuf[2], uint16_t *dest, int dstW, |
|
760 |
+ int yalpha, int uvalpha, int y, |
|
761 |
+ enum AVPixelFormat target, int hasAlpha) |
|
762 |
+{ |
|
763 |
+ const int32_t *buf0 = buf[0], *buf1 = buf[1], |
|
764 |
+ *ubuf0 = ubuf[0], *ubuf1 = ubuf[1], |
|
765 |
+ *vbuf0 = vbuf[0], *vbuf1 = vbuf[1], |
|
766 |
+ *abuf0 = hasAlpha ? abuf[0] : NULL, |
|
767 |
+ *abuf1 = hasAlpha ? abuf[1] : NULL; |
|
768 |
+ int yalpha1 = 4096 - yalpha; |
|
769 |
+ int uvalpha1 = 4096 - uvalpha; |
|
770 |
+ int i; |
|
771 |
+ |
|
772 |
+ for (i = 0; i < ((dstW + 1) >> 1); i++) { |
|
773 |
+ int Y1 = (buf0[i * 2] * yalpha1 + buf1[i * 2] * yalpha) >> 14; |
|
774 |
+ int Y2 = (buf0[i * 2 + 1] * yalpha1 + buf1[i * 2 + 1] * yalpha) >> 14; |
|
775 |
+ int U = (ubuf0[i] * uvalpha1 + ubuf1[i] * uvalpha + (-128 << 23)) >> 14; |
|
776 |
+ int V = (vbuf0[i] * uvalpha1 + vbuf1[i] * uvalpha + (-128 << 23)) >> 14; |
|
777 |
+ int A1, A2; |
|
778 |
+ int R, G, B; |
|
779 |
+ |
|
780 |
+ Y1 -= c->yuv2rgb_y_offset; |
|
781 |
+ Y2 -= c->yuv2rgb_y_offset; |
|
782 |
+ Y1 *= c->yuv2rgb_y_coeff; |
|
783 |
+ Y2 *= c->yuv2rgb_y_coeff; |
|
784 |
+ Y1 += 1 << 13; |
|
785 |
+ Y2 += 1 << 13; |
|
786 |
+ |
|
787 |
+ R = V * c->yuv2rgb_v2r_coeff; |
|
788 |
+ G = V * c->yuv2rgb_v2g_coeff + U * c->yuv2rgb_u2g_coeff; |
|
789 |
+ B = U * c->yuv2rgb_u2b_coeff; |
|
790 |
+ |
|
791 |
+ if (hasAlpha) { |
|
792 |
+ A1 = (abuf0[i * 2 ] * yalpha1 + abuf1[i * 2 ] * yalpha) >> 14; |
|
793 |
+ A2 = (abuf0[i * 2 + 1] * yalpha1 + abuf1[i * 2 + 1] * yalpha) >> 14; |
|
794 |
+ |
|
795 |
+ A1 -= c->yuv2rgb_y_offset; |
|
796 |
+ A2 -= c->yuv2rgb_y_offset; |
|
797 |
+ A1 *= c->yuv2rgb_y_coeff; |
|
798 |
+ A2 *= c->yuv2rgb_y_coeff; |
|
799 |
+ A1 += 1 << 13; |
|
800 |
+ A2 += 1 << 13; |
|
801 |
+ } |
|
802 |
+ |
|
803 |
+ output_pixel(&dest[0], av_clip_uintp2(B_R + Y1, 30) >> 14); |
|
804 |
+ output_pixel(&dest[1], av_clip_uintp2( G + Y1, 30) >> 14); |
|
805 |
+ output_pixel(&dest[2], av_clip_uintp2(R_B + Y1, 30) >> 14); |
|
806 |
+ output_pixel(&dest[3], av_clip_uintp2(A1 , 30) >> 14); |
|
807 |
+ output_pixel(&dest[4], av_clip_uintp2(B_R + Y2, 30) >> 14); |
|
808 |
+ output_pixel(&dest[5], av_clip_uintp2( G + Y2, 30) >> 14); |
|
809 |
+ output_pixel(&dest[6], av_clip_uintp2(R_B + Y2, 30) >> 14); |
|
810 |
+ output_pixel(&dest[7], av_clip_uintp2(A2 , 30) >> 14); |
|
811 |
+ dest += 8; |
|
812 |
+ } |
|
813 |
+} |
|
814 |
+ |
|
815 |
+static av_always_inline void |
|
816 |
+yuv2rgba64_1_c_template(SwsContext *c, const int32_t *buf0, |
|
817 |
+ const int32_t *ubuf[2], const int32_t *vbuf[2], |
|
818 |
+ const int32_t *abuf0, uint16_t *dest, int dstW, |
|
819 |
+ int uvalpha, int y, enum AVPixelFormat target, int hasAlpha) |
|
820 |
+{ |
|
821 |
+ const int32_t *ubuf0 = ubuf[0], *vbuf0 = vbuf[0]; |
|
822 |
+ int i; |
|
823 |
+ |
|
824 |
+ if (uvalpha < 2048) { |
|
825 |
+ for (i = 0; i < ((dstW + 1) >> 1); i++) { |
|
826 |
+ int Y1 = (buf0[i * 2] ) >> 2; |
|
827 |
+ int Y2 = (buf0[i * 2 + 1]) >> 2; |
|
828 |
+ int U = (ubuf0[i] + (-128 << 11)) >> 2; |
|
829 |
+ int V = (vbuf0[i] + (-128 << 11)) >> 2; |
|
830 |
+ int R, G, B; |
|
831 |
+ int A1, A2; |
|
832 |
+ |
|
833 |
+ Y1 -= c->yuv2rgb_y_offset; |
|
834 |
+ Y2 -= c->yuv2rgb_y_offset; |
|
835 |
+ Y1 *= c->yuv2rgb_y_coeff; |
|
836 |
+ Y2 *= c->yuv2rgb_y_coeff; |
|
837 |
+ Y1 += 1 << 13; |
|
838 |
+ Y2 += 1 << 13; |
|
839 |
+ |
|
840 |
+ if (hasAlpha) { |
|
841 |
+ A1 = abuf0[i * 2 ] >> 2; |
|
842 |
+ A2 = abuf0[i * 2 + 1] >> 2; |
|
843 |
+ |
|
844 |
+ A1 -= c->yuv2rgb_y_offset; |
|
845 |
+ A2 -= c->yuv2rgb_y_offset; |
|
846 |
+ A1 *= c->yuv2rgb_y_coeff; |
|
847 |
+ A2 *= c->yuv2rgb_y_coeff; |
|
848 |
+ A1 += 1 << 13; |
|
849 |
+ A2 += 1 << 13; |
|
850 |
+ } |
|
851 |
+ |
|
852 |
+ R = V * c->yuv2rgb_v2r_coeff; |
|
853 |
+ G = V * c->yuv2rgb_v2g_coeff + U * c->yuv2rgb_u2g_coeff; |
|
854 |
+ B = U * c->yuv2rgb_u2b_coeff; |
|
855 |
+ |
|
856 |
+ output_pixel(&dest[0], av_clip_uintp2(B_R + Y1, 30) >> 14); |
|
857 |
+ output_pixel(&dest[1], av_clip_uintp2( G + Y1, 30) >> 14); |
|
858 |
+ output_pixel(&dest[2], av_clip_uintp2(R_B + Y1, 30) >> 14); |
|
859 |
+ output_pixel(&dest[3], av_clip_uintp2(A1 , 30) >> 14); |
|
860 |
+ output_pixel(&dest[4], av_clip_uintp2(B_R + Y2, 30) >> 14); |
|
861 |
+ output_pixel(&dest[5], av_clip_uintp2( G + Y2, 30) >> 14); |
|
862 |
+ output_pixel(&dest[6], av_clip_uintp2(R_B + Y2, 30) >> 14); |
|
863 |
+ output_pixel(&dest[7], av_clip_uintp2(A2 , 30) >> 14); |
|
864 |
+ dest += 8; |
|
865 |
+ } |
|
866 |
+ } else { |
|
867 |
+ const int32_t *ubuf1 = ubuf[1], *vbuf1 = vbuf[1]; |
|
868 |
+ for (i = 0; i < ((dstW + 1) >> 1); i++) { |
|
869 |
+ int Y1 = (buf0[i * 2] ) >> 2; |
|
870 |
+ int Y2 = (buf0[i * 2 + 1]) >> 2; |
|
871 |
+ int U = (ubuf0[i] + ubuf1[i] + (-128 << 12)) >> 3; |
|
872 |
+ int V = (vbuf0[i] + vbuf1[i] + (-128 << 12)) >> 3; |
|
873 |
+ int R, G, B; |
|
874 |
+ int A1, A2; |
|
875 |
+ |
|
876 |
+ Y1 -= c->yuv2rgb_y_offset; |
|
877 |
+ Y2 -= c->yuv2rgb_y_offset; |
|
878 |
+ Y1 *= c->yuv2rgb_y_coeff; |
|
879 |
+ Y2 *= c->yuv2rgb_y_coeff; |
|
880 |
+ Y1 += 1 << 13; |
|
881 |
+ Y2 += 1 << 13; |
|
882 |
+ |
|
883 |
+ if (hasAlpha) { |
|
884 |
+ A1 = abuf0[i * 2 ] >> 2; |
|
885 |
+ A2 = abuf0[i * 2 + 1] >> 2; |
|
886 |
+ |
|
887 |
+ A1 -= c->yuv2rgb_y_offset; |
|
888 |
+ A2 -= c->yuv2rgb_y_offset; |
|
889 |
+ A1 *= c->yuv2rgb_y_coeff; |
|
890 |
+ A2 *= c->yuv2rgb_y_coeff; |
|
891 |
+ A1 += 1 << 13; |
|
892 |
+ A2 += 1 << 13; |
|
893 |
+ } |
|
894 |
+ |
|
895 |
+ R = V * c->yuv2rgb_v2r_coeff; |
|
896 |
+ G = V * c->yuv2rgb_v2g_coeff + U * c->yuv2rgb_u2g_coeff; |
|
897 |
+ B = U * c->yuv2rgb_u2b_coeff; |
|
898 |
+ |
|
899 |
+ output_pixel(&dest[0], av_clip_uintp2(B_R + Y1, 30) >> 14); |
|
900 |
+ output_pixel(&dest[1], av_clip_uintp2( G + Y1, 30) >> 14); |
|
901 |
+ output_pixel(&dest[2], av_clip_uintp2(R_B + Y1, 30) >> 14); |
|
902 |
+ output_pixel(&dest[3], av_clip_uintp2(A1 , 30) >> 14); |
|
903 |
+ output_pixel(&dest[4], av_clip_uintp2(B_R + Y2, 30) >> 14); |
|
904 |
+ output_pixel(&dest[5], av_clip_uintp2( G + Y2, 30) >> 14); |
|
905 |
+ output_pixel(&dest[6], av_clip_uintp2(R_B + Y2, 30) >> 14); |
|
906 |
+ output_pixel(&dest[7], av_clip_uintp2(A2 , 30) >> 14); |
|
907 |
+ dest += 8; |
|
908 |
+ } |
|
909 |
+ } |
|
910 |
+} |
|
911 |
+ |
|
912 |
+static av_always_inline void |
|
677 | 913 |
yuv2rgb48_X_c_template(SwsContext *c, const int16_t *lumFilter, |
678 | 914 |
const int32_t **lumSrc, int lumFilterSize, |
679 | 915 |
const int16_t *chrFilter, const int32_t **chrUSrc, |
680 | 916 |
const int32_t **chrVSrc, int chrFilterSize, |
681 | 917 |
const int32_t **alpSrc, uint16_t *dest, int dstW, |
682 |
- int y, enum AVPixelFormat target) |
|
918 |
+ int y, enum AVPixelFormat target, int hasAlpha) |
|
683 | 919 |
{ |
684 | 920 |
int i; |
685 | 921 |
|
... | ... |
@@ -737,7 +973,7 @@ yuv2rgb48_2_c_template(SwsContext *c, const int32_t *buf[2], |
737 | 737 |
const int32_t *ubuf[2], const int32_t *vbuf[2], |
738 | 738 |
const int32_t *abuf[2], uint16_t *dest, int dstW, |
739 | 739 |
int yalpha, int uvalpha, int y, |
740 |
- enum AVPixelFormat target) |
|
740 |
+ enum AVPixelFormat target, int hasAlpha) |
|
741 | 741 |
{ |
742 | 742 |
const int32_t *buf0 = buf[0], *buf1 = buf[1], |
743 | 743 |
*ubuf0 = ubuf[0], *ubuf1 = ubuf[1], |
... | ... |
@@ -778,7 +1014,7 @@ static av_always_inline void |
778 | 778 |
yuv2rgb48_1_c_template(SwsContext *c, const int32_t *buf0, |
779 | 779 |
const int32_t *ubuf[2], const int32_t *vbuf[2], |
780 | 780 |
const int32_t *abuf0, uint16_t *dest, int dstW, |
781 |
- int uvalpha, int y, enum AVPixelFormat target) |
|
781 |
+ int uvalpha, int y, enum AVPixelFormat target, int hasAlpha) |
|
782 | 782 |
{ |
783 | 783 |
const int32_t *ubuf0 = ubuf[0], *vbuf0 = vbuf[0]; |
784 | 784 |
int i; |
... | ... |
@@ -845,7 +1081,7 @@ yuv2rgb48_1_c_template(SwsContext *c, const int32_t *buf0, |
845 | 845 |
#undef r_b |
846 | 846 |
#undef b_r |
847 | 847 |
|
848 |
-#define YUV2PACKED16WRAPPER(name, base, ext, fmt) \ |
|
848 |
+#define YUV2PACKED16WRAPPER(name, base, ext, fmt, hasAlpha) \ |
|
849 | 849 |
static void name ## ext ## _X_c(SwsContext *c, const int16_t *lumFilter, \ |
850 | 850 |
const int16_t **_lumSrc, int lumFilterSize, \ |
851 | 851 |
const int16_t *chrFilter, const int16_t **_chrUSrc, \ |
... | ... |
@@ -860,7 +1096,7 @@ static void name ## ext ## _X_c(SwsContext *c, const int16_t *lumFilter, \ |
860 | 860 |
uint16_t *dest = (uint16_t *) _dest; \ |
861 | 861 |
name ## base ## _X_c_template(c, lumFilter, lumSrc, lumFilterSize, \ |
862 | 862 |
chrFilter, chrUSrc, chrVSrc, chrFilterSize, \ |
863 |
- alpSrc, dest, dstW, y, fmt); \ |
|
863 |
+ alpSrc, dest, dstW, y, fmt, hasAlpha); \ |
|
864 | 864 |
} \ |
865 | 865 |
\ |
866 | 866 |
static void name ## ext ## _2_c(SwsContext *c, const int16_t *_buf[2], \ |
... | ... |
@@ -874,7 +1110,7 @@ static void name ## ext ## _2_c(SwsContext *c, const int16_t *_buf[2], \ |
874 | 874 |
**abuf = (const int32_t **) _abuf; \ |
875 | 875 |
uint16_t *dest = (uint16_t *) _dest; \ |
876 | 876 |
name ## base ## _2_c_template(c, buf, ubuf, vbuf, abuf, \ |
877 |
- dest, dstW, yalpha, uvalpha, y, fmt); \ |
|
877 |
+ dest, dstW, yalpha, uvalpha, y, fmt, hasAlpha); \ |
|
878 | 878 |
} \ |
879 | 879 |
\ |
880 | 880 |
static void name ## ext ## _1_c(SwsContext *c, const int16_t *_buf0, \ |
... | ... |
@@ -888,13 +1124,17 @@ static void name ## ext ## _1_c(SwsContext *c, const int16_t *_buf0, \ |
888 | 888 |
*abuf0 = (const int32_t *) _abuf0; \ |
889 | 889 |
uint16_t *dest = (uint16_t *) _dest; \ |
890 | 890 |
name ## base ## _1_c_template(c, buf0, ubuf, vbuf, abuf0, dest, \ |
891 |
- dstW, uvalpha, y, fmt); \ |
|
891 |
+ dstW, uvalpha, y, fmt, hasAlpha); \ |
|
892 | 892 |
} |
893 | 893 |
|
894 |
-YUV2PACKED16WRAPPER(yuv2, rgb48, rgb48be, AV_PIX_FMT_RGB48BE) |
|
895 |
-YUV2PACKED16WRAPPER(yuv2, rgb48, rgb48le, AV_PIX_FMT_RGB48LE) |
|
896 |
-YUV2PACKED16WRAPPER(yuv2, rgb48, bgr48be, AV_PIX_FMT_BGR48BE) |
|
897 |
-YUV2PACKED16WRAPPER(yuv2, rgb48, bgr48le, AV_PIX_FMT_BGR48LE) |
|
894 |
+YUV2PACKED16WRAPPER(yuv2, rgb48, rgb48be, AV_PIX_FMT_RGB48BE, 0) |
|
895 |
+YUV2PACKED16WRAPPER(yuv2, rgb48, rgb48le, AV_PIX_FMT_RGB48LE, 0) |
|
896 |
+YUV2PACKED16WRAPPER(yuv2, rgb48, bgr48be, AV_PIX_FMT_BGR48BE, 0) |
|
897 |
+YUV2PACKED16WRAPPER(yuv2, rgb48, bgr48le, AV_PIX_FMT_BGR48LE, 0) |
|
898 |
+YUV2PACKED16WRAPPER(yuv2, rgba64, rgba64be, AV_PIX_FMT_RGBA64BE, 1) |
|
899 |
+YUV2PACKED16WRAPPER(yuv2, rgba64, rgba64le, AV_PIX_FMT_RGBA64LE, 1) |
|
900 |
+YUV2PACKED16WRAPPER(yuv2, rgba64, rgbx64be, AV_PIX_FMT_RGBA64BE, 0) |
|
901 |
+YUV2PACKED16WRAPPER(yuv2, rgba64, rgbx64le, AV_PIX_FMT_RGBA64LE, 0) |
|
898 | 902 |
|
899 | 903 |
/* |
900 | 904 |
* Write out 2 RGB pixels in the target pixel format. This function takes a |
... | ... |
@@ -1738,6 +1978,34 @@ av_cold void ff_sws_init_output_funcs(SwsContext *c, |
1738 | 1738 |
} else { |
1739 | 1739 |
YUV_PACKED: |
1740 | 1740 |
switch (dstFormat) { |
1741 |
+ case AV_PIX_FMT_RGBA64LE: |
|
1742 |
+#if CONFIG_SWSCALE_ALPHA |
|
1743 |
+ if (c->alpPixBuf) { |
|
1744 |
+ *yuv2packed1 = yuv2rgba64le_1_c; |
|
1745 |
+ *yuv2packed2 = yuv2rgba64le_2_c; |
|
1746 |
+ *yuv2packedX = yuv2rgba64le_X_c; |
|
1747 |
+ } else |
|
1748 |
+#endif /* CONFIG_SWSCALE_ALPHA */ |
|
1749 |
+ { |
|
1750 |
+ *yuv2packed1 = yuv2rgbx64le_1_c; |
|
1751 |
+ *yuv2packed2 = yuv2rgbx64le_2_c; |
|
1752 |
+ *yuv2packedX = yuv2rgbx64le_X_c; |
|
1753 |
+ } |
|
1754 |
+ break; |
|
1755 |
+ case AV_PIX_FMT_RGBA64BE: |
|
1756 |
+#if CONFIG_SWSCALE_ALPHA |
|
1757 |
+ if (c->alpPixBuf) { |
|
1758 |
+ *yuv2packed1 = yuv2rgba64be_1_c; |
|
1759 |
+ *yuv2packed2 = yuv2rgba64be_2_c; |
|
1760 |
+ *yuv2packedX = yuv2rgba64be_X_c; |
|
1761 |
+ } else |
|
1762 |
+#endif /* CONFIG_SWSCALE_ALPHA */ |
|
1763 |
+ { |
|
1764 |
+ *yuv2packed1 = yuv2rgbx64be_1_c; |
|
1765 |
+ *yuv2packed2 = yuv2rgbx64be_2_c; |
|
1766 |
+ *yuv2packedX = yuv2rgbx64be_X_c; |
|
1767 |
+ } |
|
1768 |
+ break; |
|
1741 | 1769 |
case AV_PIX_FMT_RGB48LE: |
1742 | 1770 |
*yuv2packed1 = yuv2rgb48le_1_c; |
1743 | 1771 |
*yuv2packed2 = yuv2rgb48le_2_c; |
... | ... |
@@ -138,8 +138,8 @@ static const FormatEntry format_entries[AV_PIX_FMT_NB] = { |
138 | 138 |
[AV_PIX_FMT_YUVA444P16LE]= { 1, 1 }, |
139 | 139 |
[AV_PIX_FMT_RGB48BE] = { 1, 1 }, |
140 | 140 |
[AV_PIX_FMT_RGB48LE] = { 1, 1 }, |
141 |
- [AV_PIX_FMT_RGBA64BE] = { 1, 0 }, |
|
142 |
- [AV_PIX_FMT_RGBA64LE] = { 1, 0 }, |
|
141 |
+ [AV_PIX_FMT_RGBA64BE] = { 1, 1 }, |
|
142 |
+ [AV_PIX_FMT_RGBA64LE] = { 1, 1 }, |
|
143 | 143 |
[AV_PIX_FMT_RGB565BE] = { 1, 1 }, |
144 | 144 |
[AV_PIX_FMT_RGB565LE] = { 1, 1 }, |
145 | 145 |
[AV_PIX_FMT_RGB555BE] = { 1, 1 }, |
... | ... |
@@ -893,6 +893,7 @@ av_cold int ff_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4], |
893 | 893 |
fill_gv_table(c->table_gV, 1, cgv); |
894 | 894 |
break; |
895 | 895 |
case 32: |
896 |
+ case 64: |
|
896 | 897 |
base = (c->dstFormat == AV_PIX_FMT_RGB32_1 || |
897 | 898 |
c->dstFormat == AV_PIX_FMT_BGR32_1) ? 8 : 0; |
898 | 899 |
rbase = base + (isRgb ? 16 : 0); |
... | ... |
@@ -45,6 +45,8 @@ rgb565be bc123b962629ead1a06af0c18cbb6e5f |
45 | 45 |
rgb565le 20757fafe4756e62d845b2ab4c0b8f93 |
46 | 46 |
rgb8 e01614f5416dcc8ad365ad7a57afc9fb |
47 | 47 |
rgba 53796fa4c392a1b2659595b6a284f8c4 |
48 |
+rgba64be d5729f8c76250a9b18cb149b396f1bfb |
|
49 |
+rgba64le fae0a6afdaee94cb98e3ab9a702c8ecc |
|
48 | 50 |
uyvy422 3f411f947e3ac8f842c88e717d68bd9a |
49 | 51 |
yuv410p 7dcf3f4770c8b494290ceacd2c2ce6db |
50 | 52 |
yuv411p 9461b188dab6f8b90d9a27e353a89f58 |
... | ... |
@@ -46,6 +46,8 @@ rgb565be bc123b962629ead1a06af0c18cbb6e5f |
46 | 46 |
rgb565le 20757fafe4756e62d845b2ab4c0b8f93 |
47 | 47 |
rgb8 e01614f5416dcc8ad365ad7a57afc9fb |
48 | 48 |
rgba 53796fa4c392a1b2659595b6a284f8c4 |
49 |
+rgba64be d5729f8c76250a9b18cb149b396f1bfb |
|
50 |
+rgba64le fae0a6afdaee94cb98e3ab9a702c8ecc |
|
49 | 51 |
uyvy422 3f411f947e3ac8f842c88e717d68bd9a |
50 | 52 |
xyz12be e1e6718ae1c83e904fbdf903d62e5808 |
51 | 53 |
xyz12le 24e8a22c1bd7d637edb731d10b7c54d0 |
... | ... |
@@ -46,6 +46,8 @@ rgb565be e8f3ebcbb9a5fff000eca8a312f89782 |
46 | 46 |
rgb565le 53bbd558fb0dcd82f1fad83ea855c3ad |
47 | 47 |
rgb8 67bfdd4fa88b1ab9be876f42dfc75683 |
48 | 48 |
rgba d0ebdf1495bc6b7e9d3bfbe2813a9d16 |
49 |
+rgba64be 963f5e716b6de4cacf06c3ca9d02bee0 |
|
50 |
+rgba64le b333503ba90d51d0cd21ff7e60acd492 |
|
49 | 51 |
uyvy422 a6a52504a16f09b8f2ec2405bc8190b5 |
50 | 52 |
xyz12be 9d904fb640dd024e668acb9dc7b3f11f |
51 | 53 |
xyz12le 7f93c7d2981f1976108e941afa1363f8 |
... | ... |
@@ -44,6 +44,8 @@ rgb565be 6727e71974c8e5dad157925c10ee1532 |
44 | 44 |
rgb565le b0a2b4817775289cfc415bb951f9ae0c |
45 | 45 |
rgb8 22fdbd14ce296c1afa9bb4a6ea09b3fe |
46 | 46 |
rgba a37789c4df73c3bd8648ad1fe9d3f991 |
47 |
+rgba64be d5562166a3fef8a65c15898b8e792300 |
|
48 |
+rgba64le babf9eb683b2886289562cf465da6738 |
|
47 | 49 |
xyz12be 4738d2cb5321376d5eed70930f47a953 |
48 | 50 |
xyz12le 51288f3440c8584406b332545d69c5a9 |
49 | 51 |
yuv410p a1280c2b9b562dba3c2d35a1e5fc4b23 |
... | ... |
@@ -45,6 +45,8 @@ rgb565be 077604cc5dc91008b018264db73c8f0c |
45 | 45 |
rgb565le a97549f25e63dd0dd404db41bbe05c07 |
46 | 46 |
rgb8 a35d3c3b9b87261c7417076a8b18fdb8 |
47 | 47 |
rgba 8ca9c8db589615ebbaa964be4ce62d08 |
48 |
+rgba64be ca82ddd3f4182c21f8708cbe5368b57a |
|
49 |
+rgba64le 53236255cdc370f549484008f61c04e8 |
|
48 | 50 |
uyvy422 8be40aded4b407ff66305911ba5ce2ce |
49 | 51 |
xyz12be 1cbb1f72c6875934e66f50f499a62cc3 |
50 | 52 |
xyz12le ba8c6eab49e58eace392ef0aeedbf677 |
... | ... |
@@ -46,6 +46,8 @@ rgb565be bc123b962629ead1a06af0c18cbb6e5f |
46 | 46 |
rgb565le 20757fafe4756e62d845b2ab4c0b8f93 |
47 | 47 |
rgb8 e01614f5416dcc8ad365ad7a57afc9fb |
48 | 48 |
rgba 53796fa4c392a1b2659595b6a284f8c4 |
49 |
+rgba64be d5729f8c76250a9b18cb149b396f1bfb |
|
50 |
+rgba64le fae0a6afdaee94cb98e3ab9a702c8ecc |
|
49 | 51 |
uyvy422 3f411f947e3ac8f842c88e717d68bd9a |
50 | 52 |
xyz12be e1e6718ae1c83e904fbdf903d62e5808 |
51 | 53 |
xyz12le 24e8a22c1bd7d637edb731d10b7c54d0 |
... | ... |
@@ -46,6 +46,8 @@ rgb565be 5168b66e69c25351948085e5fc51bb3a |
46 | 46 |
rgb565le 301a4d41f0db3aaed341d812ed0d7927 |
47 | 47 |
rgb8 8e5786e83099bc89d2e38a76e6dfcc52 |
48 | 48 |
rgba de6a65b8c01bdad84e575202ca8b66a0 |
49 |
+rgba64be fdc6467660a45d6e9dad59339be2ec4c |
|
50 |
+rgba64le b208b8fdd403c1a24bbef0473a89d978 |
|
49 | 51 |
uyvy422 479105bc4c7fbb4a33ca8745aa8c2de8 |
50 | 52 |
xyz12be e9be06091b6dd0b67598eaf8bd86a78e |
51 | 53 |
xyz12le 05a9bbd16d81183ef3db04447648e3b1 |
... | ... |
@@ -46,6 +46,8 @@ rgb565be c70d86afbd68a073f2d4fe0eee3a9832 |
46 | 46 |
rgb565le 991576c5d3308a73068a826543b3e7af |
47 | 47 |
rgb8 42230235c5a2a66c0f9a2fcd20f9f5cd |
48 | 48 |
rgba a6973a2940a378d2a8284194da26eec0 |
49 |
+rgba64be d438e49304f65a5b7c5f09fcc1b979df |
|
50 |
+rgba64le 9acbefa0f25441491d780b57aac11346 |
|
49 | 51 |
uyvy422 21c48162379321bb83ec2399535f9253 |
50 | 52 |
xyz12be 7070af64e30fa689e3627b1dde7506f4 |
51 | 53 |
xyz12le 4c4b31100b836638e7e61181997c49e1 |