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

@@ -21,6 +21,7 @@ static inline enum AVPixelFormat obs_to_ffmpeg_video_format(
case VIDEO_FORMAT_RGBA: return AV_PIX_FMT_RGBA;
case VIDEO_FORMAT_BGRA: return AV_PIX_FMT_BGRA;
case VIDEO_FORMAT_BGRX: return AV_PIX_FMT_BGRA;
case VIDEO_FORMAT_Y800: return AV_PIX_FMT_GRAY8;
}
return AV_PIX_FMT_NONE;
@@ -37,6 +38,7 @@ static inline enum video_format ffmpeg_to_obs_video_format(
case AV_PIX_FMT_UYVY422: return VIDEO_FORMAT_UYVY;
case AV_PIX_FMT_RGBA: return VIDEO_FORMAT_RGBA;
case AV_PIX_FMT_BGRA: return VIDEO_FORMAT_BGRA;
case AV_PIX_FMT_GRAY8: return VIDEO_FORMAT_Y800;
case AV_PIX_FMT_NONE:
default: return VIDEO_FORMAT_NONE;
}