[Bug 687964] videocrop: Add NV12/NV21 support
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Fri Nov 9 02:42:11 PST 2012
https://bugzilla.gnome.org/show_bug.cgi?id=687964
GStreamer | gst-plugins-good | 1.x
Sebastian Dröge <slomo> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #228528|none |needs-work
status| |
--- Comment #2 from Sebastian Dröge <slomo at circular-chaos.org> 2012-11-09 10:42:04 UTC ---
Review of attachment 228528:
--> (https://bugzilla.gnome.org/review?bug=687964&attachment=228528)
::: gst/videocrop/gstvideocrop.c
@@ +392,3 @@
+ /* UV plane */
+ uv_in = y_in + GST_VIDEO_FRAME_COMP_OFFSET (in_frame, 1);
+ uv_out = y_out + GST_VIDEO_FRAME_COMP_OFFSET (out_frame, 1);
Use GST_VIDEO_FRAME_PLANE_DATA() here too. The components are always in order
Y, U, V, A while what you want is the offset to the second plane (no matter if
U or V is the first component in memory).
Also the Y and UV planes could be in different memory areas.
@@ +404,3 @@
+ }
+
+ uv_in += (vcrop->crop_top / 2) * GST_VIDEO_FRAME_PLANE_STRIDE (in_frame, 1);
Round down this one too maybe?
@@ +408,3 @@
+ dx = GST_ROUND_UP_2 (width);
+
+ for (i = 0; i < GST_ROUND_UP_2 (height) / 2; i++) {
Maybe put this round-divide calculation out of the loop
::: gst/videocrop/gstvideocrop.h
@@ +40,3 @@
VIDEO_CROP_PIXEL_FORMAT_PACKED_COMPLEX, /* UYVY, YVYU */
+ VIDEO_CROP_PIXEL_FORMAT_PLANAR, /* I420, YV12 */
+ VIDEO_CROP_PIXEL_FORMAT_BIPLANAR /* NV12, NV21 */
Maybe call this semi-planar instead... first read bipolar here ;)
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list