diff options
author | kinaba@chromium.org <kinaba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-21 07:20:10 +0000 |
---|---|---|
committer | kinaba@chromium.org <kinaba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-21 07:20:10 +0000 |
commit | 6c9463c58d37922dbd8c47c535f76f72cf40dc41 (patch) | |
tree | 92a22d0a0345ba6dcbab428c39613acdf692f2e2 /media/ffmpeg/ffmpeg_common.cc | |
parent | 9e008aff45ca1883f033a734617b745bbb50a6a9 (diff) | |
download | chromium_src-6c9463c58d37922dbd8c47c535f76f72cf40dc41.zip chromium_src-6c9463c58d37922dbd8c47c535f76f72cf40dc41.tar.gz chromium_src-6c9463c58d37922dbd8c47c535f76f72cf40dc41.tar.bz2 |
Revert 174311
Windows build is failing around libvpx after this patch:
http://build.chromium.org/p/chromium/builders/Win/builds/14332
[1220/203018 : error : decomposer.cc(2186)] Block collision for function at 46813200(1536) with ..\..\build\Release\obj\global_intermediate\third_party\libvpx\vp9_subpixel_mmx.obj
> Add wrapper class to media for support of VP9 video, and add a command line flag to enable the support.
>
> This initial version of the wrapper provides support for decoding VP9 video in WebM container files, and is disabled by default.
>
> New flag added: --enable-vp9-playback
>
> BUG=166094
> TEST=VP9 video in WebM containers plays back in <video> elements when --enable-vp9-playback is specified on the command line.
>
>
> Review URL: https://chromiumcodereview.appspot.com/11468018
TBR=tomfinegan@chromium.org
Review URL: https://codereview.chromium.org/11578046
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174346 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/ffmpeg/ffmpeg_common.cc')
-rw-r--r-- | media/ffmpeg/ffmpeg_common.cc | 34 |
1 files changed, 3 insertions, 31 deletions
diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc index 3562ec3..1fd5cd9 100644 --- a/media/ffmpeg/ffmpeg_common.cc +++ b/media/ffmpeg/ffmpeg_common.cc @@ -10,10 +10,6 @@ #include "media/base/video_frame.h" #include "media/base/video_util.h" -// TODO(tomfinegan): Remove this once FFmpeg rolls for M25. The VP9 patch is in -// tree, but this is required until the roll happens. -#define AV_CODEC_ID_VP9 170 - namespace media { // Why FF_INPUT_BUFFER_PADDING_SIZE? FFmpeg assumes all input buffers are @@ -153,11 +149,6 @@ VideoCodec CodecIDToVideoCodec(CodecID codec_id) { case CODEC_ID_VP8: return kCodecVP8; default: - if (codec_id == AV_CODEC_ID_VP9) { - // TODO(tomfinegan): Remove this once FFmpeg rolls for M25, and - // AV_CODEC_ID_VP9 is part of CodecID. - return kCodecVP9; - } DVLOG(1) << "Unknown video CodecID: " << codec_id; } return kUnknownVideoCodec; @@ -177,10 +168,6 @@ static CodecID VideoCodecToCodecID(VideoCodec video_codec) { return CODEC_ID_MPEG4; case kCodecVP8: return CODEC_ID_VP8; - case kCodecVP9: - // TODO(tomfinegan): Remove this cast once FFmpeg rolls for M25, and the - // local define for AV_CODEC_ID_VP9 is removed. - return static_cast<CodecID>(AV_CODEC_ID_VP9); default: DVLOG(1) << "Unknown VideoCodec: " << video_codec; } @@ -324,28 +311,13 @@ void AVStreamToVideoDecoderConfig( aspect_ratio = stream->codec->sample_aspect_ratio; VideoCodec codec = CodecIDToVideoCodec(stream->codec->codec_id); - - VideoCodecProfile profile = VIDEO_CODEC_PROFILE_UNKNOWN; - if (codec == kCodecVP8) - profile = VP8PROFILE_MAIN; - else if (codec == kCodecVP9) - profile = VP9PROFILE_MAIN; - else - profile = ProfileIDToVideoCodecProfile(stream->codec->profile); - + VideoCodecProfile profile = (codec == kCodecVP8) ? VP8PROFILE_MAIN : + ProfileIDToVideoCodecProfile(stream->codec->profile); gfx::Size natural_size = GetNaturalSize( visible_rect.size(), aspect_ratio.num, aspect_ratio.den); - - VideoFrame::Format format = PixelFormatToVideoFormat(stream->codec->pix_fmt); - if (codec == kCodecVP9) { - // TODO(tomfinegan): libavcodec doesn't know about VP9. - format = VideoFrame::YV12; - coded_size = natural_size; - } - config->Initialize(codec, profile, - format, + PixelFormatToVideoFormat(stream->codec->pix_fmt), coded_size, visible_rect, natural_size, stream->codec->extradata, stream->codec->extradata_size, false, // Not encrypted. |