@@ -1434,6 +1434,25 @@ static void yuv444p10le_to_uyvy(char * __restrict dst_buffer, AVFrame * __restri
14341434 }
14351435}
14361436
1437+ static void yuv444p10le_to_y416 (char * __restrict dst_buffer , AVFrame * __restrict in_frame ,
1438+ int width , int height , int pitch , const int * __restrict rgb_shift )
1439+ {
1440+ UNUSED (rgb_shift );
1441+ for (int y = 0 ; y < (int ) height ; ++ y ) {
1442+ uint16_t * src_y = (uint16_t * )(void * )(in_frame -> data [0 ] + in_frame -> linesize [0 ] * y );
1443+ uint16_t * src_cb = (uint16_t * )(void * )(in_frame -> data [1 ] + in_frame -> linesize [1 ] * y );
1444+ uint16_t * src_cr = (uint16_t * )(void * )(in_frame -> data [2 ] + in_frame -> linesize [2 ] * y );
1445+ uint16_t * dst = (uint16_t * )(void * )(dst_buffer + y * pitch );
1446+
1447+ OPTIMIZED_FOR (int x = 0 ; x < width ; ++ x ) {
1448+ * dst ++ = * src_cb ++ << 6U ; // U
1449+ * dst ++ = * src_y ++ << 6U ; // Y
1450+ * dst ++ = * src_cr ++ << 6U ; // V
1451+ * dst ++ = 0xFFFFU ; // A
1452+ }
1453+ }
1454+ }
1455+
14371456#if defined __GNUC__
14381457static inline void yuvp10le_to_rgb (int subsampling , char * __restrict dst_buffer , AVFrame * __restrict frame ,
14391458 int width , int height , int pitch , const int * __restrict rgb_shift , int out_bit_depth ) __attribute__((always_inline ));
@@ -1873,13 +1892,14 @@ const struct av_to_uv_conversion *get_av_to_uv_conversions() {
18731892 {AV_PIX_FMT_YUV422P10LE , RGB , yuv422p10le_to_rgb24 , false},
18741893 {AV_PIX_FMT_YUV422P10LE , RGBA , yuv422p10le_to_rgb32 , false},
18751894 {AV_PIX_FMT_YUV422P10LE , R10k , yuv422p10le_to_rgb30 , false},
1876- {AV_PIX_FMT_YUV444P10LE , v210 , yuv444p10le_to_v210 , true },
1895+ {AV_PIX_FMT_YUV444P10LE , v210 , yuv444p10le_to_v210 , false },
18771896 {AV_PIX_FMT_YUV444P10LE , UYVY , yuv444p10le_to_uyvy , false},
18781897 {AV_PIX_FMT_YUV444P10LE , R10k , yuv444p10le_to_r10k , false},
18791898 {AV_PIX_FMT_YUV444P10LE , RGB , yuv444p10le_to_rgb24 , false},
18801899 {AV_PIX_FMT_YUV444P10LE , RGBA , yuv444p10le_to_rgb32 , false},
18811900 {AV_PIX_FMT_YUV444P10LE , R12L , yuv444p10le_to_r12l , false},
18821901 {AV_PIX_FMT_YUV444P10LE , RG48 , yuv444p10le_to_rg48 , false},
1902+ {AV_PIX_FMT_YUV444P10LE , Y416 , yuv444p10le_to_y416 , true},
18831903#ifdef HAVE_P210
18841904 {AV_PIX_FMT_P210LE , v210 , p210le_to_v210 , true},
18851905 {AV_PIX_FMT_P210LE , UYVY , p210le_to_uyvy , false},
0 commit comments