dest += dest_stride;
src += src_stride;
}
+ } else if (GST_VIDEO_FRAME_FORMAT (&vframe) == GST_VIDEO_FORMAT_Y444) {
+ src = GST_VIDEO_FRAME_PLANE_DATA (&vframe, 1);
+ src_stride = GST_VIDEO_FRAME_PLANE_STRIDE (&vframe, 1);
+ dest = (guint8 *) in_buf_lock.bufferDataPtr +
+ GST_ROUND_UP_32 (height) * in_buf_lock.pitch;
+ dest_stride = in_buf_lock.pitch;
+
+ for (y = 0; y < height; ++y) {
+ memcpy (dest, src, width);
+ dest += dest_stride;
+ src += src_stride;
+ }
+
+ src = GST_VIDEO_FRAME_PLANE_DATA (&vframe, 2);
+ src_stride = GST_VIDEO_FRAME_PLANE_STRIDE (&vframe, 2);
+ dest = (guint8 *) in_buf_lock.bufferDataPtr +
+ 2 * GST_ROUND_UP_32 (height) * in_buf_lock.pitch;
+
+ for (y = 0; y < height; ++y) {
+ memcpy (dest, src, width);
+ dest += dest_stride;
+ src += src_stride;
+ }
} else {
// FIXME: this only works for NV12 and I420
g_assert_not_reached ();
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS ("video/x-raw, " "format = (string) { NV12, I420 }, " // TODO: YV12, Y444 support
+ GST_STATIC_CAPS ("video/x-raw, " "format = (string) { NV12, I420, Y444 }, "
"width = (int) [ 16, 4096 ], height = (int) [ 16, 4096 ], "
"framerate = (fraction) [0, MAX],"
"interlace-mode = { progressive, mixed, interleaved } "
config->encodeCodecConfig.h264Config.chromaFormatIDC = 1;
if (GST_VIDEO_INFO_FORMAT (info) == GST_VIDEO_FORMAT_Y444) {
GST_DEBUG_OBJECT (h264enc, "have Y444 input, setting config accordingly");
- config->encodeCodecConfig.h264Config.separateColourPlaneFlag = 1;
+ config->profileGUID = NV_ENC_H264_PROFILE_HIGH_444_GUID;
config->encodeCodecConfig.h264Config.chromaFormatIDC = 3;
}