[Bug 760270] videoparse: add support of padded video

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Jan 26 11:48:19 PST 2016


https://bugzilla.gnome.org/show_bug.cgi?id=760270

--- Comment #22 from Nicolas Dufresne (stormer) <nicolas.dufresne at collabora.co.uk> ---
(In reply to Aurélien Zanelli from comment #21)
> Created attachment 319760 [details] [review]
> [3/6] videoparse: add properties to set framesize, strides and planes offsets
> 
> (In reply to Nicolas Dufresne (stormer) from comment #17)
> > Review of attachment 318876 [details] [review] [review]:
> > 
> > ::: gst/rawparse/gstvideoparse.c
> > @@ +31,3 @@
> >  
> > +#include <stdlib.h>
> > +#include <stdio.h>
> > 
> > Why ?
> stdlib is needed for atoi function used to parse stride/offset string but
> stdio was not needed so I remove it.

Make sense. Would it possible to port to g_ascii_strtoll() or
g_ascii_strtoull(), just to make sure we stay portable (maybe I'm over worried
here ?)

> > 
> > @@ +347,3 @@
> > +
> > +  /* 1. check that provided offsets are greaters than the default ones and
> > is
> > +   * consistent with plane size */
> > 
> > For I420, GStreamer defaults add an empty line, which imho is acceptable no
> > to have. It's a minor issue though.
> I'm not sure I understand what you mean here.
> Do you mean the 'empty line' added by the round up of height when it's no a
> multiple of 2 ?
> In this case, it seems right to do that, no ?

So, what we do in GStreamer as a default for I420 and YV12 is:

  info->offset[1] = info->stride[0] * GST_ROUND_UP_2 (height);

This effectively skip a line. Skipping this line has no effect on memory
alignment. Odd and even lines have the same memory alignment. I don't really
know the origin of this. An offset 0 to 0 and offset 1 to (even if height is
odd):

  info->offset[1] = info->stride[0] * height;

Would be completely valid. In fact this is what you get from GLMemory. So
basically, this is one case where the GStreamer default offset is not the
minimum acceptable offset. The minimum acceptable offset is (for i <
(num_planes -1)):

  offset[i + 1] = offset[i] + height * stride[i]

-- 
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