mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
Fix chroma stride for I420 stride/crop conversion
This commit is contained in:
parent
7dbef6415f
commit
bc7d2006e3
1 changed files with 5 additions and 1 deletions
|
@ -712,12 +712,17 @@ gst_amc_video_dec_fill_buffer (GstAmcVideoDec * self, gint idx,
|
|||
|
||||
/* Same video format */
|
||||
if (buffer_info->size == GST_BUFFER_SIZE (outbuf)) {
|
||||
GST_DEBUG_OBJECT (self, "Buffer sizes equal, doing fast copy");
|
||||
memcpy (GST_BUFFER_DATA (outbuf), buf->data + buffer_info->offset,
|
||||
buffer_info->size);
|
||||
ret = TRUE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
GST_DEBUG_OBJECT (self,
|
||||
"Sizes not equal (%d vs %d), doing slow line-by-line copying",
|
||||
buffer_info->size, GST_BUFFER_SIZE (outbuf));
|
||||
|
||||
/* Different video format, try to convert */
|
||||
switch (self->color_format) {
|
||||
case COLOR_FormatYUV420Planar:{
|
||||
|
@ -736,7 +741,6 @@ gst_amc_video_dec_fill_buffer (GstAmcVideoDec * self, gint idx,
|
|||
dest_stride = GST_VIDEO_INFO_COMP_STRIDE (info, i);
|
||||
} else {
|
||||
src_stride = self->stride / 2;
|
||||
src_stride = GST_ROUND_UP_16 (src_stride);
|
||||
dest_stride = GST_VIDEO_INFO_COMP_STRIDE (info, i);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue