History

swscale: implement >8bit scaling support.

This means that precision is retained when scaling between sample formats with >8 bits per component (48bit RGB, 16bit grayscale, 9/10/16bit YUV).

Ronald S. Bultje committed 15 years ago

Commit ef1ee361 parent f68069812 files · +545 −373Browse files

Unified · Split

12 files
  1. libswscale/ppc/swscale_altivec.c +3 −1
  2. libswscale/swscale.c +457 −237
  3. libswscale/swscale_internal.h +10 −0
  4. libswscale/utils.c +7 −2
  5. libswscale/x86/swscale_template.c +4 −69
  6. tests/ref/lavfi/pixdesc +8 −8
  7. tests/ref/lavfi/pixfmts_copy +8 −8
  8. tests/ref/lavfi/pixfmts_crop +8 −8
  9. tests/ref/lavfi/pixfmts_hflip +8 −8
  10. tests/ref/lavfi/pixfmts_null +8 −8
  11. tests/ref/lavfi/pixfmts_scale +16 −16
  12. tests/ref/lavfi/pixfmts_vflip +8 −8
libswscale/ppc/swscale_altivec.c+3−1
@@ -406,7 +406,9 @@ void ff_sws_init_swScale_altivec(SwsContext *c) · 405 unmodified lines
406406 if (!(av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC))
407407 return;
408408
409− c->hScale = hScale_altivec_real;
409+ if (c->scalingBpp == 8) {
410+ c->hScale = hScale_altivec_real;
411+ }
410412 if (!is16BPS(dstFormat) && !is9_OR_10BPS(dstFormat) &&
411413 dstFormat != PIX_FMT_NV12 && dstFormat != PIX_FMT_NV21 &&
412414 !c->alpPixBuf) {
libswscale/swscale.c+457−237
@@ -195,18 +195,18 @@ DECLARE_ALIGNED(8, const uint8_t, dither_8x8_220)[8][8]={ · 194 unmodified lines
195195 #endif
196196
197197 static av_always_inline void
198−yuv2yuvX16_c_template(const int16_t *lumFilter, const int16_t **lumSrc,
198+yuv2yuvX16_c_template(const int16_t *lumFilter, const int32_t **lumSrc,
199199 int lumFilterSize, const int16_t *chrFilter,
200− const int16_t **chrUSrc, const int16_t **chrVSrc,
201− int chrFilterSize, const int16_t **alpSrc,
200+ const int32_t **chrUSrc, const int32_t **chrVSrc,
201+ int chrFilterSize, const int32_t **alpSrc,
202202 uint16_t *dest[4], int dstW, int chrDstW,
203203 int big_endian, int output_bits)
204204 {
205205 //FIXME Optimize (just quickly written not optimized..)
206206 int i;
207− int shift = 11 + 16 - output_bits;
208207 uint16_t *yDest = dest[0], *uDest = dest[1], *vDest = dest[2],
209208 *aDest = CONFIG_SWSCALE_ALPHA ? dest[3] : NULL;
209+ int shift = 15 + 16 - output_bits;
210210
211211 #define output_pixel(pos, val) \
212212 if (big_endian) { \
@@ -223,7 +223,7 @@ yuv2yuvX16_c_template(const int16_t *lumFilter, const int16_t **lumSrc, · 10 unmodified lines
223223 } \
224224 }
225225 for (i = 0; i < dstW; i++) {
226− int val = 1 << (26-output_bits);
226+ int val = 1 << (30-output_bits);
227227 int j;
228228
229229 for (j = 0; j < lumFilterSize; j++)
@@ -234,8 +234,8 @@ yuv2yuvX16_c_template(const int16_t *lumFilter, const int16_t **lumSrc, · 4 unmodified lines
234234
235235 if (uDest) {
236236 for (i = 0; i < chrDstW; i++) {
237− int u = 1 << (26-output_bits);
238− int v = 1 << (26-output_bits);
237+ int u = 1 << (30-output_bits);
238+ int v = 1 << (30-output_bits);
239239 int j;
240240
241241 for (j = 0; j < chrFilterSize; j++) {
@@ -250,7 +250,7 @@ yuv2yuvX16_c_template(const int16_t *lumFilter, const int16_t **lumSrc, · 8 unmodified lines
250250
251251 if (CONFIG_SWSCALE_ALPHA && aDest) {
252252 for (i = 0; i < dstW; i++) {
253− int val = 1 << (26-output_bits);
253+ int val = 1 << (30-output_bits);
254254 int j;
255255
256256 for (j = 0; j < lumFilterSize; j++)
@@ -264,12 +264,16 @@ yuv2yuvX16_c_template(const int16_t *lumFilter, const int16_t **lumSrc, · 7 unmodified lines
264264
265265 #define yuv2NBPS(bits, BE_LE, is_be) \
266266 static void yuv2yuvX ## bits ## BE_LE ## _c(SwsContext *c, const int16_t *lumFilter, \
267− const int16_t **lumSrc, int lumFilterSize, \
268− const int16_t *chrFilter, const int16_t **chrUSrc, \
269− const int16_t **chrVSrc, \
270− int chrFilterSize, const int16_t **alpSrc, \
267+ const int16_t **_lumSrc, int lumFilterSize, \
268+ const int16_t *chrFilter, const int16_t **_chrUSrc, \
269+ const int16_t **_chrVSrc, \
270+ int chrFilterSize, const int16_t **_alpSrc, \
271271 uint8_t *_dest[4], int dstW, int chrDstW) \
272272 { \
273+ const int32_t **lumSrc = (const int32_t **) _lumSrc, \
274+ **chrUSrc = (const int32_t **) _chrUSrc, \
275+ **chrVSrc = (const int32_t **) _chrVSrc, \
276+ **alpSrc = (const int32_t **) _alpSrc; \
273277 yuv2yuvX16_c_template(lumFilter, lumSrc, lumFilterSize, \
274278 chrFilter, chrUSrc, chrVSrc, chrFilterSize, \
275279 alpSrc, (uint16_t **) _dest, \
@@ -418,109 +422,121 @@ static void yuv2nv12X_c(SwsContext *c, const int16_t *lumFilter, · 142 unmodified lines
418422
419423 static av_always_inline void
420424 yuv2gray16_X_c_template(SwsContext *c, const int16_t *lumFilter,
421− const int16_t **lumSrc, int lumFilterSize,
422− const int16_t *chrFilter, const int16_t **chrUSrc,
423− const int16_t **chrVSrc, int chrFilterSize,
424− const int16_t **alpSrc, uint8_t *dest, int dstW,
425+ const int32_t **lumSrc, int lumFilterSize,
426+ const int16_t *chrFilter, const int32_t **chrUSrc,
427+ const int32_t **chrVSrc, int chrFilterSize,
428+ const int32_t **alpSrc, uint16_t *dest, int dstW,
425429 int y, enum PixelFormat target)
426430 {
427431 int i;
428432
429433 for (i = 0; i < (dstW >> 1); i++) {
430434 int j;
431− int Y1 = 1 << 18;
432− int Y2 = 1 << 18;
433− const int i2 = 2 * i;
435+ int Y1 = 1 << 14;
436+ int Y2 = 1 << 14;
434437
435438 for (j = 0; j < lumFilterSize; j++) {
436− Y1 += lumSrc[j][i2] * lumFilter[j];
437− Y2 += lumSrc[j][i2+1] * lumFilter[j];
439+ Y1 += lumSrc[j][i * 2] * lumFilter[j];
440+ Y2 += lumSrc[j][i * 2 + 1] * lumFilter[j];
438441 }
439− Y1 >>= 11;
440− Y2 >>= 11;
442+ Y1 >>= 15;
443+ Y2 >>= 15;
441444 if ((Y1 | Y2) & 0x10000) {
442445 Y1 = av_clip_uint16(Y1);
443446 Y2 = av_clip_uint16(Y2);
444447 }
445− output_pixel(&dest[2 * i2 + 0], Y1);
446− output_pixel(&dest[2 * i2 + 2], Y2);
448+ output_pixel(&dest[i * 2 + 0], Y1);
449+ output_pixel(&dest[i * 2 + 1], Y2);
447450 }
448451 }
449452
450453 static av_always_inline void
451−yuv2gray16_2_c_template(SwsContext *c, const int16_t *buf[2],
452− const int16_t *ubuf[2], const int16_t *vbuf[2],
453− const int16_t *abuf[2], uint8_t *dest, int dstW,
454+yuv2gray16_2_c_template(SwsContext *c, const int32_t *buf[2],
455+ const int32_t *ubuf[2], const int32_t *vbuf[2],
456+ const int32_t *abuf[2], uint16_t *dest, int dstW,
454457 int yalpha, int uvalpha, int y,
455458 enum PixelFormat target)
456459 {
457460 int yalpha1 = 4095 - yalpha;
458461 int i;
459− const int16_t *buf0 = buf[0], *buf1 = buf[1];
462+ const int32_t *buf0 = buf[0], *buf1 = buf[1];
460463
461464 for (i = 0; i < (dstW >> 1); i++) {
462− const int i2 = 2 * i;
463− int Y1 = (buf0[i2 ] * yalpha1 + buf1[i2 ] * yalpha) >> 11;
464− int Y2 = (buf0[i2+1] * yalpha1 + buf1[i2+1] * yalpha) >> 11;
465+ int Y1 = (buf0[i * 2 ] * yalpha1 + buf1[i * 2 ] * yalpha) >> 15;
466+ int Y2 = (buf0[i * 2 + 1] * yalpha1 + buf1[i * 2 + 1] * yalpha) >> 15;
465467
466− output_pixel(&dest[2 * i2 + 0], Y1);
467− output_pixel(&dest[2 * i2 + 2], Y2);
468+ output_pixel(&dest[i * 2 + 0], Y1);
469+ output_pixel(&dest[i * 2 + 1], Y2);
468470 }
469471 }
470472
471473 static av_always_inline void
472−yuv2gray16_1_c_template(SwsContext *c, const int16_t *buf0,
473− const int16_t *ubuf[2], const int16_t *vbuf[2],
474− const int16_t *abuf0, uint8_t *dest, int dstW,
474+yuv2gray16_1_c_template(SwsContext *c, const int32_t *buf0,
475+ const int32_t *ubuf[2], const int32_t *vbuf[2],
476+ const int32_t *abuf0, uint16_t *dest, int dstW,
475477 int uvalpha, int y, enum PixelFormat target)
476478 {
477479 int i;
478480
479481 for (i = 0; i < (dstW >> 1); i++) {
480− const int i2 = 2 * i;
481− int Y1 = buf0[i2 ] << 1;
482− int Y2 = buf0[i2+1] << 1;
482+ int Y1 = buf0[i * 2 ] << 1;
483+ int Y2 = buf0[i * 2 + 1] << 1;
483484
484− output_pixel(&dest[2 * i2 + 0], Y1);
485− output_pixel(&dest[2 * i2 + 2], Y2);
485+ output_pixel(&dest[i * 2 + 0], Y1);
486+ output_pixel(&dest[i * 2 + 1], Y2);
486487 }
487488 }
488489
489490 #undef output_pixel
490491
491−#define YUV2PACKEDWRAPPER(name, base, ext, fmt) \
492+#define YUV2PACKED16WRAPPER(name, base, ext, fmt) \
492493 static void name ## ext ## _X_c(SwsContext *c, const int16_t *lumFilter, \
493− const int16_t **lumSrc, int lumFilterSize, \
494− const int16_t *chrFilter, const int16_t **chrUSrc, \
495− const int16_t **chrVSrc, int chrFilterSize, \
496− const int16_t **alpSrc, uint8_t *dest, int dstW, \
494+ const int16_t **_lumSrc, int lumFilterSize, \
495+ const int16_t *chrFilter, const int16_t **_chrUSrc, \
496+ const int16_t **_chrVSrc, int chrFilterSize, \
497+ const int16_t **_alpSrc, uint8_t *_dest, int dstW, \
497498 int y) \
498499 { \
500+ const int32_t **lumSrc = (const int32_t **) _lumSrc, \
501+ **chrUSrc = (const int32_t **) _chrUSrc, \
502+ **chrVSrc = (const int32_t **) _chrVSrc, \
503+ **alpSrc = (const int32_t **) _alpSrc; \
504+ uint16_t *dest = (uint16_t *) _dest; \
499505 name ## base ## _X_c_template(c, lumFilter, lumSrc, lumFilterSize, \
500506 chrFilter, chrUSrc, chrVSrc, chrFilterSize, \
501507 alpSrc, dest, dstW, y, fmt); \
502508 } \
503509 \
504−static void name ## ext ## _2_c(SwsContext *c, const int16_t *buf[2], \
505− const int16_t *ubuf[2], const int16_t *vbuf[2], \
506− const int16_t *abuf[2], uint8_t *dest, int dstW, \
510+static void name ## ext ## _2_c(SwsContext *c, const int16_t *_buf[2], \
511+ const int16_t *_ubuf[2], const int16_t *_vbuf[2], \
512+ const int16_t *_abuf[2], uint8_t *_dest, int dstW, \
507513 int yalpha, int uvalpha, int y) \
508514 { \
515+ const int32_t **buf = (const int32_t **) _buf, \
516+ **ubuf = (const int32_t **) _ubuf, \
517+ **vbuf = (const int32_t **) _vbuf, \
518+ **abuf = (const int32_t **) _abuf; \
519+ uint16_t *dest = (uint16_t *) _dest; \
509520 name ## base ## _2_c_template(c, buf, ubuf, vbuf, abuf, \
510521 dest, dstW, yalpha, uvalpha, y, fmt); \
511522 } \
512523 \
513−static void name ## ext ## _1_c(SwsContext *c, const int16_t *buf0, \
514− const int16_t *ubuf[2], const int16_t *vbuf[2], \
515− const int16_t *abuf0, uint8_t *dest, int dstW, \
524+static void name ## ext ## _1_c(SwsContext *c, const int16_t *_buf0, \
525+ const int16_t *_ubuf[2], const int16_t *_vbuf[2], \
526+ const int16_t *_abuf0, uint8_t *_dest, int dstW, \
516527 int uvalpha, int y) \
517528 { \
529+ const int32_t *buf0 = (const int32_t *) _buf0, \
530+ **ubuf = (const int32_t **) _ubuf, \
531+ **vbuf = (const int32_t **) _vbuf, \
532+ *abuf0 = (const int32_t *) _abuf0; \
533+ uint16_t *dest = (uint16_t *) _dest; \
518534 name ## base ## _1_c_template(c, buf0, ubuf, vbuf, abuf0, dest, \
519535 dstW, uvalpha, y, fmt); \
520536 }
521537
522−YUV2PACKEDWRAPPER(yuv2gray16,, LE, PIX_FMT_GRAY16LE);
523−YUV2PACKEDWRAPPER(yuv2gray16,, BE, PIX_FMT_GRAY16BE);
538+YUV2PACKED16WRAPPER(yuv2gray16,, LE, PIX_FMT_GRAY16LE);
539+YUV2PACKED16WRAPPER(yuv2gray16,, BE, PIX_FMT_GRAY16BE);
524540
525541 #define output_pixel(pos, acc) \
526542 if (target == PIX_FMT_MONOBLACK) { \
@@ -616,6 +632,38 @@ yuv2mono_1_c_template(SwsContext *c, const int16_t *buf0, · 89 unmodified lines
616632
617633 #undef output_pixel
618634
635+#define YUV2PACKEDWRAPPER(name, base, ext, fmt) \
636+static void name ## ext ## _X_c(SwsContext *c, const int16_t *lumFilter, \
637+ const int16_t **lumSrc, int lumFilterSize, \
638+ const int16_t *chrFilter, const int16_t **chrUSrc, \
639+ const int16_t **chrVSrc, int chrFilterSize, \
640+ const int16_t **alpSrc, uint8_t *dest, int dstW, \
641+ int y) \
642+{ \
643+ name ## base ## _X_c_template(c, lumFilter, lumSrc, lumFilterSize, \
644+ chrFilter, chrUSrc, chrVSrc, chrFilterSize, \
645+ alpSrc, dest, dstW, y, fmt); \
646+} \
647+ \
648+static void name ## ext ## _2_c(SwsContext *c, const int16_t *buf[2], \
649+ const int16_t *ubuf[2], const int16_t *vbuf[2], \
650+ const int16_t *abuf[2], uint8_t *dest, int dstW, \
651+ int yalpha, int uvalpha, int y) \
652+{ \
653+ name ## base ## _2_c_template(c, buf, ubuf, vbuf, abuf, \
654+ dest, dstW, yalpha, uvalpha, y, fmt); \
655+} \
656+ \
657+static void name ## ext ## _1_c(SwsContext *c, const int16_t *buf0, \
658+ const int16_t *ubuf[2], const int16_t *vbuf[2], \
659+ const int16_t *abuf0, uint8_t *dest, int dstW, \
660+ int uvalpha, int y) \
661+{ \
662+ name ## base ## _1_c_template(c, buf0, ubuf, vbuf, \
663+ abuf0, dest, dstW, uvalpha, \
664+ y, fmt); \
665+}
666+
619667 YUV2PACKEDWRAPPER(yuv2mono,, white, PIX_FMT_MONOWHITE);
620668 YUV2PACKEDWRAPPER(yuv2mono,, black, PIX_FMT_MONOBLACK);
621669
@@ -731,26 +779,32 @@ yuv2422_1_c_template(SwsContext *c, const int16_t *buf0, · 109 unmodified lines
731779 YUV2PACKEDWRAPPER(yuv2, 422, yuyv422, PIX_FMT_YUYV422);
732780 YUV2PACKEDWRAPPER(yuv2, 422, uyvy422, PIX_FMT_UYVY422);
733781
734−#define r_b ((target == PIX_FMT_RGB48LE || target == PIX_FMT_RGB48BE) ? r : b)
735−#define b_r ((target == PIX_FMT_RGB48LE || target == PIX_FMT_RGB48BE) ? b : r)
782+#define R_B ((target == PIX_FMT_RGB48LE || target == PIX_FMT_RGB48BE) ? R : B)
783+#define B_R ((target == PIX_FMT_RGB48LE || target == PIX_FMT_RGB48BE) ? B : R)
784+#define output_pixel(pos, val) \
785+ if (isBE(target)) { \
786+ AV_WB16(pos, val); \
787+ } else { \
788+ AV_WL16(pos, val); \
789+ }
736790
737791 static av_always_inline void
738792 yuv2rgb48_X_c_template(SwsContext *c, const int16_t *lumFilter,
739− const int16_t **lumSrc, int lumFilterSize,
740− const int16_t *chrFilter, const int16_t **chrUSrc,
741− const int16_t **chrVSrc, int chrFilterSize,
742− const int16_t **alpSrc, uint8_t *dest, int dstW,
793+ const int32_t **lumSrc, int lumFilterSize,
794+ const int16_t *chrFilter, const int32_t **chrUSrc,
795+ const int32_t **chrVSrc, int chrFilterSize,
796+ const int32_t **alpSrc, uint16_t *dest, int dstW,
743797 int y, enum PixelFormat target)
744798 {
745799 int i;
746800
747801 for (i = 0; i < (dstW >> 1); i++) {
748802 int j;
749− int Y1 = 1 << 18;
750− int Y2 = 1 << 18;
751− int U = 1 << 18;
752− int V = 1 << 18;
753− const uint8_t *r, *g, *b;
803+ int Y1 = 0;
804+ int Y2 = 0;
805+ int U = -128 << 23; // 19
806+ int V = -128 << 23;
807+ int R, G, B;
754808
755809 for (j = 0; j < lumFilterSize; j++) {
756810 Y1 += lumSrc[j][i * 2] * lumFilter[j];
@@ -760,40 +814,45 @@ yuv2rgb48_X_c_template(SwsContext *c, const int16_t *lumFilter, · 3 unmodified lines
760814 U += chrUSrc[j][i] * chrFilter[j];
761815 V += chrVSrc[j][i] * chrFilter[j];
762816 }
763− Y1 >>= 19;
764− Y2 >>= 19;
765− U >>= 19;
766− V >>= 19;
767− if ((Y1 | Y2 | U | V) & 0x100) {
768− Y1 = av_clip_uint8(Y1);
769− Y2 = av_clip_uint8(Y2);
770− U = av_clip_uint8(U);
771− V = av_clip_uint8(V);
772− }
773817
774− /* FIXME fix tables so that clipping is not needed and then use _NOCLIP*/
775− r = (const uint8_t *) c->table_rV[V];
776− g = (const uint8_t *)(c->table_gU[U] + c->table_gV[V]);
777− b = (const uint8_t *) c->table_bU[U];
818+ // 8bit: 12+15=27; 16-bit: 12+19=31
819+ Y1 >>= 14; // 10
820+ Y2 >>= 14;
821+ U >>= 14;
822+ V >>= 14;
823+
824+ // 8bit: 27 -> 17bit, 16bit: 31 - 14 = 17bit
825+ Y1 -= c->yuv2rgb_y_offset;
826+ Y2 -= c->yuv2rgb_y_offset;
827+ Y1 *= c->yuv2rgb_y_coeff;
828+ Y2 *= c->yuv2rgb_y_coeff;
829+ Y1 += 1 << 13; // 21
830+ Y2 += 1 << 13;
831+ // 8bit: 17 + 13bit = 30bit, 16bit: 17 + 13bit = 30bit
832+
833+ R = V * c->yuv2rgb_v2r_coeff;
834+ G = V * c->yuv2rgb_v2g_coeff + U * c->yuv2rgb_u2g_coeff;
835+ B = U * c->yuv2rgb_u2b_coeff;
778836
779− dest[ 0] = dest[ 1] = r_b[Y1];
780− dest[ 2] = dest[ 3] = g[Y1];
781− dest[ 4] = dest[ 5] = b_r[Y1];
782− dest[ 6] = dest[ 7] = r_b[Y2];
783− dest[ 8] = dest[ 9] = g[Y2];
784− dest[10] = dest[11] = b_r[Y2];
785− dest += 12;
837+ // 8bit: 30 - 22 = 8bit, 16bit: 30bit - 14 = 16bit
838+ output_pixel(&dest[0], av_clip_uintp2(R_B + Y1, 30) >> 14);
839+ output_pixel(&dest[1], av_clip_uintp2( G + Y1, 30) >> 14);
840+ output_pixel(&dest[2], av_clip_uintp2(B_R + Y1, 30) >> 14);
841+ output_pixel(&dest[3], av_clip_uintp2(R_B + Y2, 30) >> 14);
842+ output_pixel(&dest[4], av_clip_uintp2( G + Y2, 30) >> 14);
843+ output_pixel(&dest[5], av_clip_uintp2(B_R + Y2, 30) >> 14);
844+ dest += 6;
786845 }
787846 }
788847
789848 static av_always_inline void
790−yuv2rgb48_2_c_template(SwsContext *c, const int16_t *buf[2],
791− const int16_t *ubuf[2], const int16_t *vbuf[2],
792− const int16_t *abuf[2], uint8_t *dest, int dstW,
849+yuv2rgb48_2_c_template(SwsContext *c, const int32_t *buf[2],
850+ const int32_t *ubuf[2], const int32_t *vbuf[2],
851+ const int32_t *abuf[2], uint16_t *dest, int dstW,
793852 int yalpha, int uvalpha, int y,
794853 enum PixelFormat target)
795854 {
796− const int16_t *buf0 = buf[0], *buf1 = buf[1],
855+ const int32_t *buf0 = buf[0], *buf1 = buf[1],
797856 *ubuf0 = ubuf[0], *ubuf1 = ubuf[1],
798857 *vbuf0 = vbuf[0], *vbuf1 = vbuf[1];
799858 int yalpha1 = 4095 - yalpha;
@@ -801,80 +860,108 @@ yuv2rgb48_2_c_template(SwsContext *c, const int16_t *buf[2], · 1 unmodified line
801860 int i;
802861
803862 for (i = 0; i < (dstW >> 1); i++) {
804− int Y1 = (buf0[i * 2] * yalpha1 + buf1[i * 2] * yalpha) >> 19;
805− int Y2 = (buf0[i * 2 + 1] * yalpha1 + buf1[i * 2 + 1] * yalpha) >> 19;
806− int U = (ubuf0[i] * uvalpha1 + ubuf1[i] * uvalpha) >> 19;
807− int V = (vbuf0[i] * uvalpha1 + vbuf1[i] * uvalpha) >> 19;
808− const uint8_t *r = (const uint8_t *) c->table_rV[V],
809− *g = (const uint8_t *)(c->table_gU[U] + c->table_gV[V]),
810− *b = (const uint8_t *) c->table_bU[U];
863+ int Y1 = (buf0[i * 2] * yalpha1 + buf1[i * 2] * yalpha) >> 14;
864+ int Y2 = (buf0[i * 2 + 1] * yalpha1 + buf1[i * 2 + 1] * yalpha) >> 14;
865+ int U = (ubuf0[i] * uvalpha1 + ubuf1[i] * uvalpha + (-128 << 23)) >> 14;
866+ int V = (vbuf0[i] * uvalpha1 + vbuf1[i] * uvalpha + (-128 << 23)) >> 14;
867+ int R, G, B;
811868
812− dest[ 0] = dest[ 1] = r_b[Y1];
813− dest[ 2] = dest[ 3] = g[Y1];
814− dest[ 4] = dest[ 5] = b_r[Y1];
815− dest[ 6] = dest[ 7] = r_b[Y2];
816− dest[ 8] = dest[ 9] = g[Y2];
817− dest[10] = dest[11] = b_r[Y2];
818− dest += 12;
869+ Y1 -= c->yuv2rgb_y_offset;
870+ Y2 -= c->yuv2rgb_y_offset;
871+ Y1 *= c->yuv2rgb_y_coeff;
872+ Y2 *= c->yuv2rgb_y_coeff;
873+ Y1 += 1 << 13;
874+ Y2 += 1 << 13;
875+
876+ R = V * c->yuv2rgb_v2r_coeff;
877+ G = V * c->yuv2rgb_v2g_coeff + U * c->yuv2rgb_u2g_coeff;
878+ B = U * c->yuv2rgb_u2b_coeff;
879+
880+ output_pixel(&dest[0], av_clip_uintp2(R_B + Y1, 30) >> 14);
881+ output_pixel(&dest[1], av_clip_uintp2( G + Y1, 30) >> 14);
882+ output_pixel(&dest[2], av_clip_uintp2(B_R + Y1, 30) >> 14);
883+ output_pixel(&dest[3], av_clip_uintp2(R_B + Y2, 30) >> 14);
884+ output_pixel(&dest[4], av_clip_uintp2( G + Y2, 30) >> 14);
885+ output_pixel(&dest[5], av_clip_uintp2(B_R + Y2, 30) >> 14);
886+ dest += 6;
819887 }
820888 }
821889
822890 static av_always_inline void
823−yuv2rgb48_1_c_template(SwsContext *c, const int16_t *buf0,
824− const int16_t *ubuf[2], const int16_t *vbuf[2],
825− const int16_t *abuf0, uint8_t *dest, int dstW,
891+yuv2rgb48_1_c_template(SwsContext *c, const int32_t *buf0,
892+ const int32_t *ubuf[2], const int32_t *vbuf[2],
893+ const int32_t *abuf0, uint16_t *dest, int dstW,
826894 int uvalpha, int y, enum PixelFormat target)
827895 {
828− const int16_t *ubuf0 = ubuf[0], *ubuf1 = ubuf[1],
896+ const int32_t *ubuf0 = ubuf[0], *ubuf1 = ubuf[1],
829897 *vbuf0 = vbuf[0], *vbuf1 = vbuf[1];
830898 int i;
831899
832900 if (uvalpha < 2048) {
833901 for (i = 0; i < (dstW >> 1); i++) {
834− int Y1 = buf0[i * 2] >> 7;
835− int Y2 = buf0[i * 2 + 1] >> 7;
836− int U = ubuf1[i] >> 7;
837− int V = vbuf1[i] >> 7;
838− const uint8_t *r = (const uint8_t *) c->table_rV[V],
839− *g = (const uint8_t *)(c->table_gU[U] + c->table_gV[V]),
840− *b = (const uint8_t *) c->table_bU[U];
841−
842− dest[ 0] = dest[ 1] = r_b[Y1];
843− dest[ 2] = dest[ 3] = g[Y1];
844− dest[ 4] = dest[ 5] = b_r[Y1];
845− dest[ 6] = dest[ 7] = r_b[Y2];
846− dest[ 8] = dest[ 9] = g[Y2];
847− dest[10] = dest[11] = b_r[Y2];
848− dest += 12;
902+ int Y1 = (buf0[i * 2] ) >> 2;
903+ int Y2 = (buf0[i * 2 + 1]) >> 2;
904+ int U = (ubuf0[i] + (-128 << 11)) >> 2;
905+ int V = (vbuf0[i] + (-128 << 11)) >> 2;
906+ int R, G, B;
907+
908+ Y1 -= c->yuv2rgb_y_offset;
909+ Y2 -= c->yuv2rgb_y_offset;
910+ Y1 *= c->yuv2rgb_y_coeff;
911+ Y2 *= c->yuv2rgb_y_coeff;
912+ Y1 += 1 << 13;
913+ Y2 += 1 << 13;
914+
915+ R = V * c->yuv2rgb_v2r_coeff;
916+ G = V * c->yuv2rgb_v2g_coeff + U * c->yuv2rgb_u2g_coeff;
917+ B = U * c->yuv2rgb_u2b_coeff;
918+
919+ output_pixel(&dest[0], av_clip_uintp2(R_B + Y1, 30) >> 14);
920+ output_pixel(&dest[1], av_clip_uintp2( G + Y1, 30) >> 14);
921+ output_pixel(&dest[2], av_clip_uintp2(B_R + Y1, 30) >> 14);
922+ output_pixel(&dest[3], av_clip_uintp2(R_B + Y2, 30) >> 14);
923+ output_pixel(&dest[4], av_clip_uintp2( G + Y2, 30) >> 14);
924+ output_pixel(&dest[5], av_clip_uintp2(B_R + Y2, 30) >> 14);
925+ dest += 6;
849926 }
850927 } else {
851928 for (i = 0; i < (dstW >> 1); i++) {
852− int Y1 = buf0[i * 2] >> 7;
853− int Y2 = buf0[i * 2 + 1] >> 7;
854− int U = (ubuf0[i] + ubuf1[i]) >> 8;
855− int V = (vbuf0[i] + vbuf1[i]) >> 8;
856− const uint8_t *r = (const uint8_t *) c->table_rV[V],
857− *g = (const uint8_t *)(c->table_gU[U] + c->table_gV[V]),
858− *b = (const uint8_t *) c->table_bU[U];
859−
860− dest[ 0] = dest[ 1] = r_b[Y1];
861− dest[ 2] = dest[ 3] = g[Y1];
862− dest[ 4] = dest[ 5] = b_r[Y1];
863− dest[ 6] = dest[ 7] = r_b[Y2];
864− dest[ 8] = dest[ 9] = g[Y2];
865− dest[10] = dest[11] = b_r[Y2];
866− dest += 12;
929+ int Y1 = (buf0[i * 2] ) >> 2;
930+ int Y2 = (buf0[i * 2 + 1]) >> 2;
931+ int U = (ubuf0[i] + ubuf1[i] + (-128 << 11)) >> 3;
932+ int V = (vbuf0[i] + vbuf1[i] + (-128 << 11)) >> 3;
933+ int R, G, B;
934+
935+ Y1 -= c->yuv2rgb_y_offset;
936+ Y2 -= c->yuv2rgb_y_offset;
937+ Y1 *= c->yuv2rgb_y_coeff;
938+ Y2 *= c->yuv2rgb_y_coeff;
939+ Y1 += 1 << 13;
940+ Y2 += 1 << 13;
941+
942+ R = V * c->yuv2rgb_v2r_coeff;
943+ G = V * c->yuv2rgb_v2g_coeff + U * c->yuv2rgb_u2g_coeff;
944+ B = U * c->yuv2rgb_u2b_coeff;
945+
946+ output_pixel(&dest[0], av_clip_uintp2(R_B + Y1, 30) >> 14);
947+ output_pixel(&dest[1], av_clip_uintp2( G + Y1, 30) >> 14);
948+ output_pixel(&dest[2], av_clip_uintp2(B_R + Y1, 30) >> 14);
949+ output_pixel(&dest[3], av_clip_uintp2(R_B + Y2, 30) >> 14);
950+ output_pixel(&dest[4], av_clip_uintp2( G + Y2, 30) >> 14);
951+ output_pixel(&dest[5], av_clip_uintp2(B_R + Y2, 30) >> 14);
952+ dest += 6;
867953 }
868954 }
869955 }
870956
957+#undef output_pixel
871958 #undef r_b
872959 #undef b_r
873960
874−YUV2PACKEDWRAPPER(yuv2, rgb48, rgb48be, PIX_FMT_RGB48BE);
875−//YUV2PACKEDWRAPPER(yuv2, rgb48, rgb48le, PIX_FMT_RGB48LE);
876−YUV2PACKEDWRAPPER(yuv2, rgb48, bgr48be, PIX_FMT_BGR48BE);
877−//YUV2PACKEDWRAPPER(yuv2, rgb48, bgr48le, PIX_FMT_BGR48LE);
961+YUV2PACKED16WRAPPER(yuv2, rgb48, rgb48be, PIX_FMT_RGB48BE);
962+YUV2PACKED16WRAPPER(yuv2, rgb48, rgb48le, PIX_FMT_RGB48LE);
963+YUV2PACKED16WRAPPER(yuv2, rgb48, bgr48be, PIX_FMT_BGR48BE);
964+YUV2PACKED16WRAPPER(yuv2, rgb48, bgr48le, PIX_FMT_BGR48LE);
878965
879966 static av_always_inline void
880967 yuv2rgb_write(uint8_t *_dest, int i, int Y1, int Y2,
@@ -1025,7 +1112,7 @@ yuv2rgb_X_c_template(SwsContext *c, const int16_t *lumFilter, · 144 unmodified lines
10251112 U = av_clip_uint8(U);
10261113 V = av_clip_uint8(V);
10271114 }
1028− if (hasAlpha) {\
1115+ if (hasAlpha) {
10291116 A1 = 1 << 18;
10301117 A2 = 1 << 18;
10311118 for (j = 0; j < lumFilterSize; j++) {
@@ -1318,50 +1405,50 @@ static av_always_inline void fillPlane(uint8_t* plane, int stride, · 286 unmodified lines
13181405 #define b ((origin == PIX_FMT_BGR48BE || origin == PIX_FMT_BGR48LE) ? r_b : b_r)
13191406
13201407 static av_always_inline void
1321−rgb48ToY_c_template(uint8_t *dst, const uint8_t *src, int width,
1408+rgb48ToY_c_template(uint16_t *dst, const uint16_t *src, int width,
13221409 enum PixelFormat origin)
13231410 {
13241411 int i;
13251412 for (i = 0; i < width; i++) {
1326− int r_b = input_pixel(&src[i*6+0]) >> 8;
1327− int g = input_pixel(&src[i*6+2]) >> 8;
1328− int b_r = input_pixel(&src[i*6+4]) >> 8;
1413+ unsigned int r_b = input_pixel(&src[i*3+0]);
1414+ unsigned int g = input_pixel(&src[i*3+1]);
1415+ unsigned int b_r = input_pixel(&src[i*3+2]);
13291416
1330− dst[i] = (RY*r + GY*g + BY*b + (33<<(RGB2YUV_SHIFT-1))) >> RGB2YUV_SHIFT;
1417+ dst[i] = (RY*r + GY*g + BY*b + (0x2001<<(RGB2YUV_SHIFT-1))) >> RGB2YUV_SHIFT;
13311418 }
13321419 }
13331420
13341421 static av_always_inline void
1335−rgb48ToUV_c_template(uint8_t *dstU, uint8_t *dstV,
1336− const uint8_t *src1, const uint8_t *src2,
1422+rgb48ToUV_c_template(uint16_t *dstU, uint16_t *dstV,
1423+ const uint16_t *src1, const uint16_t *src2,
13371424 int width, enum PixelFormat origin)
13381425 {
13391426 int i;
13401427 assert(src1==src2);
13411428 for (i = 0; i < width; i++) {
1342− int r_b = input_pixel(&src1[i*6+0]) >> 8;
1343− int g = input_pixel(&src1[i*6+2]) >> 8;
1344− int b_r = input_pixel(&src1[i*6+4]) >> 8;
1429+ int r_b = input_pixel(&src1[i*3+0]);
1430+ int g = input_pixel(&src1[i*3+1]);
1431+ int b_r = input_pixel(&src1[i*3+2]);
13451432
1346− dstU[i] = (RU*r + GU*g + BU*b + (257<<(RGB2YUV_SHIFT-1))) >> RGB2YUV_SHIFT;
1347− dstV[i] = (RV*r + GV*g + BV*b + (257<<(RGB2YUV_SHIFT-1))) >> RGB2YUV_SHIFT;
1433+ dstU[i] = (RU*r + GU*g + BU*b + (0x10001<<(RGB2YUV_SHIFT-1))) >> RGB2YUV_SHIFT;
1434+ dstV[i] = (RV*r + GV*g + BV*b + (0x10001<<(RGB2YUV_SHIFT-1))) >> RGB2YUV_SHIFT;
13481435 }
13491436 }
13501437
13511438 static av_always_inline void
1352−rgb48ToUV_half_c_template(uint8_t *dstU, uint8_t *dstV,
1353− const uint8_t *src1, const uint8_t *src2,
1439+rgb48ToUV_half_c_template(uint16_t *dstU, uint16_t *dstV,
1440+ const uint16_t *src1, const uint16_t *src2,
13541441 int width, enum PixelFormat origin)
13551442 {
13561443 int i;
13571444 assert(src1==src2);
13581445 for (i = 0; i < width; i++) {
1359− int r_b = (input_pixel(&src1[12*i + 0]) >> 8) + (input_pixel(&src1[12*i + 6]) >> 8);
1360− int g = (input_pixel(&src1[12*i + 2]) >> 8) + (input_pixel(&src1[12*i + 8]) >> 8);
1361− int b_r = (input_pixel(&src1[12*i + 4]) >> 8) + (input_pixel(&src1[12*i + 10]) >> 8);
1446+ int r_b = (input_pixel(&src1[6 * i + 0]) + input_pixel(&src1[6 * i + 3]) + 1) >> 1;
1447+ int g = (input_pixel(&src1[6 * i + 1]) + input_pixel(&src1[6 * i + 4]) + 1) >> 1;
1448+ int b_r = (input_pixel(&src1[6 * i + 2]) + input_pixel(&src1[6 * i + 5]) + 1) >> 1;
13621449
1363− dstU[i]= (RU*r + GU*g + BU*b + (257<<RGB2YUV_SHIFT)) >> (RGB2YUV_SHIFT+1);
1364− dstV[i]= (RV*r + GV*g + BV*b + (257<<RGB2YUV_SHIFT)) >> (RGB2YUV_SHIFT+1);
1450+ dstU[i]= (RU*r + GU*g + BU*b + (0x10001<<(RGB2YUV_SHIFT-1))) >> RGB2YUV_SHIFT;
1451+ dstV[i]= (RV*r + GV*g + BV*b + (0x10001<<(RGB2YUV_SHIFT-1))) >> RGB2YUV_SHIFT;
13651452 }
13661453 }
13671454
@@ -1370,23 +1457,31 @@ rgb48ToUV_half_c_template(uint8_t *dstU, uint8_t *dstV, · 2 unmodified lines
13701457 #undef input_pixel
13711458
13721459 #define rgb48funcs(pattern, BE_LE, origin) \
1373−static void pattern ## 48 ## BE_LE ## ToY_c(uint8_t *dst, const uint8_t *src, \
1460+static void pattern ## 48 ## BE_LE ## ToY_c(uint8_t *_dst, const uint8_t *_src, \
13741461 int width, uint32_t *unused) \
13751462 { \
1463+ const uint16_t *src = (const uint16_t *) _src; \
1464+ uint16_t *dst = (uint16_t *) _dst; \
13761465 rgb48ToY_c_template(dst, src, width, origin); \
13771466 } \
13781467 \
1379−static void pattern ## 48 ## BE_LE ## ToUV_c(uint8_t *dstU, uint8_t *dstV, \
1380− const uint8_t *src1, const uint8_t *src2, \
1468+static void pattern ## 48 ## BE_LE ## ToUV_c(uint8_t *_dstU, uint8_t *_dstV, \
1469+ const uint8_t *_src1, const uint8_t *_src2, \
13811470 int width, uint32_t *unused) \
13821471 { \
1472+ const uint16_t *src1 = (const uint16_t *) _src1, \
1473+ *src2 = (const uint16_t *) _src2; \
1474+ uint16_t *dstU = (uint16_t *) _dstU, *dstV = (uint16_t *) _dstV; \
13831475 rgb48ToUV_c_template(dstU, dstV, src1, src2, width, origin); \
13841476 } \
13851477 \
1386−static void pattern ## 48 ## BE_LE ## ToUV_half_c(uint8_t *dstU, uint8_t *dstV, \
1387− const uint8_t *src1, const uint8_t *src2, \
1478+static void pattern ## 48 ## BE_LE ## ToUV_half_c(uint8_t *_dstU, uint8_t *_dstV, \
1479+ const uint8_t *_src1, const uint8_t *_src2, \
13881480 int width, uint32_t *unused) \
13891481 { \
1482+ const uint16_t *src1 = (const uint16_t *) _src1, \
1483+ *src2 = (const uint16_t *) _src2; \
1484+ uint16_t *dstU = (uint16_t *) _dstU, *dstV = (uint16_t *) _dstV; \
13901485 rgb48ToUV_half_c_template(dstU, dstV, src1, src2, width, origin); \
13911486 }
13921487
@@ -1601,13 +1696,26 @@ static void yuy2ToUV_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, · 208 unmodified lines
16011696 assert(src1 == src2);
16021697 }
16031698
1604−static void LEToUV_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1,
1605− const uint8_t *src2, int width, uint32_t *unused)
1699+static void bswap16Y_c(uint8_t *_dst, const uint8_t *_src, int width, uint32_t *unused)
16061700 {
16071701 int i;
1702+ const uint16_t *src = (const uint16_t *) _src;
1703+ uint16_t *dst = (uint16_t *) _dst;
16081704 for (i=0; i<width; i++) {
1609− dstU[i]= src1[2*i + 1];
1610− dstV[i]= src2[2*i + 1];
1705+ dst[i] = av_bswap16(src[i]);
1706+ }
1707+}
1708+
1709+static void bswap16UV_c(uint8_t *_dstU, uint8_t *_dstV, const uint8_t *_src1,
1710+ const uint8_t *_src2, int width, uint32_t *unused)
1711+{
1712+ int i;
1713+ const uint16_t *src1 = (const uint16_t *) _src1,
1714+ *src2 = (const uint16_t *) _src2;
1715+ uint16_t *dstU = (uint16_t *) _dstU, *dstV = (uint16_t *) _dstV;
1716+ for (i=0; i<width; i++) {
1717+ dstU[i] = av_bswap16(src1[i]);
1718+ dstV[i] = av_bswap16(src2[i]);
16111719 }
16121720 }
16131721
@@ -1632,16 +1740,6 @@ static void uyvyToUV_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, · 18 unmodified lines
16321740 assert(src1 == src2);
16331741 }
16341742
1635−static void BEToUV_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1,
1636− const uint8_t *src2, int width, uint32_t *unused)
1637−{
1638− int i;
1639− for (i=0; i<width; i++) {
1640− dstU[i]= src1[2*i];
1641− dstV[i]= src2[2*i];
1642− }
1643−}
1644−
16451743 static av_always_inline void nvXXtoUV_c(uint8_t *dst1, uint8_t *dst2,
16461744 const uint8_t *src, int width)
16471745 {
@@ -1670,43 +1768,49 @@ static void nv21ToUV_c(uint8_t *dstU, uint8_t *dstV, · 22 unmodified lines
16701768
16711769 // FIXME Maybe dither instead.
16721770 static av_always_inline void
1673−yuv9_OR_10ToUV_c_template(uint8_t *dstU, uint8_t *dstV,
1674− const uint8_t *_srcU, const uint8_t *_srcV,
1771+yuv9_OR_10ToUV_c_template(uint16_t *dstU, uint16_t *dstV,
1772+ const uint16_t *srcU, const uint16_t *srcV,
16751773 int width, enum PixelFormat origin, int depth)
16761774 {
16771775 int i;
1678− const uint16_t *srcU = (const uint16_t *) _srcU;
1679− const uint16_t *srcV = (const uint16_t *) _srcV;
16801776
16811777 for (i = 0; i < width; i++) {
1682− dstU[i] = input_pixel(&srcU[i]) >> (depth - 8);
1683− dstV[i] = input_pixel(&srcV[i]) >> (depth - 8);
1778+ int upx = input_pixel(&srcU[i]);
1779+ int vpx = input_pixel(&srcV[i]);
1780+ dstU[i] = (upx << (16 - depth)) | (upx >> (2 * depth - 16));
1781+ dstV[i] = (vpx << (16 - depth)) | (vpx >> (2 * depth - 16));
16841782 }
16851783 }
16861784
16871785 static av_always_inline void
1688−yuv9_or_10ToY_c_template(uint8_t *dstY, const uint8_t *_srcY,
1786+yuv9_or_10ToY_c_template(uint16_t *dstY, const uint16_t *srcY,
16891787 int width, enum PixelFormat origin, int depth)
16901788 {
16911789 int i;
1692− const uint16_t *srcY = (const uint16_t*)_srcY;
16931790
1694− for (i = 0; i < width; i++)
1695− dstY[i] = input_pixel(&srcY[i]) >> (depth - 8);
1791+ for (i = 0; i < width; i++) {
1792+ int px = input_pixel(&srcY[i]);
1793+ dstY[i] = (px << (16 - depth)) | (px >> (2 * depth - 16));
1794+ }
16961795 }
16971796
16981797 #undef input_pixel
16991798
17001799 #define YUV_NBPS(depth, BE_LE, origin) \
1701−static void BE_LE ## depth ## ToUV_c(uint8_t *dstU, uint8_t *dstV, \
1702− const uint8_t *srcU, const uint8_t *srcV, \
1800+static void BE_LE ## depth ## ToUV_c(uint8_t *_dstU, uint8_t *_dstV, \
1801+ const uint8_t *_srcU, const uint8_t *_srcV, \
17031802 int width, uint32_t *unused) \
17041803 { \
1804+ uint16_t *dstU = (uint16_t *) _dstU, *dstV = (uint16_t *) _dstV; \
1805+ const uint16_t *srcU = (const uint16_t *) _srcU, \
1806+ *srcV = (const uint16_t *) _srcV; \
17051807 yuv9_OR_10ToUV_c_template(dstU, dstV, srcU, srcV, width, origin, depth); \
17061808 } \
1707−static void BE_LE ## depth ## ToY_c(uint8_t *dstY, const uint8_t *srcY, \
1809+static void BE_LE ## depth ## ToY_c(uint8_t *_dstY, const uint8_t *_srcY, \
17081810 int width, uint32_t *unused) \
17091811 { \
1812+ uint16_t *dstY = (uint16_t *) _dstY; \
1813+ const uint16_t *srcY = (const uint16_t *) _srcY; \
17101814 yuv9_or_10ToY_c_template(dstY, srcY, width, origin, depth); \
17111815 }
17121816
@@ -1801,6 +1905,27 @@ static void rgb24ToUV_half_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, · 88 unmodified lines
18011905 }
18021906 }
18031907
1908+static void hScale16_c(int16_t *_dst, int dstW, const uint8_t *_src,
1909+ const int16_t *filter,
1910+ const int16_t *filterPos, int filterSize)
1911+{
1912+ int i;
1913+ int32_t *dst = (int32_t *) _dst;
1914+ const uint16_t *src = (const uint16_t *) _src;
1915+
1916+ for (i = 0; i < dstW; i++) {
1917+ int j;
1918+ int srcPos = filterPos[i];
1919+ unsigned int val = 0;
1920+
1921+ for (j = 0; j < filterSize; j++) {
1922+ val += src[srcPos + j] * filter[filterSize * i + j];
1923+ }
1924+ // filter=14 bit, input=16 bit, output=30 bit, >> 11 makes 19 bit
1925+ dst[i] = FFMIN(val >> 11, (1 << 19) - 1);
1926+ }
1927+}
1928+
18041929 // bilinear / bicubic scaling
18051930 static void hScale_c(int16_t *dst, int dstW, const uint8_t *src,
18061931 const int16_t *filter, const int16_t *filterPos,
@@ -1851,6 +1976,41 @@ static void lumRangeFromJpeg_c(int16_t *dst, int width) · 44 unmodified lines
18511976 dst[i] = (dst[i]*14071 + 33561947)>>14;
18521977 }
18531978
1979+static void chrRangeToJpeg16_c(int16_t *_dstU, int16_t *_dstV, int width)
1980+{
1981+ int i;
1982+ int32_t *dstU = (int32_t *) _dstU;
1983+ int32_t *dstV = (int32_t *) _dstV;
1984+ for (i = 0; i < width; i++) {
1985+ dstU[i] = (FFMIN(dstU[i],30775)*4663 - 9289992)>>12; //-264
1986+ dstV[i] = (FFMIN(dstV[i],30775)*4663 - 9289992)>>12; //-264
1987+ }
1988+}
1989+static void chrRangeFromJpeg16_c(int16_t *_dstU, int16_t *_dstV, int width)
1990+{
1991+ int i;
1992+ int32_t *dstU = (int32_t *) _dstU;
1993+ int32_t *dstV = (int32_t *) _dstV;
1994+ for (i = 0; i < width; i++) {
1995+ dstU[i] = (dstU[i]*1799 + 4081085)>>11; //1469
1996+ dstV[i] = (dstV[i]*1799 + 4081085)>>11; //1469
1997+ }
1998+}
1999+static void lumRangeToJpeg16_c(int16_t *_dst, int width)
2000+{
2001+ int i;
2002+ int32_t *dst = (int32_t *) _dst;
2003+ for (i = 0; i < width; i++)
2004+ dst[i] = (FFMIN(dst[i],30189)*19077 - 39057361)>>14;
2005+}
2006+static void lumRangeFromJpeg16_c(int16_t *_dst, int width)
2007+{
2008+ int i;
2009+ int32_t *dst = (int32_t *) _dst;
2010+ for (i = 0; i < width; i++)
2011+ dst[i] = (dst[i]*14071 + 33561947)>>14;
2012+}
2013+
18542014 static void hyscale_fast_c(SwsContext *c, int16_t *dst, int dstWidth,
18552015 const uint8_t *src, int srcW, int xInc)
18562016 {
@@ -1864,8 +2024,25 @@ static void hyscale_fast_c(SwsContext *c, int16_t *dst, int dstWidth, · 7 unmodified lines
18642024 }
18652025 }
18662026
2027+static void scale8To16Rv_c(uint16_t *_dst, const uint8_t *src, int len)
2028+{
2029+ int i;
2030+ uint8_t *dst = (uint8_t *) _dst;
2031+ for (i = len - 1; i >= 0; i--) {
2032+ dst[i * 2] = dst[i * 2 + 1] = src[i];
2033+ }
2034+}
2035+
2036+static void scale19To15Fw_c(int16_t *dst, const int32_t *src, int len)
2037+{
2038+ int i;
2039+ for (i = 0; i < len; i++) {
2040+ dst[i] = src[i] >> 4;
2041+ }
2042+}
2043+
18672044 // *** horizontal scale Y line to temp buffer
1868−static av_always_inline void hyscale(SwsContext *c, uint16_t *dst, int dstWidth,
2045+static av_always_inline void hyscale(SwsContext *c, int16_t *dst, int dstWidth,
18692046 const uint8_t *src, int srcW, int xInc,
18702047 const int16_t *hLumFilter,
18712048 const int16_t *hLumFilterPos, int hLumFilterSize,
@@ -1880,6 +2057,11 @@ static av_always_inline void hyscale(SwsContext *c, uint16_t *dst, int dstWidth, · 8 unmodified lines
18802057 src= formatConvBuffer;
18812058 }
18822059
2060+ if (av_pix_fmt_descriptors[c->srcFormat].comp[0].depth_minus1 < 8 && c->scalingBpp == 16) {
2061+ c->scale8To16Rv((uint16_t *) formatConvBuffer, src, srcW);
2062+ src = formatConvBuffer;
2063+ }
2064+
18832065 if (!c->hyscale_fast) {
18842066 c->hScale(dst, dstWidth, src, hLumFilter, hLumFilterPos, hLumFilterSize);
18852067 } else { // fast bilinear upscale / crap downscale
@@ -1888,6 +2070,10 @@ static av_always_inline void hyscale(SwsContext *c, uint16_t *dst, int dstWidth, · 2 unmodified lines
18882070
18892071 if (convertRange)
18902072 convertRange(dst, dstWidth);
2073+
2074+ if (av_pix_fmt_descriptors[c->dstFormat].comp[0].depth_minus1 < 8 && c->scalingBpp == 16) {
2075+ c->scale19To15Fw(dst, (int32_t *) dst, dstWidth);
2076+ }
18912077 }
18922078
18932079 static void hcscale_fast_c(SwsContext *c, int16_t *dst1, int16_t *dst2,
@@ -1905,19 +2091,27 @@ static void hcscale_fast_c(SwsContext *c, int16_t *dst1, int16_t *dst2, · 11 unmodified lines
19052091 }
19062092 }
19072093
1908−static av_always_inline void hcscale(SwsContext *c, uint16_t *dst1, uint16_t *dst2, int dstWidth,
2094+static av_always_inline void hcscale(SwsContext *c, int16_t *dst1, int16_t *dst2, int dstWidth,
19092095 const uint8_t *src1, const uint8_t *src2,
19102096 int srcW, int xInc, const int16_t *hChrFilter,
19112097 const int16_t *hChrFilterPos, int hChrFilterSize,
19122098 uint8_t *formatConvBuffer, uint32_t *pal)
19132099 {
19142100 if (c->chrToYV12) {
1915− uint8_t *buf2 = formatConvBuffer + FFALIGN(srcW, 16);
2101+ uint8_t *buf2 = formatConvBuffer + FFALIGN(srcW * c->scalingBpp >> 3, 16);
19162102 c->chrToYV12(formatConvBuffer, buf2, src1, src2, srcW, pal);
19172103 src1= formatConvBuffer;
19182104 src2= buf2;
19192105 }
19202106
2107+ if (av_pix_fmt_descriptors[c->srcFormat].comp[0].depth_minus1 < 8 && c->scalingBpp == 16) {
2108+ uint8_t *buf2 = (formatConvBuffer + FFALIGN(srcW * 2, 16));
2109+ c->scale8To16Rv((uint16_t *) formatConvBuffer, src1, srcW);
2110+ c->scale8To16Rv((uint16_t *) buf2, src2, srcW);
2111+ src1 = formatConvBuffer;
2112+ src2 = buf2;
2113+ }
2114+
19212115 if (!c->hcscale_fast) {
19222116 c->hScale(dst1, dstWidth, src1, hChrFilter, hChrFilterPos, hChrFilterSize);
19232117 c->hScale(dst2, dstWidth, src2, hChrFilter, hChrFilterPos, hChrFilterSize);
@@ -1927,6 +2121,11 @@ static av_always_inline void hcscale(SwsContext *c, uint16_t *dst1, uint16_t *ds · 3 unmodified lines
19272121
19282122 if (c->chrConvertRange)
19292123 c->chrConvertRange(dst1, dst2, dstWidth);
2124+
2125+ if (av_pix_fmt_descriptors[c->dstFormat].comp[0].depth_minus1 < 8 && c->scalingBpp == 16) {
2126+ c->scale19To15Fw(dst1, (int32_t *) dst1, dstWidth);
2127+ c->scale19To15Fw(dst2, (int32_t *) dst2, dstWidth);
2128+ }
19302129 }
19312130
19322131 static av_always_inline void
@@ -2049,20 +2248,20 @@ find_c_packed_planar_out_funcs(SwsContext *c, · 116 unmodified lines
20492248 *yuv2packedX = yuv2uyvy422_X_c;
20502249 break;
20512250 case PIX_FMT_RGB48LE:
2052− //*yuv2packed1 = yuv2rgb48le_1_c;
2053− //*yuv2packed2 = yuv2rgb48le_2_c;
2054− //*yuv2packedX = yuv2rgb48le_X_c;
2055− //break;
2251+ *yuv2packed1 = yuv2rgb48le_1_c;
2252+ *yuv2packed2 = yuv2rgb48le_2_c;
2253+ *yuv2packedX = yuv2rgb48le_X_c;
2254+ break;
20562255 case PIX_FMT_RGB48BE:
20572256 *yuv2packed1 = yuv2rgb48be_1_c;
20582257 *yuv2packed2 = yuv2rgb48be_2_c;
20592258 *yuv2packedX = yuv2rgb48be_X_c;
20602259 break;
20612260 case PIX_FMT_BGR48LE:
2062− //*yuv2packed1 = yuv2bgr48le_1_c;
2063− //*yuv2packed2 = yuv2bgr48le_2_c;
2064− //*yuv2packedX = yuv2bgr48le_X_c;
2065− //break;
2261+ *yuv2packed1 = yuv2bgr48le_1_c;
2262+ *yuv2packed2 = yuv2bgr48le_2_c;
2263+ *yuv2packedX = yuv2bgr48le_X_c;
2264+ break;
20662265 case PIX_FMT_BGR48BE:
20672266 *yuv2packed1 = yuv2bgr48be_1_c;
20682267 *yuv2packed2 = yuv2bgr48be_2_c;
@@ -2435,13 +2634,6 @@ static av_cold void sws_init_swScale_c(SwsContext *c) · 366 unmodified lines
24352634 &c->yuv2packed1, &c->yuv2packed2,
24362635 &c->yuv2packedX);
24372636
2438− c->hScale = hScale_c;
2439−
2440− if (c->flags & SWS_FAST_BILINEAR) {
2441− c->hyscale_fast = hyscale_fast_c;
2442− c->hcscale_fast = hcscale_fast_c;
2443− }
2444−
24452637 c->chrToYV12 = NULL;
24462638 switch(srcFormat) {
24472639 case PIX_FMT_YUYV422 : c->chrToYV12 = yuy2ToUV_c; break;
@@ -2453,22 +2645,25 @@ static av_cold void sws_init_swScale_c(SwsContext *c) · 5 unmodified lines
24532645 case PIX_FMT_PAL8 :
24542646 case PIX_FMT_BGR4_BYTE:
24552647 case PIX_FMT_RGB4_BYTE: c->chrToYV12 = palToUV_c; break;
2456− case PIX_FMT_YUV444P9BE:
2457− case PIX_FMT_YUV420P9BE: c->chrToYV12 = BE9ToUV_c; break;
24582648 case PIX_FMT_YUV444P9LE:
2459− case PIX_FMT_YUV420P9LE: c->chrToYV12 = LE9ToUV_c; break;
2460− case PIX_FMT_YUV444P10BE:
2461− case PIX_FMT_YUV422P10BE:
2462− case PIX_FMT_YUV420P10BE: c->chrToYV12 = BE10ToUV_c; break;
2649+ case PIX_FMT_YUV420P9LE: c->chrToYV12 = LE9ToUV_c; break;
24632650 case PIX_FMT_YUV422P10LE:
24642651 case PIX_FMT_YUV444P10LE:
24652652 case PIX_FMT_YUV420P10LE: c->chrToYV12 = LE10ToUV_c; break;
2466− case PIX_FMT_YUV420P16BE:
2467− case PIX_FMT_YUV422P16BE:
2468− case PIX_FMT_YUV444P16BE: c->chrToYV12 = BEToUV_c; break;
2653+ case PIX_FMT_YUV444P9BE:
2654+ case PIX_FMT_YUV420P9BE: c->chrToYV12 = BE9ToUV_c; break;
2655+ case PIX_FMT_YUV444P10BE:
2656+ case PIX_FMT_YUV422P10BE:
2657+ case PIX_FMT_YUV420P10BE: c->chrToYV12 = BE10ToUV_c; break;
2658+#if HAVE_BIGENDIAN
24692659 case PIX_FMT_YUV420P16LE:
24702660 case PIX_FMT_YUV422P16LE:
2471− case PIX_FMT_YUV444P16LE: c->chrToYV12 = LEToUV_c; break;
2661+ case PIX_FMT_YUV444P16LE: c->chrToYV12 = bswap16UV_c; break;
2662+#else
2663+ case PIX_FMT_YUV420P16BE:
2664+ case PIX_FMT_YUV422P16BE:
2665+ case PIX_FMT_YUV444P16BE: c->chrToYV12 = bswap16UV_c; break;
2666+#endif
24722667 }
24732668 if (c->chrSrcHSubSample) {
24742669 switch(srcFormat) {
@@ -2517,27 +2712,30 @@ static av_cold void sws_init_swScale_c(SwsContext *c) · 42 unmodified lines
25172712 c->lumToYV12 = NULL;
25182713 c->alpToYV12 = NULL;
25192714 switch (srcFormat) {
2520− case PIX_FMT_YUV444P9BE:
2521− case PIX_FMT_YUV420P9BE: c->lumToYV12 = BE9ToY_c; break;
25222715 case PIX_FMT_YUV444P9LE:
2523− case PIX_FMT_YUV420P9LE: c->lumToYV12 = LE9ToY_c; break;
2524− case PIX_FMT_YUV444P10BE:
2525− case PIX_FMT_YUV422P10BE:
2526− case PIX_FMT_YUV420P10BE: c->lumToYV12 = BE10ToY_c; break;
2716+ case PIX_FMT_YUV420P9LE: c->lumToYV12 = LE9ToY_c; break;
25272717 case PIX_FMT_YUV444P10LE:
25282718 case PIX_FMT_YUV422P10LE:
25292719 case PIX_FMT_YUV420P10LE: c->lumToYV12 = LE10ToY_c; break;
2530− case PIX_FMT_YUYV422 :
2531− case PIX_FMT_YUV420P16BE:
2532− case PIX_FMT_YUV422P16BE:
2533− case PIX_FMT_YUV444P16BE:
2534− case PIX_FMT_Y400A :
2535− case PIX_FMT_GRAY16BE : c->lumToYV12 = yuy2ToY_c; break;
2536− case PIX_FMT_UYVY422 :
2720+ case PIX_FMT_YUV444P9BE:
2721+ case PIX_FMT_YUV420P9BE: c->lumToYV12 = BE9ToY_c; break;
2722+ case PIX_FMT_YUV444P10BE:
2723+ case PIX_FMT_YUV422P10BE:
2724+ case PIX_FMT_YUV420P10BE: c->lumToYV12 = BE10ToY_c; break;
2725+#if HAVE_BIGENDIAN
25372726 case PIX_FMT_YUV420P16LE:
25382727 case PIX_FMT_YUV422P16LE:
25392728 case PIX_FMT_YUV444P16LE:
2540− case PIX_FMT_GRAY16LE : c->lumToYV12 = uyvyToY_c; break;
2729+ case PIX_FMT_GRAY16LE: c->lumToYV12 = bswap16Y_c; break;
2730+#else
2731+ case PIX_FMT_YUV420P16BE:
2732+ case PIX_FMT_YUV422P16BE:
2733+ case PIX_FMT_YUV444P16BE:
2734+ case PIX_FMT_GRAY16BE: c->lumToYV12 = bswap16Y_c; break;
2735+#endif
2736+ case PIX_FMT_YUYV422 :
2737+ case PIX_FMT_Y400A : c->lumToYV12 = yuy2ToY_c; break;
2738+ case PIX_FMT_UYVY422 : c->lumToYV12 = uyvyToY_c; break;
25412739 case PIX_FMT_BGR24 : c->lumToYV12 = bgr24ToY_c; break;
25422740 case PIX_FMT_BGR565LE : c->lumToYV12 = bgr16leToY_c; break;
25432741 case PIX_FMT_BGR565BE : c->lumToYV12 = bgr16beToY_c; break;
@@ -2574,6 +2772,13 @@ static av_cold void sws_init_swScale_c(SwsContext *c) · 30 unmodified lines
25742772 }
25752773 }
25762774
2775+ if (c->scalingBpp == 8) {
2776+ c->hScale = hScale_c;
2777+ if (c->flags & SWS_FAST_BILINEAR) {
2778+ c->hyscale_fast = hyscale_fast_c;
2779+ c->hcscale_fast = hcscale_fast_c;
2780+ }
2781+
25772782 if (c->srcRange != c->dstRange && !isAnyRGB(c->dstFormat)) {
25782783 if (c->srcRange) {
25792784 c->lumConvertRange = lumRangeFromJpeg_c;
@@ -2583,6 +2788,21 @@ static av_cold void sws_init_swScale_c(SwsContext *c) · 3 unmodified lines
25832788 c->chrConvertRange = chrRangeToJpeg_c;
25842789 }
25852790 }
2791+ } else {
2792+ c->hScale = hScale16_c;
2793+ c->scale19To15Fw = scale19To15Fw_c;
2794+ c->scale8To16Rv = scale8To16Rv_c;
2795+
2796+ if (c->srcRange != c->dstRange && !isAnyRGB(c->dstFormat)) {
2797+ if (c->srcRange) {
2798+ c->lumConvertRange = lumRangeFromJpeg16_c;
2799+ c->chrConvertRange = chrRangeFromJpeg16_c;
2800+ } else {
2801+ c->lumConvertRange = lumRangeToJpeg16_c;
2802+ c->chrConvertRange = chrRangeToJpeg16_c;
2803+ }
2804+ }
2805+ }
25862806
25872807 if (!(isGray(srcFormat) || isGray(c->dstFormat) ||
25882808 srcFormat == PIX_FMT_MONOBLACK || srcFormat == PIX_FMT_MONOWHITE))
libswscale/swscale_internal.h+10−0
@@ -205,6 +205,7 @@ typedef struct SwsContext { · 204 unmodified lines
205205 enum PixelFormat srcFormat; ///< Source pixel format.
206206 int dstFormatBpp; ///< Number of bits per pixel of the destination pixel format.
207207 int srcFormatBpp; ///< Number of bits per pixel of the source pixel format.
208+ int scalingBpp;
208209 int chrSrcHSubSample; ///< Binary logarithm of horizontal subsampling factor between luma/alpha and chroma planes in source image.
209210 int chrSrcVSubSample; ///< Binary logarithm of vertical subsampling factor between luma/alpha and chroma planes in source image.
210211 int chrDstHSubSample; ///< Binary logarithm of horizontal subsampling factor between luma/alpha and chroma planes in destination image.
@@ -446,6 +447,15 @@ typedef struct SwsContext { · 235 unmodified lines
446447 void (*lumConvertRange)(int16_t *dst, int width); ///< Color range conversion function for luma plane if needed.
447448 void (*chrConvertRange)(int16_t *dst1, int16_t *dst2, int width); ///< Color range conversion function for chroma planes if needed.
448449
450+ /**
451+ * dst[..] = (src[..] << 8) | src[..];
452+ */
453+ void (*scale8To16Rv)(uint16_t *dst, const uint8_t *src, int len);
454+ /**
455+ * dst[..] = src[..] >> 4;
456+ */
457+ void (*scale19To15Fw)(int16_t *dst, const int32_t *src, int len);
458+
449459 int needs_hcscale; ///< Set if there are chroma planes to be converted.
450460
451461 } SwsContext;
libswscale/utils.c+7−2
@@ -877,8 +877,13 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter) · 876 unmodified lines
877877 }
878878 }
879879
880− FF_ALLOC_OR_GOTO(c, c->formatConvBuffer, FFALIGN(srcW, 16) * 2, fail);
881− if (HAVE_MMX2 && cpu_flags & AV_CPU_FLAG_MMX2) {
880+ // FIXME it's even nicer if bpp isn't 16, but max({src,dst}formatbpp)
881+ c->scalingBpp = FFMAX(av_pix_fmt_descriptors[srcFormat].comp[0].depth_minus1,
882+ av_pix_fmt_descriptors[dstFormat].comp[0].depth_minus1) >= 8 ? 16 : 8;
883+ if (c->scalingBpp == 16)
884+ dst_stride <<= 1;
885+ FF_ALLOC_OR_GOTO(c, c->formatConvBuffer, FFALIGN(srcW, 16) * 2 * c->scalingBpp >> 3, fail);
886+ if (HAVE_MMX2 && cpu_flags & AV_CPU_FLAG_MMX2 && c->scalingBpp == 8) {
882887 c->canMMX2BeUsed= (dstW >=srcW && (dstW&31)==0 && (srcW&15)==0) ? 1 : 0;
883888 if (!c->canMMX2BeUsed && dstW >=srcW && (srcW&15)==0 && (flags&SWS_FAST_BILINEAR)) {
884889 if (flags&SWS_PRINT_INFO)
libswscale/x86/swscale_template.c+4−69
@@ -1625,32 +1625,6 @@ static void RENAME(yuy2ToUV)(uint8_t *dstU, uint8_t *dstV, · 1624 unmodified lines
16251625 assert(src1 == src2);
16261626 }
16271627
1628−static void RENAME(LEToUV)(uint8_t *dstU, uint8_t *dstV,
1629− const uint8_t *src1, const uint8_t *src2,
1630− int width, uint32_t *unused)
1631−{
1632− __asm__ volatile(
1633− "mov %0, %%"REG_a" \n\t"
1634− "1: \n\t"
1635− "movq (%1, %%"REG_a",2), %%mm0 \n\t"
1636− "movq 8(%1, %%"REG_a",2), %%mm1 \n\t"
1637− "movq (%2, %%"REG_a",2), %%mm2 \n\t"
1638− "movq 8(%2, %%"REG_a",2), %%mm3 \n\t"
1639− "psrlw $8, %%mm0 \n\t"
1640− "psrlw $8, %%mm1 \n\t"
1641− "psrlw $8, %%mm2 \n\t"
1642− "psrlw $8, %%mm3 \n\t"
1643− "packuswb %%mm1, %%mm0 \n\t"
1644− "packuswb %%mm3, %%mm2 \n\t"
1645− "movq %%mm0, (%3, %%"REG_a") \n\t"
1646− "movq %%mm2, (%4, %%"REG_a") \n\t"
1647− "add $8, %%"REG_a" \n\t"
1648− " js 1b \n\t"
1649− : : "g" ((x86_reg)-width), "r" (src1+width*2), "r" (src2+width*2), "r" (dstU+width), "r" (dstV+width)
1650− : "%"REG_a
1651− );
1652−}
1653−
16541628 /* This is almost identical to the previous, end exists only because
16551629 * yuy2ToY/UV)(dst, src+1, ...) would have 100% unaligned accesses. */
16561630 static void RENAME(uyvyToY)(uint8_t *dst, const uint8_t *src,
@@ -1700,33 +1674,6 @@ static void RENAME(uyvyToUV)(uint8_t *dstU, uint8_t *dstV, · 43 unmodified lines
17001674 assert(src1 == src2);
17011675 }
17021676
1703−static void RENAME(BEToUV)(uint8_t *dstU, uint8_t *dstV,
1704− const uint8_t *src1, const uint8_t *src2,
1705− int width, uint32_t *unused)
1706−{
1707− __asm__ volatile(
1708− "movq "MANGLE(bm01010101)", %%mm4 \n\t"
1709− "mov %0, %%"REG_a" \n\t"
1710− "1: \n\t"
1711− "movq (%1, %%"REG_a",2), %%mm0 \n\t"
1712− "movq 8(%1, %%"REG_a",2), %%mm1 \n\t"
1713− "movq (%2, %%"REG_a",2), %%mm2 \n\t"
1714− "movq 8(%2, %%"REG_a",2), %%mm3 \n\t"
1715− "pand %%mm4, %%mm0 \n\t"
1716− "pand %%mm4, %%mm1 \n\t"
1717− "pand %%mm4, %%mm2 \n\t"
1718− "pand %%mm4, %%mm3 \n\t"
1719− "packuswb %%mm1, %%mm0 \n\t"
1720− "packuswb %%mm3, %%mm2 \n\t"
1721− "movq %%mm0, (%3, %%"REG_a") \n\t"
1722− "movq %%mm2, (%4, %%"REG_a") \n\t"
1723− "add $8, %%"REG_a" \n\t"
1724− " js 1b \n\t"
1725− : : "g" ((x86_reg)-width), "r" (src1+width*2), "r" (src2+width*2), "r" (dstU+width), "r" (dstV+width)
1726− : "%"REG_a
1727− );
1728−}
1729−
17301677 static av_always_inline void RENAME(nvXXtoUV)(uint8_t *dst1, uint8_t *dst2,
17311678 const uint8_t *src, int width)
17321679 {
@@ -2268,6 +2215,7 @@ static av_cold void RENAME(sws_init_swScale)(SwsContext *c) · 535 unmodified lines
22682215 }
22692216 }
22702217
2218+ if (c->scalingBpp == 8) {
22712219 #if !COMPILE_TEMPLATE_MMX2
22722220 c->hScale = RENAME(hScale );
22732221 #endif /* !COMPILE_TEMPLATE_MMX2 */
@@ -2285,6 +2233,7 @@ static av_cold void RENAME(sws_init_swScale)(SwsContext *c) · 11 unmodified lines
22852233 #if COMPILE_TEMPLATE_MMX2
22862234 }
22872235 #endif /* COMPILE_TEMPLATE_MMX2 */
2236+ }
22882237
22892238 #if !COMPILE_TEMPLATE_MMX2
22902239 switch(srcFormat) {
@@ -2292,12 +2241,6 @@ static av_cold void RENAME(sws_init_swScale)(SwsContext *c) · 1 unmodified line
22922241 case PIX_FMT_UYVY422 : c->chrToYV12 = RENAME(uyvyToUV); break;
22932242 case PIX_FMT_NV12 : c->chrToYV12 = RENAME(nv12ToUV); break;
22942243 case PIX_FMT_NV21 : c->chrToYV12 = RENAME(nv21ToUV); break;
2295− case PIX_FMT_YUV420P16BE:
2296− case PIX_FMT_YUV422P16BE:
2297− case PIX_FMT_YUV444P16BE: c->chrToYV12 = RENAME(BEToUV); break;
2298− case PIX_FMT_YUV420P16LE:
2299− case PIX_FMT_YUV422P16LE:
2300− case PIX_FMT_YUV444P16LE: c->chrToYV12 = RENAME(LEToUV); break;
23012244 default: break;
23022245 }
23032246 #endif /* !COMPILE_TEMPLATE_MMX2 */
@@ -2312,16 +2255,8 @@ static av_cold void RENAME(sws_init_swScale)(SwsContext *c) · 8 unmodified lines
23122255 switch (srcFormat) {
23132256 #if !COMPILE_TEMPLATE_MMX2
23142257 case PIX_FMT_YUYV422 :
2315− case PIX_FMT_YUV420P16BE:
2316− case PIX_FMT_YUV422P16BE:
2317− case PIX_FMT_YUV444P16BE:
2318− case PIX_FMT_Y400A :
2319− case PIX_FMT_GRAY16BE : c->lumToYV12 = RENAME(yuy2ToY); break;
2320− case PIX_FMT_UYVY422 :
2321− case PIX_FMT_YUV420P16LE:
2322− case PIX_FMT_YUV422P16LE:
2323− case PIX_FMT_YUV444P16LE:
2324− case PIX_FMT_GRAY16LE : c->lumToYV12 = RENAME(uyvyToY); break;
2258+ case PIX_FMT_Y400A : c->lumToYV12 = RENAME(yuy2ToY); break;
2259+ case PIX_FMT_UYVY422 : c->lumToYV12 = RENAME(uyvyToY); break;
23252260 #endif /* !COMPILE_TEMPLATE_MMX2 */
23262261 case PIX_FMT_BGR24 : c->lumToYV12 = RENAME(bgr24ToY); break;
23272262 case PIX_FMT_RGB24 : c->lumToYV12 = RENAME(rgb24ToY); break;
tests/ref/lavfi/pixdesc+8−8
@@ -1,8 +1,8 @@
11 abgr 037bf9df6a765520ad6d490066bf4b89
22 argb c442a8261c2265a07212ef0f72e35f5a
33 bgr24 0d0cb38ab3fa0b2ec0865c14f78b217b
4−bgr48be 4ba0ff7fc9e011ea264610ad1585bb1f
5−bgr48le d022bfdd6a07d5dcc693799322a386b4
4+bgr48be 74dedaaacae8fd1ef46e05f78cf29d62
5+bgr48le 0eb7d30801eac6058814bddd330b3c76
66 bgr4_byte 50d23cc82d9dcef2fd12adb81fb9b806
77 bgr555be 49f01b1f1f0c84fd9e776dd34cc3c280
88 bgr555le 378d6ac4223651a1adcbf94a3d0d807b
@@ -18,8 +18,8 @@ monow 9251497f3b0634f1165d12d5a289d943 · 9 unmodified lines
1818 nv12 e0af357888584d36eec5aa0f673793ef
1919 nv21 9a3297f3b34baa038b1f37cb202b512f
2020 rgb24 b41eba9651e1b5fe386289b506188105
21−rgb48be 460b6de89b156290a12d3941db8bd731
22−rgb48le cd93cb34d15996987367dabda3a10128
21+rgb48be e3bc84c9af376fb6d0f0293cc7b713a6
22+rgb48le f51c0e71638a822458329abb2f4052c7
2323 rgb4_byte c93ba89b74c504e7f5ae9d9ab1546c73
2424 rgb555be 912a62c5e53bfcbac2a0340e10973cf2
2525 rgb555le a937a0fc764fb57dc1b3af87cba0273c
@@ -38,12 +38,12 @@ yuv420p16le 2d59c4f1d0314a5a957a7cfc4b6fabcc · 12 unmodified lines
3838 yuv420p9be ce880fa07830e5297c22acf6e20555ce
3939 yuv420p9le 16543fda8f87d94a6cf857d2e8d4461a
4040 yuv422p c9bba4529821d796a6ab09f6a5fd355a
41−yuv422p16be 5499502e1c29534a158a1fe60e889f60
42−yuv422p16le e3d61fde6978591596bc36b914386623
41+yuv422p16be 86ad3447f97969ce095afeef81fa9abf
42+yuv422p16le a53a9b451f4a81eeae33362c1bbd07f8
4343 yuv440p 5a064afe2b453bb52cdb3f176b1aa1cf
4444 yuv444p 0a98447b78fd476aa39686da6a74fa2e
45−yuv444p16be ea602a24b8e6969679265078bd8607b6
46−yuv444p16le 1262a0dc57ee147967fc896d04206313
45+yuv444p16be 95db370ae765dd3d10b7def14704ae73
46+yuv444p16le 36b969179b5ad9d312a0d1e1cd6bc402
4747 yuva420p a29884f3f3dfe1e00b961bc17bef3d47
4848 yuvj420p 32eec78ba51857b16ce9b813a49b7189
4949 yuvj422p 0dfa0ed434f73be51428758c69e082cb
tests/ref/lavfi/pixfmts_copy+8−8
@@ -1,8 +1,8 @@
11 abgr 037bf9df6a765520ad6d490066bf4b89
22 argb c442a8261c2265a07212ef0f72e35f5a
33 bgr24 0d0cb38ab3fa0b2ec0865c14f78b217b
4−bgr48be 4ba0ff7fc9e011ea264610ad1585bb1f
5−bgr48le d022bfdd6a07d5dcc693799322a386b4
4+bgr48be 74dedaaacae8fd1ef46e05f78cf29d62
5+bgr48le 0eb7d30801eac6058814bddd330b3c76
66 bgr4_byte 50d23cc82d9dcef2fd12adb81fb9b806
77 bgr555be 49f01b1f1f0c84fd9e776dd34cc3c280
88 bgr555le 378d6ac4223651a1adcbf94a3d0d807b
@@ -18,8 +18,8 @@ monow 9251497f3b0634f1165d12d5a289d943 · 9 unmodified lines
1818 nv12 e0af357888584d36eec5aa0f673793ef
1919 nv21 9a3297f3b34baa038b1f37cb202b512f
2020 rgb24 b41eba9651e1b5fe386289b506188105
21−rgb48be 460b6de89b156290a12d3941db8bd731
22−rgb48le cd93cb34d15996987367dabda3a10128
21+rgb48be e3bc84c9af376fb6d0f0293cc7b713a6
22+rgb48le f51c0e71638a822458329abb2f4052c7
2323 rgb4_byte c93ba89b74c504e7f5ae9d9ab1546c73
2424 rgb555be 912a62c5e53bfcbac2a0340e10973cf2
2525 rgb555le a937a0fc764fb57dc1b3af87cba0273c
@@ -38,12 +38,12 @@ yuv420p16le 2d59c4f1d0314a5a957a7cfc4b6fabcc · 12 unmodified lines
3838 yuv420p9be ce880fa07830e5297c22acf6e20555ce
3939 yuv420p9le 16543fda8f87d94a6cf857d2e8d4461a
4040 yuv422p c9bba4529821d796a6ab09f6a5fd355a
41−yuv422p16be 5499502e1c29534a158a1fe60e889f60
42−yuv422p16le e3d61fde6978591596bc36b914386623
41+yuv422p16be 86ad3447f97969ce095afeef81fa9abf
42+yuv422p16le a53a9b451f4a81eeae33362c1bbd07f8
4343 yuv440p 5a064afe2b453bb52cdb3f176b1aa1cf
4444 yuv444p 0a98447b78fd476aa39686da6a74fa2e
45−yuv444p16be ea602a24b8e6969679265078bd8607b6
46−yuv444p16le 1262a0dc57ee147967fc896d04206313
45+yuv444p16be 95db370ae765dd3d10b7def14704ae73
46+yuv444p16le 36b969179b5ad9d312a0d1e1cd6bc402
4747 yuva420p a29884f3f3dfe1e00b961bc17bef3d47
4848 yuvj420p 32eec78ba51857b16ce9b813a49b7189
4949 yuvj422p 0dfa0ed434f73be51428758c69e082cb
tests/ref/lavfi/pixfmts_crop+8−8
@@ -1,8 +1,8 @@
11 abgr cd761690872843d1b7ab0c695393c751
22 argb 2ec6ef18769bcd651c2e8904d5a3ee67
33 bgr24 3450fd00cf1493d1ded75544d82ba3ec
4−bgr48be 90cb5d373a1123432d63c6a10c101afa
5−bgr48le 9371f54ceda9010f1199e86f4930ac3f
4+bgr48be a9a7d177cef0914d3f1d266f00dff676
5+bgr48le b475d1b529ed80c728ddbacd22d35281
66 bgr4_byte 2f6ac3cdd4676ab4e2982bdf0664945b
77 bgr555be d3a7c273604723adeb7e5f5dd1c4272b
88 bgr555le d22442fc13b464f9ba455b08df4e981f
@@ -14,8 +14,8 @@ gray 8c4850e66562a587a292dc728a65ea4a · 5 unmodified lines
1414 gray16be daa5a6b98fb4a280c57c57bff1a2ab5a
1515 gray16le 84f5ea7259073edcb893113b42213c8e
1616 rgb24 3b90ed64b687d3dc186c6ef521dc71a8
17−rgb48be a808128041a1962deaa8620c7448feba
18−rgb48le ce92d02cc322608d5be377cb1940677b
17+rgb48be b8f9fd6aaa24d75275ee2f8b8a7b9e55
18+rgb48le 3e52e831a040f086c3ae983241172cce
1919 rgb4_byte 6958029f73c6cdfed4f71020d816f027
2020 rgb555be 41a7d1836837bc90f2cae19a9c9df3b3
2121 rgb555le eeb78f8ce6186fba55c941469e60ba67
@@ -29,12 +29,12 @@ yuv420p bfea0188ddd4889787c403caae119cc7 · 7 unmodified lines
2929 yuv420p16be 8365eff38b8c329aeb95fc605fa229bb
3030 yuv420p16le 5e8dd38d973d5854abe1ad4efad20cc1
3131 yuv422p f2f930a91fe00d4252c4720b5ecd8961
32−yuv422p16be 167e4338811a7d272925a4c6417d60da
33−yuv422p16le 3359395d5875d581fa1e975013d30114
32+yuv422p16be 6647fe1c381c148f8207c988c0e22bf0
33+yuv422p16le e1548c9dc51202db38a9625c8954203f
3434 yuv440p 2472417d980e395ad6843cbb8b633b29
3535 yuv444p 1f151980486848c96bc5585ced99003e
36−yuv444p16be d69280c2856865d2ea94bd5292aac1c6
37−yuv444p16le 33f43e030bedf9723be4f63c3e9fc80e
36+yuv444p16be ac3b159f8c858fcdf475a8c024ee79b6
37+yuv444p16le 9a6863bfc5faee206065c11dc994bf0c
3838 yuva420p 7536753dfbc7932560fb50c921369a0e
3939 yuvj420p 21f891093006d42d7683b0e1d773a657
4040 yuvj422p 9a43d474c407590ad8f213880586b45e
tests/ref/lavfi/pixfmts_hflip+8−8
@@ -1,8 +1,8 @@
11 abgr 49468c6c9ceee5d52b08b1270a909323
22 argb 50ba9f16c6475530602f2983278b82d0
33 bgr24 cc53d2011d097972db0d22756c3699e3
4−bgr48be 11641cf0f4516a9aed98f7872720f801
5−bgr48le b5440734eed128554dd9f83b34ba582f
4+bgr48be 90374bc92471f1bd4931d71ef8b73f50
5+bgr48le 696f628d0dd32121e60a0d61ac47d6e6
66 bgr4_byte aac987e7d1a6a96477cfc0b48a4285de
77 bgr555be bc07265898440116772200390d70c092
88 bgr555le ccee08679bac84a1f960c6c9070c5538
@@ -14,8 +14,8 @@ gray 03efcb4ab52a24c0af0e03cfd26c9377 · 5 unmodified lines
1414 gray16be 9bcbca979601ddc4869f846f08f3d1dd
1515 gray16le c1b8965adcc7f847ee343149ff507073
1616 rgb24 754f1722fc738590cc407ac65749bfe8
17−rgb48be 10743e1577dc3198dbbc7c0b3b8f429e
18−rgb48le dd945a44f39119221407bf7a04f1bc49
17+rgb48be 2397b9d3c296ac15f8a2325a703f81c7
18+rgb48le 527043c72546d8b4bb1ce2dea4b294c3
1919 rgb4_byte c8a3f995fcf3e0919239ea2c413ddc29
2020 rgb555be 045ce8607d3910586f4d97481dda8632
2121 rgb555le 8778ee0cf58ce9ad1d99a1eca9f95e87
@@ -29,12 +29,12 @@ yuv420p 2d5c80f9ba2ddd85b2aeda3564cc7d64 · 7 unmodified lines
2929 yuv420p16be 758b0c1e2113b15e7afde48da4e4d024
3030 yuv420p16le 480ccd951dcb806bc875d307e02e50a0
3131 yuv422p 6e728f4eb9eae287c224f396d84be6ea
32−yuv422p16be a05d43cd62b790087bd37083174557de
33−yuv422p16le 6954abebcbc62d81068d58d0c62bdd5b
32+yuv422p16be 9dbe0af0eb877987611cf04bfa577202
33+yuv422p16le 2d8f37231110177cc5e1b61c8cb4b163
3434 yuv440p a99e2b57ed601f39852715c9d675d0d3
3535 yuv444p 947e47f7bb5fdccc659d19b7df2b6fc3
36−yuv444p16be e5ef45bc3d2f5b0b2542d5151340c382
37−yuv444p16le 70793e3d66d0c23a0cdedabe9c24c2a7
36+yuv444p16be debc96a7ec4fec0a412f9d8995bc48a2
37+yuv444p16le 5b5e1348a631fc2206bb7ff851a52687
3838 yuva420p d83ec0c01498189f179ec574918185f1
3939 yuvj420p df3aaaec3bb157c3bde5f0365af30f4f
4040 yuvj422p d113871528d510a192797af59df9c05c
tests/ref/lavfi/pixfmts_null+8−8
@@ -1,8 +1,8 @@
11 abgr 037bf9df6a765520ad6d490066bf4b89
22 argb c442a8261c2265a07212ef0f72e35f5a
33 bgr24 0d0cb38ab3fa0b2ec0865c14f78b217b
4−bgr48be 4ba0ff7fc9e011ea264610ad1585bb1f
5−bgr48le d022bfdd6a07d5dcc693799322a386b4
4+bgr48be 74dedaaacae8fd1ef46e05f78cf29d62
5+bgr48le 0eb7d30801eac6058814bddd330b3c76
66 bgr4_byte 50d23cc82d9dcef2fd12adb81fb9b806
77 bgr555be 49f01b1f1f0c84fd9e776dd34cc3c280
88 bgr555le 378d6ac4223651a1adcbf94a3d0d807b
@@ -18,8 +18,8 @@ monow 9251497f3b0634f1165d12d5a289d943 · 9 unmodified lines
1818 nv12 e0af357888584d36eec5aa0f673793ef
1919 nv21 9a3297f3b34baa038b1f37cb202b512f
2020 rgb24 b41eba9651e1b5fe386289b506188105
21−rgb48be 460b6de89b156290a12d3941db8bd731
22−rgb48le cd93cb34d15996987367dabda3a10128
21+rgb48be e3bc84c9af376fb6d0f0293cc7b713a6
22+rgb48le f51c0e71638a822458329abb2f4052c7
2323 rgb4_byte c93ba89b74c504e7f5ae9d9ab1546c73
2424 rgb555be 912a62c5e53bfcbac2a0340e10973cf2
2525 rgb555le a937a0fc764fb57dc1b3af87cba0273c
@@ -38,12 +38,12 @@ yuv420p16le 2d59c4f1d0314a5a957a7cfc4b6fabcc · 12 unmodified lines
3838 yuv420p9be ce880fa07830e5297c22acf6e20555ce
3939 yuv420p9le 16543fda8f87d94a6cf857d2e8d4461a
4040 yuv422p c9bba4529821d796a6ab09f6a5fd355a
41−yuv422p16be 5499502e1c29534a158a1fe60e889f60
42−yuv422p16le e3d61fde6978591596bc36b914386623
41+yuv422p16be 86ad3447f97969ce095afeef81fa9abf
42+yuv422p16le a53a9b451f4a81eeae33362c1bbd07f8
4343 yuv440p 5a064afe2b453bb52cdb3f176b1aa1cf
4444 yuv444p 0a98447b78fd476aa39686da6a74fa2e
45−yuv444p16be ea602a24b8e6969679265078bd8607b6
46−yuv444p16le 1262a0dc57ee147967fc896d04206313
45+yuv444p16be 95db370ae765dd3d10b7def14704ae73
46+yuv444p16le 36b969179b5ad9d312a0d1e1cd6bc402
4747 yuva420p a29884f3f3dfe1e00b961bc17bef3d47
4848 yuvj420p 32eec78ba51857b16ce9b813a49b7189
4949 yuvj422p 0dfa0ed434f73be51428758c69e082cb
tests/ref/lavfi/pixfmts_scale+16−16
@@ -1,8 +1,8 @@
11 abgr d894cb97f6c80eb21bdbe8a4eea62d86
22 argb 54346f2b2eef10919e0f247241df3b24
33 bgr24 570f8d6b51a838aed022ef67535f6bdc
4−bgr48be fcc0f2dbf45d325f84f816c74cbeeebe
5−bgr48le 3f9c2b23eed3b8d196d1c14b38ce50f5
4+bgr48be 07f7a0cc34feb3646434d47c0cec8cee
5+bgr48le 9abd2c3a66088e6c9078232064eba61e
66 bgr4_byte ee1d35a7baf8e9016891929a2f565c0b
77 bgr555be de8901c1358834fddea060fcb3a67beb
88 bgr555le 36b745067197f9ca8c1731cac51329c9
@@ -11,15 +11,15 @@ bgr565le 3a514a298c6161a071ddf9963c06509d · 2 unmodified lines
1111 bgr8 7f007fa6c153a16e808a9c51605a4016
1212 bgra a5e7040f9a80cccd65e5acf2ca09ace5
1313 gray d7786a7d9d99ac74230cc045cab5632c
14−gray16be af39ce3a497f6734b157c8b94544f537
15−gray16le 7ac1b788bcc472010df7a97e762485e0
14+gray16be bba98532da29a31599df2feec3b08e3e
15+gray16le 30267f127d5734c4767f3944f1729a33
1616 monob 88c4c050758e64d120f50c7eff694381
1717 monow d31772ebaa877fc2a78565937f7f9673
1818 nv12 4676d59db43d657dc12841f6bc3ab452
1919 nv21 69c699510ff1fb777b118ebee1002f14
2020 rgb24 514692e28e8ff6860e415ce4fcf6eb8c
21−rgb48be 1894cd30dabcd3180518e4d5f09f25e7
22−rgb48le 1354e6e27ce3c1d4d4989ee56030c94b
21+rgb48be f18841c19fc6d9c817a3095f557b9bc5
22+rgb48le 819e7b8acd8965ba57ba46198a5cc9bf
2323 rgb4_byte d81ffd3add95842a618eec81024f0b5c
2424 rgb555be 4607309f9f217d51cbb53d13b84b4537
2525 rgb555le a350ef1dc2c9688ed49e7ba018843795
@@ -31,19 +31,19 @@ uyvy422 314bd486277111a95d9369b944fa0400 · 5 unmodified lines
3131 yuv410p 7df8f6d69b56a8dcb6c7ee908e5018b5
3232 yuv411p 1143e7c5cc28fe0922b051b17733bc4c
3333 yuv420p fdad2d8df8985e3d17e73c71f713cb14
34−yuv420p10be 6d335e75b553da590135cf8bb999610c
35−yuv420p10le d510ddbabefd03ef39ec943fcb51b709
36−yuv420p16be 29a0265764530070f5cd3251cc01f66a
37−yuv420p16le 6f3a265b084a78baec229238d9f7945f
38−yuv420p9be ec4983b7a949c0472110a7a2c58e278a
39−yuv420p9le c136dce5913a722eee44ab72cff664b2
34+yuv420p10be 8b5ad855229840a8fa87786cab83f856
35+yuv420p10le 5264e87921d47b17411578d9c92672b1
36+yuv420p16be f6ef3ba90f238b467c7e72ade927083d
37+yuv420p16le faf6aab3b1c16e8afbe160686dd360e0
38+yuv420p9be c14bf746d161face61e1f39b491bf7ef
39+yuv420p9le 59457f9a51768bf1d4342238d50a9be3
4040 yuv422p 918e37701ee7377d16a8a6c119c56a40
41−yuv422p16be ef3e865fc1d0c68977c735323c50af6e
42−yuv422p16le 428a9b96214c09cb5a983ce36d6961ff
41+yuv422p16be 837945d3a771366a5a72a4ed095a4f53
42+yuv422p16le b8292ae9b52eb7afc3d8b93e8fd895b4
4343 yuv440p 461503fdb9b90451020aa3b25ddf041c
4444 yuv444p 81b2eba962d12e8d64f003ac56f6faf2
45−yuv444p16be 99a3738c70c8fbdc5a0e4ad4bf50648d
46−yuv444p16le 385d0cc5240d62da0871915be5d86f0a
45+yuv444p16be cc7460f76477aa4b4c33442f67c06a89
46+yuv444p16le 9a5ed60d68c0a4a5155f9d376174cdf7
4747 yuva420p 8673a9131fb47de69788863f93a50eb7
4848 yuvj420p 30427bd6caf5bda93a173dbebe759e09
4949 yuvj422p fc8288f64fd149573f73cf8da05d8e6d
tests/ref/lavfi/pixfmts_vflip+8−8
@@ -1,8 +1,8 @@
11 abgr 25e72e9dbd01ab00727c976d577f7be5
22 argb 19869bf1a5ac0b6af4d8bbe2c104533c
33 bgr24 89108a4ba00201f79b75b9305c42352d
4−bgr48be ed82382da09b64a8e04728fcf76e6814
5−bgr48le 0f1f135608c2ff24d26d03e939fc2112
4+bgr48be 908b4edb525fd154a95a3744c4ab5420
5+bgr48le 796c2072d6fa13a091f5c5b175417ed5
66 bgr4_byte 407fcf564ed764c38e1d748f700ab921
77 bgr555be f739d2519f7e9d494359bf67a3821537
88 bgr555le bd7b3ec4d684dfad075d89a606cb8b74
@@ -18,8 +18,8 @@ monow ff9869d067ecb94eb9d90c9750c31fea · 9 unmodified lines
1818 nv12 046f00f598ce14d9854a3534a5c99114
1919 nv21 01ea369dd2d0d3ed7451dc5c8d61497f
2020 rgb24 eaefabc168d0b14576bab45bc1e56e1e
21−rgb48be 4e0c384163ebab06a08e74637beb02bc
22−rgb48le a77bfeefcd96750cf0e1917a2e2bf1e7
21+rgb48be 8e347deca2902e7dc1ece261322577d8
22+rgb48le 2034e485f946e4064b5fb9be09865e55
2323 rgb4_byte 8c6ff02df0b06dd2d574836c3741b2a2
2424 rgb555be 40dc33cfb5cf56aac1c5a290ac486c36
2525 rgb555le 4f8eaad29a17e0f8e9d8ab743e76b999
@@ -38,12 +38,12 @@ yuv420p16le 0f609e588e5a258644ef85170d70e030 · 12 unmodified lines
3838 yuv420p9be be40ec975fb2873891643cbbbddbc3b0
3939 yuv420p9le 7e606310d3f5ff12badf911e8f333471
4040 yuv422p d7f5cb44d9b0210d66d6a8762640ab34
41−yuv422p16be 9bd8f8c961822b586fa4cf992be54acc
42−yuv422p16le 9c4a1239605c7952b736ac3130163f14
41+yuv422p16be 8cdfbddf2dd4c44c3efef4ee00170eba
42+yuv422p16le a2f421f6a1af950544081c1797de01ae
4343 yuv440p 876385e96165acf51271b20e5d85a416
4444 yuv444p 9c3c667d1613b72d15bc6d851c5eb8f7
45−yuv444p16be 0f4afa4a4aacf4bb6b87641abde71ea9
46−yuv444p16le 8f31557bc52adfe00ae8b40a9b8c23f8
45+yuv444p16be b092690d22f0b26360fbf5cfd739be17
46+yuv444p16le 18768b4ddca92d06f9713fef467276a9
4747 yuva420p c705d1cf061d8c6580ac690b55f92276
4848 yuvj420p 41fd02b204da0ab62452cd14b595e2e4
4949 yuvj422p 7f6ca9bc1812cde02036d7d29a7cce43

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t