zoukankan      html  css  js  c++  java
  • FFMPEG 内部 YUV444p16LE-> P016LE

    y 方向直接复制

    1. hscale

    2. vscale

    static void yuv2p016cX_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;
        const int32_t **uSrc = (const int32_t **)chrUSrc;
        const int32_t **vSrc = (const int32_t **)chrVSrc;
        int shift = 15;
        int big_endian = c->dstFormat == AV_PIX_FMT_P016BE;
        int i, j;
    
        for (i = 0; i < chrDstW; i++) {
            int u = 1 << (shift - 1);
            int v = 1 << (shift - 1);
    
            /* See yuv2planeX_16_c_template for details. */
            u -= 0x40000000;
            v -= 0x40000000;
            for (j = 0; j < chrFilterSize; j++) {
                u += uSrc[j][i] * (unsigned)chrFilter[j];
                v += vSrc[j][i] * (unsigned)chrFilter[j];
            }
    
            output_pixel(&dest[2*i]  , u, 0x8000, int);
            output_pixel(&dest[2*i+1], v, 0x8000, int);
        }
    }

    FFMPEG YUV444P16LE -> P010 过程

    yuv2plane1:0x4ba510 <ff_yuv2plane1_16_avx>      y
    yuv2planeX:0x4b9af0 <ff_yuv2planeX_16_sse4>          
    yuv2nv12cX:0x47f820 <yuv2p016cX_c>         y     chrFilter =  {2048, 1786, 492, -172, -58, 0, 0, 0}  int32_t  in = 187709 ... ... 
    hyScale:0x4c7200 <ff_hscale16to19_4_sse4>       y      
    hcScale:0x4c7290 <ff_hscale16to19_8_sse4>       y     


    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>

  • 相关阅读:
    【软件构造】Lab1基本流程指导及重难点分析
    【软件构造】关于java中List和Set数据结构不同实现方式和不同遍历方式时间效率的探讨与分析
    程序人生-Hello’s P2P
    WinterCamp2017吃饭睡觉记
    bzoj 3144 [Hnoi2013]切糕
    bzoj 1565 [NOI2009]植物大战僵尸
    bzoj 1061 [Noi2008]志愿者招募
    序列
    Philosopher
    时机成熟之时
  • 原文地址:https://www.cnblogs.com/luoyinjie/p/14538977.html
Copyright © 2011-2022 走看看