After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 527951 - [new element] aspectratiocrop
[new element] aspectratiocrop
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal blocker
: 0.10.14
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-04-13 23:34 UTC by Thijs Vermeir
Modified: 2009-01-25 18:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
aspectratio.diff (13.82 KB, patch)
2008-04-13 23:35 UTC, Thijs Vermeir
needs-work Details | Review
aspectratiocrop element (14.49 KB, patch)
2008-10-09 08:12 UTC, Thijs Vermeir
none Details | Review
aspectratiocrop element (15.49 KB, patch)
2009-01-08 11:48 UTC, Thijs Vermeir
none Details | Review

Description Thijs Vermeir 2008-04-13 23:34:30 UTC
This element crop's the video to the requested aspect-ratio of the user.
Comment 1 Thijs Vermeir 2008-04-13 23:35:40 UTC
Created attachment 109199 [details] [review]
aspectratio.diff

Crop to the aspect ratio requested by the property
Comment 2 Sebastian Dröge (slomo) 2008-10-08 11:41:47 UTC
IMHO this should get a different name. I would expect an "aspectratio" element to scale the images to a given aspect ratio.

This is more an "aspectratiocrop" element ;)  Other than that the code looks good...
Comment 3 Thijs Vermeir 2008-10-09 08:12:00 UTC
Created attachment 120253 [details] [review]
aspectratiocrop element

Renamed the element to aspectratiocrop. :)

I will commit if there are no further objections ...
Comment 4 Michael Smith 2008-10-09 17:06:20 UTC
I was going to ask you to document that this element cropped to a specifed display aspect ratio... but then I looked at the code, and it doesn't - it crops to a specified image aspect ratio.

Is this actually what anyone wants? It seems unlikely. Please make it crop to the specified DAR instead, unless you can explain why doing what it currently does is sensible.

Also, please rename incomming_ar to incoming_ar - it'll annoy me less! :-)
Comment 5 Thijs Vermeir 2008-10-09 23:00:59 UTC
(In reply to comment #4)
> I was going to ask you to document that this element cropped to a specifed
> display aspect ratio... but then I looked at the code, and it doesn't - it
> crops to a specified image aspect ratio.
> 
> Is this actually what anyone wants? It seems unlikely. Please make it crop to
> the specified DAR instead, unless you can explain why doing what it currently
> does is sensible.

No, I'm really talking about (image) aspect ratio here. I'm using this in a transcoding pipeline with sources from TV, DVD and internet, where it is not uncommen that they add (by mistake or incopetence) black borders. But ofcourse it doesn't make sence to transcode these black borders. So here it has nothing todo with DAR but I think this is still a usefull element. Cropping to DAR can also be usefull but it's not the goal here...

And I'm happy that you review in such de
> 
> Also, please rename incomming_ar to incoming_ar - it'll annoy me less! :-)
> 

I'm happy that you review in such detail, will fix it ;)
Comment 6 David Schleef 2008-10-09 23:36:50 UTC
I think Mike's point is that it doesn't take pixel aspect ratio into account.  In particular, it will incorrectly crop SD NTSC video (i.e., a DVD rip), which is 704x480 with 10/11 pixels, giving a display aspect ratio of 4:3.

(We'll ignore the fact that 704x480 is actually just the clean area of 720x480 video.  Bonus points for implementing clean area in gstreamer.)
Comment 7 Thijs Vermeir 2009-01-08 11:48:23 UTC
Created attachment 126023 [details] [review]
aspectratiocrop element

Fixed the typo and take pixel aspect ratio into account. Integration of clean area needs probably more info on the stream.
Comment 9 Tim-Philipp Müller 2009-01-23 16:32:48 UTC
Please add documentation (gtk-doc blurb) for this element and at least a minimal unit test.