码迷,mamicode.com
首页 > 其他好文 > 详细

FFMPEG 内部 YUV444P016 -> P010

时间:2021-03-17 14:06:46      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:div   orm   filter   pre   scale   ati   stat   format   style   

1. hscale 

 

 

 

2. vscale

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);
        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>

FFMPEG 内部 YUV444P016 -> P010

标签:div   orm   filter   pre   scale   ati   stat   format   style   

原文地址:https://www.cnblogs.com/luoyinjie/p/14539553.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!