OBS图形及渲染
+ -

OBS格式转换与着色器命名对应关系

2024-12-12 6 0
static const char *select_conversion_technique(enum video_format format, bool full_range)
{
    switch (format) 
    {
    case VIDEO_FORMAT_UYVY:
        return "UYVY_Reverse";

    case VIDEO_FORMAT_YUY2:
        return "YUY2_Reverse";

    case VIDEO_FORMAT_YVYU:
        return "YVYU_Reverse";

    case VIDEO_FORMAT_I420:
        return "I420_Reverse";

    case VIDEO_FORMAT_NV12:
        return "NV12_Reverse";

    case VIDEO_FORMAT_I444:
        return "I444_Reverse";

    case VIDEO_FORMAT_Y800:
        return full_range ? "Y800_Full" : "Y800_Limited";

    case VIDEO_FORMAT_BGR3:
        return full_range ? "BGR3_Full" : "BGR3_Limited";

    case VIDEO_FORMAT_I422:
        return "I422_Reverse";

    case VIDEO_FORMAT_I40A:
        return "I40A_Reverse";

    case VIDEO_FORMAT_I42A:
        return "I42A_Reverse";

    case VIDEO_FORMAT_YUVA:
        return "YUVA_Reverse";

    case VIDEO_FORMAT_AYUV:
        return "AYUV_Reverse";

    case VIDEO_FORMAT_BGRA:
    case VIDEO_FORMAT_BGRX:
    case VIDEO_FORMAT_RGBA:
    case VIDEO_FORMAT_NONE:
        if (full_range)
            assert(false && "No conversion requested");
        else
            return "RGB_Limited";
        break;
    }
    return NULL;
}

0 篇笔记 写笔记

作者信息
我爱内核
Windows驱动开发,网站开发
好好学习,天天向上。
取消
感谢您的支持,我会继续努力的!
扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

您的支持,是我们前进的动力!