Change the video color space default.
commit4dc6c2ad0e595a5e0b543e8e1b8961ee0d742a32
authorwatk <watk@chromium.org>
Thu, 9 Jul 2015 19:16:21 +0000 (9 12:16 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 9 Jul 2015 19:17:00 +0000 (9 19:17 +0000)
tree2ab38408a1d91b51da57533a1f876900155fcbfb
parent27f3df6a40d985dddfae6c06ceaf305a9203432c
Change the video color space default.

Previously video without color space metadata was assumed to be in
Rec601. Now the default depends on the kind of playback. Normal src=
defaults to Rec601 for SD sized video (<720 pixels high), and Rec709 for
HD. MSE will always default to Rec709. Using a size based heuristic
doesn't make sense for MSE where it is common for the resolution to
change mid playback.

This CL doesn't change the meaning of COLOR_SPACE_UNSPECIFIED. Instead,
it adds a color space field to VideoDecoderConfig, and updates the video
decoders to use this as the default if they don't find a more
authoritative value in the bitstream.

This also fixes a (year old!) bug causing the blackwhite
tests to always succeed, renames the rec709 blackwhite test
file to match the name in blackwhite.html, and re-encodes it
to contain the color space metadata (previously it had none).

BUG=333619

Review URL: https://codereview.chromium.org/1221903003

Cr-Commit-Position: refs/heads/master@{#338110}
25 files changed:
chromecast/common/media/cma_param_traits.cc
chromecast/common/media/cma_param_traits_macros.h
chromecast/media/cma/ipc_streamer/video_decoder_config_marshaller.cc
chromecast/media/cma/pipeline/audio_video_pipeline_impl_unittest.cc
chromecast/media/cma/test/demuxer_stream_for_test.cc
chromecast/media/cma/test/mock_frame_provider.cc
content/browser/media/media_browsertest.cc
content/renderer/pepper/video_decoder_shim.cc
media/base/test_helpers.cc
media/base/video_decoder_config.cc
media/base/video_decoder_config.h
media/base/video_frame.h
media/ffmpeg/ffmpeg_common.cc
media/ffmpeg/ffmpeg_common.h
media/filters/decrypting_demuxer_stream.cc
media/filters/ffmpeg_video_decoder.cc
media/filters/ffmpeg_video_decoder_unittest.cc
media/filters/vpx_video_decoder.cc
media/formats/mp2t/es_adapter_video_unittest.cc
media/formats/mp2t/es_parser_h264.cc
media/formats/mp4/mp4_stream_parser.cc
media/formats/webm/webm_video_client.cc
media/mojo/interfaces/media_types.mojom
media/mojo/services/media_type_converters.cc
media/test/data/blackwhite_yuv420p_rec709.mp4 [new file with mode: 0644]