Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VideoPlayer: ffmpeg, fix calculating aspect ratio for 3d modes #10727

Merged
merged 1 commit into from Oct 20, 2016

Conversation

FernetMenta
Copy link
Contributor

@FernetMenta FernetMenta added Type: Fix non-breaking change which fixes an issue v17 Krypton Component: Video labels Oct 19, 2016
@FernetMenta FernetMenta added this to the Krypton 17.0-beta4 milestone Oct 19, 2016
@afedchin
Copy link
Member

thanks. will test this tonight.

@@ -833,7 +833,13 @@ bool CDVDVideoCodecFFmpeg::GetPictureCommon(DVDVideoPicture* pDvdVideoPicture)
aspect_ratio = av_q2d(pixel_aspect) * pDvdVideoPicture->iWidth / pDvdVideoPicture->iHeight;

if (aspect_ratio <= 0.0)
{

This comment was marked as spam.

This comment was marked as spam.

@afedchin
Copy link
Member

I can't test with all my samples, but seems with this an anamorph video is displayed wrong.
I'll try to explain:

  1. for anamorph videos (1920x1080) we should use codec aspect without changes.
  2. for non anamorph videos (1920x2160 or 3840x1080) we should change aspect to *2 or /2

@afedchin
Copy link
Member

here is a sample https://www.dropbox.com/s/q5y3q4jee30y4hx/3d.sbs.disney_3d_global_sizzle_2012-DWEU.m2ts?dl=0 which doesn't work with this

@afedchin
Copy link
Member

with this afedchin@3989890 I have correct aspect for anamorph and full stereo. as I said above I will test with more samples tonight.

@FernetMenta
Copy link
Contributor Author

your sample does not have stereo_mode set by ffmpeg. stereo_mode is set by CStereoscopicsManager::DetectStereoModeByString.
this is all rather hacky and a can of worms ...
we have to keep things clear and separated.

@afedchin
Copy link
Member

but we support both stereo flags from a container and file naming convention.

@FernetMenta
Copy link
Contributor Author

but the one form file naming must not be used to determine aspect ratio. PR is updated.

@afedchin
Copy link
Member

this https://www.dropbox.com/s/an8v07r1t3k0e9h/3d.Kodi.test.mkv?dl=0 sample (anamorph stereo) still not work as expected.

@FernetMenta
Copy link
Contributor Author

@afedchin I looked into ffmpeg code and noticed that AR already observes stereo modes. All samples I got work with this change.

@afedchin
Copy link
Member

after quick test seems it returns pre ffmpeg 3.x behavior

@FernetMenta
Copy link
Contributor Author

great, thanks

jenkins build this please

@FernetMenta FernetMenta merged commit 8b6a24f into xbmc:master Oct 20, 2016
@FernetMenta FernetMenta deleted the aspect branch October 20, 2016 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Video Type: Fix non-breaking change which fixes an issue v17 Krypton
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants