w = MIN (w, img->w);
for (i = 0; i < h; i++)
- memcpy (d + i * stride, img->planes[PLANE_Y] + i * img->stride[PLANE_Y], w);
+ memcpy (d + i * stride,
+ img->planes[VPX_PLANE_Y] + i * img->stride[VPX_PLANE_Y], w);
d = GST_BUFFER_DATA (buffer) +
gst_video_format_get_component_offset (decoder->state.format, 1,
decoder->state.width);
w = MIN (w, img->w >> img->x_chroma_shift);
for (i = 0; i < h; i++)
- memcpy (d + i * stride, img->planes[PLANE_U] + i * img->stride[PLANE_U], w);
+ memcpy (d + i * stride,
+ img->planes[VPX_PLANE_U] + i * img->stride[VPX_PLANE_U], w);
d = GST_BUFFER_DATA (buffer) +
gst_video_format_get_component_offset (decoder->state.format, 2,
decoder->state.width, decoder->state.height);
/* Same stride, height, width as above */
for (i = 0; i < h; i++)
- memcpy (d + i * stride, img->planes[PLANE_V] + i * img->stride[PLANE_V], w);
+ memcpy (d + i * stride,
+ img->planes[VPX_PLANE_V] + i * img->stride[VPX_PLANE_V], w);
}
static GstFlowReturn
image->w = image->d_w = encoder->state.width;
image->h = image->d_h = encoder->state.height;
- image->stride[PLANE_Y] =
+ image->stride[VPX_PLANE_Y] =
gst_video_format_get_row_stride (encoder->state.format, 0,
encoder->state.width);
- image->stride[PLANE_U] =
+ image->stride[VPX_PLANE_U] =
gst_video_format_get_row_stride (encoder->state.format, 1,
encoder->state.width);
- image->stride[PLANE_V] =
+ image->stride[VPX_PLANE_V] =
gst_video_format_get_row_stride (encoder->state.format, 2,
encoder->state.width);
- image->planes[PLANE_Y] =
+ image->planes[VPX_PLANE_Y] =
data + gst_video_format_get_component_offset (encoder->state.format, 0,
encoder->state.width, encoder->state.height);
- image->planes[PLANE_U] =
+ image->planes[VPX_PLANE_U] =
data + gst_video_format_get_component_offset (encoder->state.format, 1,
encoder->state.width, encoder->state.height);
- image->planes[PLANE_V] =
+ image->planes[VPX_PLANE_V] =
data + gst_video_format_get_component_offset (encoder->state.format, 2,
encoder->state.width, encoder->state.height);
#define VPX_IMG_FMT_I420 IMG_FMT_I420
#endif
+#ifndef VPX_PLANE_Y
+#define VPX_PLANE_Y PLANE_Y
+#endif
+
+#ifndef VPX_PLANE_U
+#define VPX_PLANE_U PLANE_U
+#endif
+
+#ifndef VPX_PLANE_V
+#define VPX_PLANE_V PLANE_V
+#endif
+
const char * gst_vpx_error_name (vpx_codec_err_t status);
G_END_DECLS