File indexing completed on 2024-04-28 04:49:54
0001 /* 0002 SPDX-FileCopyrightText: 1998-2007 Sebastian Trueg <trueg@k3b.org> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 #include "k3bvideodvdvideostream.h" 0007 0008 unsigned int K3b::VideoDVD::VideoStream::pictureWidth() const 0009 { 0010 switch( pictureSize() ) { 0011 case VIDEO_PICTURE_SIZE_720: 0012 return 720; 0013 case VIDEO_PICTURE_SIZE_704: 0014 return 704; 0015 case VIDEO_PICTURE_SIZE_352: 0016 case VIDEO_PICTURE_SIZE_352_2: 0017 return 352; 0018 default: 0019 return 0; 0020 } 0021 } 0022 0023 0024 unsigned int K3b::VideoDVD::VideoStream::pictureHeight() const 0025 { 0026 int height = 480; 0027 if( format() != 0 ) 0028 height = 576; 0029 if( pictureSize() == VIDEO_PICTURE_SIZE_352_2 ) 0030 height /= 2; 0031 0032 return height; 0033 } 0034 0035 0036 unsigned int K3b::VideoDVD::VideoStream::realPictureWidth() const 0037 { 0038 double aspectRatio = 0.0; 0039 if( displayAspectRatio() == K3b::VideoDVD::VIDEO_ASPECT_RATIO_4_3 ) 0040 aspectRatio = 4.0/3.0; 0041 else 0042 aspectRatio = 16.0/9.0; 0043 return (int)(aspectRatio * (double)realPictureHeight()); 0044 } 0045 0046 0047 unsigned int K3b::VideoDVD::VideoStream::realPictureHeight() const 0048 { 0049 return pictureHeight(); 0050 }