diff options
author | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-02 03:15:28 +0000 |
---|---|---|
committer | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-02 03:15:28 +0000 |
commit | f535217b5fc3d569ac2f18fd2a5177a85e934239 (patch) | |
tree | cac39d4b03b19c0f4bc2dfdb4bf0eb33a28fb49b /media/ffmpeg | |
parent | f649bf548e4cbc6bfa0ab853ea2b0a9d8183fa2b (diff) | |
download | chromium_src-f535217b5fc3d569ac2f18fd2a5177a85e934239.zip chromium_src-f535217b5fc3d569ac2f18fd2a5177a85e934239.tar.gz chromium_src-f535217b5fc3d569ac2f18fd2a5177a85e934239.tar.bz2 |
Revert 87578 - Respect pixel aspect ratio of video if it contains one.
BUG=18941
TEST=Check correct AR on http://people.xiph.org/~giles/2009/celt-aspect.html
Alternately, fix 59412 and run media/video-display-aspect-ratio layout test
Review URL: http://codereview.chromium.org/7086002
TBR=scottfr@chromium.org
Review URL: http://codereview.chromium.org/7109002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87579 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/ffmpeg')
-rw-r--r-- | media/ffmpeg/ffmpeg_common.cc | 21 | ||||
-rw-r--r-- | media/ffmpeg/ffmpeg_common.h | 6 |
2 files changed, 0 insertions, 27 deletions
diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc index 2ccd4eb..dedc40c 100644 --- a/media/ffmpeg/ffmpeg_common.cc +++ b/media/ffmpeg/ffmpeg_common.cc @@ -185,25 +185,4 @@ bool GetStreamByteCountOverRange(AVStream* stream, return true; } -int GetSurfaceHeight(AVStream* stream) { - return stream->codec->coded_height; -} - -int GetSurfaceWidth(AVStream* stream) { - double aspect_ratio; - - if (stream->sample_aspect_ratio.num) - aspect_ratio = av_q2d(stream->sample_aspect_ratio); - else if (stream->codec->sample_aspect_ratio.num) - aspect_ratio = av_q2d(stream->codec->sample_aspect_ratio); - else - aspect_ratio = 1.0; - - int width = floor(stream->codec->coded_width * aspect_ratio + 0.5); - - // An even width makes things easier for YV12 and appears to be the behavior - // expected by WebKit layout tests. - return width & ~1; -} - } // namespace media diff --git a/media/ffmpeg/ffmpeg_common.h b/media/ffmpeg/ffmpeg_common.h index 07daae1..3d39d52 100644 --- a/media/ffmpeg/ffmpeg_common.h +++ b/media/ffmpeg/ffmpeg_common.h @@ -103,12 +103,6 @@ bool GetStreamByteCountOverRange(AVStream* stream, int64* bytes, base::TimeDelta* range_start, base::TimeDelta* range_end); - -// Calculates the width and height of the video surface using the video's -// encoded dimensions and sample_aspect_ratio. -int GetSurfaceHeight(AVStream* stream); -int GetSurfaceWidth(AVStream* stream); - } // namespace media #endif // MEDIA_FFMPEG_FFMPEG_COMMON_H_ |