Commit fc60ce4d authored by amineer@chromium.org's avatar amineer@chromium.org

Revert 278338 "Smart Revert 276260 "Win Video Capture: Add suppo..."

Reverting from trunk at author's request to address crash.

> Smart Revert 276260 "Win Video Capture: Add support for HDYC pixel for..."
> 
> "Smart" because it needed some rebasing.
> 
> > Win Video Capture: Add support for HDYC pixel format.
> >
> > This pixel format is a synonym of YUYV and is needed
> > for at least the DeckLink video capture card.
> > This format is not specified in Windows headers
> > probably because this is just a synonym of other
> > pixel formats, IOW they are all the same except for
> > the first word, which is the name read in hex
> > backwards:
> > 30323449 --> 0x30 0x32 0x34 0x49 -> 024I
> > 43594448 --> 0x43 0x59 0x44 0x48 -> CYDH
> >
> > and then all the YUV (422 and 420 alike) use the same
> > trailing sequence
> > ... 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}}
> >
> > HDYC: http://www.fourcc.org/yuv.php#HDYC
> >
> > BUG=380939
> >
> > Review URL: https://codereview.chromium.org/317073010
> 
> NOTRY=true
> 
> TBR=mcasas@chromium.org
> 
> Review URL: https://codereview.chromium.org/338853009

TBR=mcasas@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278553 0039d316-1c4b-4281-b951-d872f2087c98
parent 575d327f
......@@ -7,6 +7,8 @@
#include "base/logging.h"
#include "media/video/capture/win/sink_input_pin_win.h"
namespace media {
// Define GUID for I420. This is the color format we would like to support but
// it is not defined in the DirectShow SDK.
// http://msdn.microsoft.com/en-us/library/dd757532.aspx
......@@ -14,8 +16,12 @@
GUID kMediaSubTypeI420 = {
0x30323449, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71}
};
namespace media {
// UYVY synonym with BT709 color components, used in HD video. This variation
// might appear in non-USB capture cards and it's implemented as a normal YUV
// pixel format with the characters HDYC encoded in the first array word.
GUID kMediaSubTypeHDYC = {
0x43594448, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
};
SinkFilterObserver::~SinkFilterObserver() {}
......
......@@ -16,13 +16,17 @@
#include "media/video/capture/win/filter_base_win.h"
#include "media/video/capture/win/sink_filter_observer_win.h"
namespace media {
// Define GUID for I420. This is the color format we would like to support but
// it is not defined in the DirectShow SDK.
// http://msdn.microsoft.com/en-us/library/dd757532.aspx
// 30323449-0000-0010-8000-00AA00389B71.
extern GUID kMediaSubTypeI420;
namespace media {
// UYVY synonym with BT709 color components, used in HD video. This variation
// might appear in non-USB capture cards and it's implemented as a normal YUV
// pixel format with the characters HDYC encoded in the first array word.
extern GUID kMediaSubTypeHDYC;
class SinkInputPin;
......
......@@ -142,6 +142,7 @@ VideoPixelFormat VideoCaptureDeviceWin::TranslateMediaSubtypeToPixelFormat(
{ MEDIASUBTYPE_MJPG, PIXEL_FORMAT_MJPEG },
{ MEDIASUBTYPE_UYVY, PIXEL_FORMAT_UYVY },
{ MEDIASUBTYPE_ARGB32, PIXEL_FORMAT_ARGB },
{ kMediaSubTypeHDYC, PIXEL_FORMAT_UYVY },
};
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(pixel_formats); ++i) {
if (sub_type == pixel_formats[i].sub_type)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment