WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
34790
[Gtk] wrong video aspect ratio
https://bugs.webkit.org/show_bug.cgi?id=34790
Summary
[Gtk] wrong video aspect ratio
Philippe Normand
Reported
2010-02-10 02:52:44 PST
In the linked page the video is displayed stretched. In naturalSize() after applying the PAR we should rescale the width and height.
Attachments
proposed patch
(4.53 KB, patch)
2010-02-10 07:11 PST
,
Philippe Normand
no flags
Details
Formatted Diff
Diff
proposed patch
(4.75 KB, patch)
2010-02-10 08:39 PST
,
Philippe Normand
no flags
Details
Formatted Diff
Diff
proposed patch
(5.93 KB, patch)
2010-02-10 09:35 PST
,
Philippe Normand
gustavo
: review-
Details
Formatted Diff
Diff
updated patch (with test)
(169.15 KB, patch)
2010-02-12 01:21 PST
,
Philippe Normand
gustavo
: review+
gustavo
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Philippe Normand
Comment 1
2010-02-10 07:11:34 PST
Created
attachment 48502
[details]
proposed patch
Sebastian Dröge (slomo)
Comment 2
2010-02-10 07:33:03 PST
(In reply to
comment #1
)
> Created an attachment (id=48502) [details] > proposed patch
You should divide the display width/height by their greatest common divisor before the great if-else block, otherwise you'll get very interesting results :) Other than that this looks good
Sebastian Dröge (slomo)
Comment 3
2010-02-10 07:33:47 PST
(In reply to
comment #2
)
> (In reply to
comment #1
) > > Created an attachment (id=48502) [details] [details] > > proposed patch > > You should divide the display width/height by their greatest common divisor > before the great if-else block, otherwise you'll get very interesting results > :)
To be more specific, you could get overflows, it doesn't change the results for the non-overflow cases.
Philippe Normand
Comment 4
2010-02-10 08:39:47 PST
Created
attachment 48506
[details]
proposed patch and updated as per slomo suggestion
WebKit Review Bot
Comment 5
2010-02-10 08:42:52 PST
Attachment 48506
[details]
did not build on gtk: Build output:
http://webkit-commit-queue.appspot.com/results/257303
Philippe Normand
Comment 6
2010-02-10 09:35:04 PST
Created
attachment 48508
[details]
proposed patch Imported the gcd function from GStreamer git and applied the WebKit coding style to it. So I had to rename it.
Gustavo Noronha (kov)
Comment 7
2010-02-10 09:56:07 PST
Comment on
attachment 48508
[details]
proposed patch 62 gint greatestCommonDivisor(gint a, gint b) No need to use gint for these. I think xan will agree =D 491 int width = 0, height = 0; 492 GstCaps* caps = GST_PAD_CAPS(pad); 493 gint pixelAspectRatioNumerator, pixelAspectRatioDenominator; 494 gint displayWidth, displayHeight, darGcd; Same here. Also GCD is an acronym, so it should go all upper-cased. I would also prefer to see displayAspectRatioGCD. I wonder if we can include a layout test with this one. We used to have this code added to fix a layout test, if I remember correctly, so we should be able to use it as a base, provided that we can add a video that triggers it to the tree. r- so we can have that test, as discussed on IRC =)
Philippe Normand
Comment 8
2010-02-12 01:21:58 PST
Created
attachment 48633
[details]
updated patch (with test)
Gustavo Noronha (kov)
Comment 9
2010-02-14 08:31:46 PST
Comment on
attachment 48633
[details]
updated patch (with test) 47 gint greatestCommonDivisor(gint a, gint b); You don't need to expose this function in the header. Just make it static, and remove it from the .h (it's only used inside that file). Pay attention while landing, you may need to use an svn checkout =(, I am not sure git svn will handle the new binary file well. Thanks!
Philippe Normand
Comment 10
2010-02-15 00:49:17 PST
Thanks ;) Landed as
http://trac.webkit.org/changeset/54766
(with git-svn, Gustavo! :))
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug