• J
    libobs: Fix calculation copying aligned textures · 05fc9c5b
    jp9000 提交于
    Direct3D textures are usually aligned to a specific pitch, so their
    internal width is often not equal to the expected output width; this
    means that if we want to use it on our texture output, that we must
    de-align the texture while copying the texture data.
    
    However, I unintentionally messed up the calculation at some point with
    RGBA textures, so the variable size I was supposed to be using was
    supposed to be multiplied by 4 (for RGBA), while I was still expecting
    single channel data.  So, if the texture width was something like 1332,
    the source (directx) texture line size would be somewhere at or above
    5328 (because it's RGBA), then destination is at 1332 (YUV luma plane),
    and it would unintentionally treat 3996 (or 5328 - 1332) bytes as the
    unused alignment data.  So this fixes that miscalculation.
    05fc9c5b
obs-video.c 15.0 KB