summaryrefslogtreecommitdiffstats
path: root/media/ffmpeg/ffmpeg_common.cc
diff options
context:
space:
mode:
authormichaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-02 03:15:28 +0000
committermichaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-02 03:15:28 +0000
commitf535217b5fc3d569ac2f18fd2a5177a85e934239 (patch)
treecac39d4b03b19c0f4bc2dfdb4bf0eb33a28fb49b /media/ffmpeg/ffmpeg_common.cc
parentf649bf548e4cbc6bfa0ab853ea2b0a9d8183fa2b (diff)
downloadchromium_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/ffmpeg_common.cc')
-rw-r--r--media/ffmpeg/ffmpeg_common.cc21
1 files changed, 0 insertions, 21 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