Skip to content

Commit

Permalink
Revert 174311
Browse files Browse the repository at this point in the history
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
  • Loading branch information
kinaba@chromium.org committed Dec 21, 2012
1 parent 9e008af commit 6c9463c
Show file tree
Hide file tree
Showing 13 changed files with 6 additions and 506 deletions.
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ vars = {

"libjingle_revision": "251",
"libphonenumber_revision": "456",
"libvpx_revision": "174246",
"libvpx_revision": "173187",
"lss_revision": "17",

# These two FFmpeg variables must be updated together. One is used for SVN
Expand Down
6 changes: 0 additions & 6 deletions chrome/app/generated_resources.grd
Original file line number Diff line number Diff line change
Expand Up @@ -6628,12 +6628,6 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_FLAGS_ENABLE_OPUS_PLAYBACK_DESCRIPTION" desc="Description for the flag to enable Opus playback in &lt;video&gt; elements.">
Enable experimental Opus playback in the video element.
</message>
<message name="IDS_FLAGS_ENABLE_VP9_PLAYBACK_NAME" desc="Title for the flag to enable VP9 playback in &lt;video&gt; elements.">
Enable VP9 playback in &lt;video&gt; elements.
</message>
<message name="IDS_FLAGS_ENABLE_VP9_PLAYBACK_DESCRIPTION" desc="Description for the flag to enable VP9 playback in &lt;video&gt; elements.">
Enable experimental VP9 playback in the video element.
</message>
<message name="IDS_FLAGS_AURA_TRANSLUCENT_FRAMES_NAME" desc="Title for the flag to enable fancy translucent windows.">
Translucent windows
</message>
Expand Down
7 changes: 0 additions & 7 deletions chrome/browser/about_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -643,13 +643,6 @@ const Experiment kExperiments[] = {
kOsAll,
SINGLE_VALUE_TYPE(switches::kEnableOpusPlayback)
},
{
"enable-vp9-playback",
IDS_FLAGS_ENABLE_VP9_PLAYBACK_NAME,
IDS_FLAGS_ENABLE_VP9_PLAYBACK_DESCRIPTION,
kOsAll,
SINGLE_VALUE_TYPE(switches::kEnableVp9Playback)
},
#if defined(USE_ASH)
{
"ash-disable-auto-window-placement",
Expand Down
1 change: 0 additions & 1 deletion content/browser/renderer_host/render_process_host_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,6 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
switches::kDisableTouchAdjustment,
switches::kEnableViewport,
switches::kEnableOpusPlayback,
switches::kEnableVp9Playback,
switches::kForceDeviceScaleFactor,
switches::kFullMemoryCrashReport,
#if !defined (GOOGLE_CHROME_BUILD)
Expand Down
1 change: 0 additions & 1 deletion media/DEPS
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
include_rules = [
"+jni",
"+third_party/ffmpeg",
"+third_party/libvpx",
"+third_party/openmax",
"+third_party/opus",
"+third_party/skia",
Expand Down
3 changes: 0 additions & 3 deletions media/base/media_switches.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,4 @@ const char kEnableEncryptedMedia[] = "enable-encrypted-media";
// Enables Opus playback in media elements.
const char kEnableOpusPlayback[] = "enable-opus-playback";

// Enables VP9 playback in media elements.
const char kEnableVp9Playback[] = "enable-vp9-playback";

} // namespace switches
2 changes: 0 additions & 2 deletions media/base/media_switches.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ MEDIA_EXPORT extern const char kEnableEncryptedMedia[];

MEDIA_EXPORT extern const char kEnableOpusPlayback[];

MEDIA_EXPORT extern const char kEnableVp9Playback[];

} // namespace switches

#endif // MEDIA_BASE_MEDIA_SWITCHES_H_
8 changes: 2 additions & 6 deletions media/base/video_decoder_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,12 @@ enum VideoCodec {
kCodecMPEG4,
kCodecTheora,
kCodecVP8,
kCodecVP9,
// DO NOT ADD RANDOM VIDEO CODECS!
//
// The only acceptable time to add a new codec is if there is production code
// that uses said codec in the same CL.

kVideoCodecMax = kCodecVP9 // Must equal the last "real" codec above.
kVideoCodecMax = kCodecVP8 // Must equal the last "real" codec above.
};

// Video stream profile. This *must* match PP_VideoDecoder_Profile.
Expand All @@ -59,10 +58,7 @@ enum VideoCodecProfile {
VP8PROFILE_MIN = 11,
VP8PROFILE_MAIN = VP8PROFILE_MIN,
VP8PROFILE_MAX = VP8PROFILE_MAIN,
VP9PROFILE_MIN = 12,
VP9PROFILE_MAIN = VP9PROFILE_MIN,
VP9PROFILE_MAX = VP9PROFILE_MAIN,
VIDEO_CODEC_PROFILE_MAX = VP9PROFILE_MAX,
VIDEO_CODEC_PROFILE_MAX = VP8PROFILE_MAX,
};

class MEDIA_EXPORT VideoDecoderConfig {
Expand Down
34 changes: 3 additions & 31 deletions media/ffmpeg/ffmpeg_common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down Expand Up @@ -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.
Expand Down
Loading

0 comments on commit 6c9463c

Please sign in to comment.