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