FFMPEG 内部 YUV444P016 -> P010
1. hscale
计算结果的时候 14 + %1 - %2 //m0 >> 14 + 16-15 m0 >>= 15
2. vscale // 这里的输入实际上是 高12位数据, 0-4096
static void yuv2p010cX_c(SwsContext *c, const int16_t *chrFilter, int chrFilterSize, const int16_t **chrUSrc, const int16_t **chrVSrc, uint8_t *dest8, int chrDstW) { uint16_t *dest = (uint16_t*)dest8; int shift = 17; int big_endian = c->dstFormat == AV_PIX_FMT_P010BE; int i, j; for (i = 0; i < chrDstW; i++) { int u = 1 << (shift - 1); int v = 1 << (shift - 1); for (j = 0; j < chrFilterSize; j++) { u += chrUSrc[j][i] * chrFilter[j]; v += chrVSrc[j][i] * chrFilter[j]; } output_pixel(&dest[2*i] , u); //AV_WL16(pos, av_clip_uintp2(val >> shift, 10) << 6); ((u >> 17)<<6)
output_pixel(&dest[2*i+1], v); } }
yuv2plane1 = 0x480860 <yuv2p010l1_LE_c>
yuv2planeX = 0x4a6580 <yuv2p010lX_LE_c>
yuv2nv12cX = 0x4806e0 <yuv2p010cX_c>
hyScale = 0x4c5520 <ff_hscale16to15_4_ssse3>
hcScale = 0x4c55a0 <ff_hscale16to15_8_ssse3>