libobs: Add Y800 color format support

(Note: Also modified the obs-ffmpeg plugin module)

Allows the ability for frame data to pass 8-bit grayscale images (Y800
color format).

Closes jp9000/obs-studio#515
This commit is contained in:
jpk
2016-02-24 23:02:11 -05:00
committed by jp9000
parent 07ecdaf8d3
commit c3629eacb5
7 changed files with 22 additions and 0 deletions

View File

@@ -46,6 +46,7 @@ enum video_format {
VIDEO_FORMAT_RGBA,
VIDEO_FORMAT_BGRA,
VIDEO_FORMAT_BGRX,
VIDEO_FORMAT_Y800, /* grayscale */
/* planar 4:4:4 */
VIDEO_FORMAT_I444,
@@ -97,6 +98,7 @@ static inline bool format_is_yuv(enum video_format format)
case VIDEO_FORMAT_RGBA:
case VIDEO_FORMAT_BGRA:
case VIDEO_FORMAT_BGRX:
case VIDEO_FORMAT_Y800:
return false;
}
@@ -115,6 +117,7 @@ static inline const char *get_video_format_name(enum video_format format)
case VIDEO_FORMAT_BGRA: return "BGRA";
case VIDEO_FORMAT_BGRX: return "BGRX";
case VIDEO_FORMAT_I444: return "I444";
case VIDEO_FORMAT_Y800: return "Y800";
case VIDEO_FORMAT_NONE:;
}