mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
androidmedia: fix a minor error in COLOR_FormatYUV420Planar converting
https://bugzilla.gnome.org/show_bug.cgi?id=700521
This commit is contained in:
parent
15f4154b6a
commit
0a90994b99
1 changed files with 9 additions and 2 deletions
|
@ -841,13 +841,20 @@ gst_amc_video_dec_fill_buffer (GstAmcVideoDec * self, gint idx,
|
|||
src += self->crop_left;
|
||||
row_length = self->width;
|
||||
} else if (i > 0) {
|
||||
/* skip the Y plane */
|
||||
src += slice_height * stride;
|
||||
src += self->crop_top * src_stride;
|
||||
|
||||
/* crop_top/crop_left divided by two
|
||||
* because one byte of the U/V planes
|
||||
* corresponds to two pixels horizontally/vertically */
|
||||
src += self->crop_top / 2 * src_stride;
|
||||
src += self->crop_left / 2;
|
||||
row_length = (self->width + 1) / 2;
|
||||
}
|
||||
if (i == 2)
|
||||
if (i == 2) {
|
||||
/* skip the U plane */
|
||||
src += ((slice_height + 1) / 2) * ((stride + 1) / 2);
|
||||
}
|
||||
|
||||
dest = GST_VIDEO_FRAME_COMP_DATA (&vframe, i);
|
||||
height = GST_VIDEO_FRAME_COMP_HEIGHT (&vframe, i);
|
||||
|
|
Loading…
Reference in a new issue