Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(576)

Unified Diff: media/muxers/webm_muxer.cc

Issue 2815303005: Avoid setting alpha mode for H264 webm containers (Closed)
Patch Set: mcasas@ nit Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/muxers/webm_muxer.cc
diff --git a/media/muxers/webm_muxer.cc b/media/muxers/webm_muxer.cc
index 5b98472f875a5f536b9369f7e38fc626f4a6732d..dc5e07aa78fef1d673153c1132d279077f7a9a10 100644
--- a/media/muxers/webm_muxer.cc
+++ b/media/muxers/webm_muxer.cc
@@ -246,6 +246,13 @@ void WebmMuxer::AddVideoTrack(const gfx::Size& frame_size, double frame_rate) {
DCHECK_EQ(0ull, video_track->crop_bottom());
DCHECK_EQ(0.0f, video_track->frame_rate());
+ // Segment's timestamps should be in milliseconds, DCHECK it. See
+ // http://www.webmproject.org/docs/container/#muxer-guidelines
+ DCHECK_EQ(1000000ull, segment_.GetSegmentInfo()->timecode_scale());
+
+ // Set alpha channel parameters for only VPX (crbug.com/711825).
+ if (video_codec_ == kCodecH264)
+ return;
video_track->SetAlphaMode(mkvmuxer::VideoTrack::kAlpha);
// Alpha channel, if present, is stored in a BlockAdditional next to the
// associated opaque Block, see
@@ -253,10 +260,6 @@ void WebmMuxer::AddVideoTrack(const gfx::Size& frame_size, double frame_rate) {
// This follows Method 1 for VP8 encoding of A-channel described on
// http://wiki.webmproject.org/alpha-channel.
video_track->set_max_block_additional_id(1);
-
- // Segment's timestamps should be in milliseconds, DCHECK it. See
- // http://www.webmproject.org/docs/container/#muxer-guidelines
- DCHECK_EQ(1000000ull, segment_.GetSegmentInfo()->timecode_scale());
}
void WebmMuxer::AddAudioTrack(const media::AudioParameters& params) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698