Microsoft Media Foundation官方文档翻译(12)《Video Media Types》

官方英文文档链接:https://docs.microsoft.com/en-us/windows/desktop/medfound/video-media-types

基于05/31/2018

此篇预计包含 Video Media Type 的前面几部分内容:

Video Media Type

    Video Subtype GUIDs

    Uncompressed Video Media Types

    About YUV Video

本节介绍如何创建和操作描述视频数据的 media type。

Topic Description
Video Subtype GUIDs 视频 subtype GUID 列表
Uncompressed Video Media Types 创建描述未压缩视频格式的 media type
About YUV Video 解释 YUV 视频的一般概念
Video Interlacing Media Foundation 如何处理隔行扫描视频
Image Stride 如何在处理视频时正确处理 stride
Picture Aspect Ratio 如何用 media type 计算视频长宽比
Extended Color Information 如何在 media type 中描述色彩空间
Recommended 8-Bit YUV Formats for Video Rendering 视频渲染时建议使用的 8-bit YUV 色彩格式
10-bit and 16-bit YUV Video Formats 建议使用的 10-bit 和 16-bit YUV 色彩格式
Video FOURCCs 介绍如何生成视频格式的 FOURCC

Video Subtype GUIDs

In this article

  1. Uncompressed RGB Formats
  2. YUV Formats: 8-Bit and Palettized
  3. YUV Formats: 10-Bit and 16-Bit
  4. Luminance and Depth Formats
  5. Encoded Video Types
  6. Creating Subtype GUIDs from FOURCCs and D3DFORMAT Values
  7. Related topics

下面的视频 subtype GUID 都定义在头文件 mfapi.h 中。若要指定 subtype,请在 media type 上设置 MF_MT_SUBTYPE attribute。

如果设置了这些 subtypes,那么 MF_MT_MAJOR_TYPE attribute 就要设置为 MFMediaType_Video。

Uncompressed RGB Formats

GUID Description
MFVideoFormat_RGB8 RGB, 8 bits per pixel (bpp). (Same memory layout as D3DFMT_P8.)
MFVideoFormat_RGB555 RGB 555, 16 bpp. (Same memory layout as D3DFMT_X1R5G5B5.)
MFVideoFormat_RGB565 RGB 565, 16 bpp. (Same memory layout as D3DFMT_R5G6B5.)
MFVideoFormat_RGB24 RGB, 24 bpp.
MFVideoFormat_RGB32 RGB, 32 bpp.
MFVideoFormat_ARGB32 RGB, 32 bpp with alpha channel.
MFVideoFormat_A2R10G10B10 RGB, 10 bpp for each color and 2 bpp for alpha. (Same memory layout as D3DFMT_A2B10G10R10)
MFVideoFormat_A16B16G16R16F RGB, 16 bpp with alpha channel. (Same memory layout as D3DFMT_A16B16G16R16F)

注意

这些子类型与以前 SDK(例如 DirectShow) 使用的 RGB 子类型的 GUID 并不匹配。

YUV Formats: 8-Bit and Palettized

GUID Format Sampling Packed or planar Bits per channel
MFVideoFormat_AI44 AI44 4:4:4 Packed Palettized
MFVideoFormat_AYUV AYUV 4:4:4 Packed 8
MFVideoFormat_I420 I420 4:2:0 Planar 8
MFVideoFormat_IYUV IYUV 4:2:0 Planar 8
MFVideoFormat_NV11 NV11 4:1:1 Planar 8
MFVideoFormat_NV12 NV12 4:2:0 Planar 8
MFVideoFormat_UYVY UYVY 4:2:2 Packed 8
MFVideoFormat_Y41P Y41P 4:1:1 Packed 8
MFVideoFormat_Y41T Y41T 4:1:1 Packed 8
MFVideoFormat_Y42T Y42T 4:2:2 Packed 8
MFVideoFormat_YUY2 YUY2 4:2:2 Packed 8
MFVideoFormat_YVU9 YVU9 8:4:4 Planar 9
MFVideoFormat_YV12 YV12 4:2:0 Planar 8
MFVideoFormat_YVYU YVYU 4:2:2 Packed 8

对推荐格式的详细介绍参考 Recommended 8-Bit YUV Formats for Video Rendering.

注意

I420 和 IYUV 格式在内存中的分布是相同的,但是用了不同的GUID。这是因为 GUID 分别对应 FOURCC codes 'I420' 和 'IYUV';详细信息参考 Video FOURCCs (应该是本文最后)。

YUV Formats: 10-Bit and 16-Bit

GUID Format Sampling Packed or planar Bits per channel
MFVideoFormat_P010 P010 4:2:0 Planar 10
MFVideoFormat_P016 P016 4:2:0 Planar 16
MFVideoFormat_P210 P210 4:2:2 Planar 10
MFVideoFormat_P216 P216 4:2:2 Planar 16
MFVideoFormat_v210 v210 4:2:2 Packed 10
MFVideoFormat_v216 v216 4:2:2 Packed 16
MFVideoFormat_v410 v40 4:4:4 Packed 10
MFVideoFormat_Y210 Y210 4:2:2 Packed 10
MFVideoFormat_Y216 Y216 4:2:2 Packed 16
MFVideoFormat_Y410 Y40 4:4:4 Packed 10
MFVideoFormat_Y416 Y416 4:4:4 Packed 16

关于这些格式的详细信息,参考 10-bit and 16-bit YUV Video Formats(本页已包含)。

Luminance and Depth Formats

GUID Description
MFVideoFormat_L8 8-bit luminance only. (bpp). (Same memory layout as D3DFMT_L8.)
MFVideoFormat_L16 16-bit luminance only. (Same memory layout as D3DFMT_L16.)
MFVideoFormat_D16 16-bit z-buffer depth. (Same memory layout as D3DFMT_D16.)

Encoded Video Types

GUID FOURCC Description
MFVideoFormat_DV25 'dv25' DVCPRO 25 (525-60 or 625-50).
MFVideoFormat_DV50 'dv50' DVCPRO 50 (525-60 or 625-50).
MFVideoFormat_DVC 'dvc ' DVC/DV Video.
MFVideoFormat_DVH1 'dvh1' DVCPRO 100 (1080/60i, 1080/50i, or 720/60P).
MFVideoFormat_DVHD 'dvhd' HD-DVCR (1125-60 or 1250-50).
MFVideoFormat_DVSD 'dvsd' SDL-DVCR (525-60 or 625-50).
MFVideoFormat_DVSL 'dvsl' SD-DVCR (525-60 or 625-50).
MFVideoFormat_H263 'H263' H.263 video.
MFVideoFormat_H264 'H264' H.264 video.
Media samples contain H.264 bitstream data with start codes and has interleaved SPS/PPS. Each sample contains one complete picture, either one field or one frame.
MFVideoFormat_H265 'H265' H.265 video.
MFVideoFormat_H264_ES Not applicable H.264 elementary stream.
This media type is the same as MFVideoFormat_H264, except media samples contain a fragmented H.264 bitstream. Each sample may contain a partial picture; multiple complete pictures; or one or more complete pictures plus a partial picture.
MFVideoFormat_HEVC 'HEVC' The HEVC Main profile and Main Still Picture profile.
Each sample contains one complete picture.
Supported in Windows 8.1 and later. The HEVC Main profile and Main Still Picture profile elementary stream.
MFVideoFormat_HEVC_ES 'HEVS' This media type is the same as MFVideoFormat_HEVC, except media samples contain a fragmented HEVC bitstream. Each sample may contain a partial picture; multiple complete pictures; or one or more complete pictures plus a partial picture.
Supported in Windows 8.1 and later.
MFVideoFormat_M4S2 'M4S2' MPEG-4 part 2 video.
MFVideoFormat_MJPG 'MJPG' Motion JPEG.
MFVideoFormat_MP43 'MP43' Microsoft MPEG 4 codec version 3. This codec is no longer supported.
MFVideoFormat_MP4S 'MP4S' ISO MPEG 4 codec version 1.
MFVideoFormat_MP4V 'MP4V' MPEG-4 part 2 video.
MFVideoFormat_MPEG2 Not applicable MPEG-2 video. (Equivalent to MEDIASUBTYPE_MPEG2_VIDEO in DirectShow.)
MFVideoFormat_VP80 'MPG1' VP8 video.
MFVideoFormat_VP90 'MPG1' VP9 video.
MFVideoFormat_MPG1 'MPG1' MPEG-1 video.
MFVideoFormat_MSS1 'MSS1' Windows Media Screen codec version 1.
MFVideoFormat_MSS2 'MSS2' Windows Media Video 9 Screen codec.
MFVideoFormat_WMV1 'WMV1' Windows Media Video codec version 7.
MFVideoFormat_WMV2 'WMV2' Windows Media Video 8 codec.
MFVideoFormat_WMV3 'WMV3' Windows Media Video 9 codec.
MFVideoFormat_WVC1 'WVC1' SMPTE 421M ("VC-1").
MFVideoFormat_420O '420O' 8-bit per channel planar YUV 4:2:0 video.

Creating Subtype GUIDs from FOURCCs and D3DFORMAT Values

一种视频格式常用 FOURCC 或 D3DFORMAT 表示。有一系列的 GUID 被保留作为 subtype 使用。这些 GUID 的格式统一为 XXXXXXXX-0000-0010-8000-00AA00389B71,开头的 XXXXXXXX 是一个 4 字节的 FOURCC 码或 D3DFORMAT 值。

如果视频格式具有对应的 FOURCC 或 D3DFORMAT 值,则可以创建对应的 subtype GUID:将常量 MFVideoFormat_Base GUID 的第一个 DWORD 替换为 FOURCC 或者 D3DFORMAT 值即可。为此可以使用 DEFINE_MEDIATYPE_GUID 宏。

注意

DirectShow 也将此方法用于大多数视频类型,但不包括未压缩的 RGB 类型。也就是说,DirectShow 中的 RGB 类型并不与 Media Foundation 中的RGB 类型对应。

D3DFORMAT 枚举定义在头文件 d3d9types.h 中。下表列出了常见的 RGB 格式与对应的 D3DFORMAT 值。

RGB format D3DFORMAT value
32-bit RGB D3DFMT_X8R8G8B8
32-bit RGB with alpha channel D3DFMT_A8R8G8B8
24-bit RGB D3DFMT_R8G8B8
RGB 555 (16-bit RGB) D3DFMT_X1R5G5B5
RGB 555 with alpha channel D3DFMT_A4R4G4B4
RGB 565 (16-bit RGB) D3DFMT_R5G6B5
8-bit palettized RGB D3DFMT_P8
A2 R10 G10 B10 (32-bit RGB with alpha channel; 10 bits per RGB channel) D3DFMT_A2R10G10B10
A2 B10 G10 R10 (32-bit RGB with alpha channel; 10 bits per RGB channel) D3DFMT_A2B10G10R10
8-bit luminance only. D3DFMT_L8
16-bit luminance only. D3DFMT_L16
16-bit z-buffer depth D3DFMT_D16

FOURCC 的更多信息,参考后文 Video FOURCCs.

Uncompressed Video Media Types

In this article

  1. Examples
  2. Related topics

本主题介绍如何创建描述未压缩视频格式的 media type。

要创建一个完整的描述未压缩视频格式的 media type,需要对 IMFMediaType 接口设置以下 attributes。

Attribute Description
MF_MT_MAJOR_TYPE Major type. Set to MFMediaType_Video.
MF_MT_SUBTYPE Subtype. See Video Subtype GUIDs.
MF_MT_DEFAULT_STRIDE Surface stride. stride 是指从一行像素开头到下一行像素开头所间隔的字节数。如果此值与视频宽度(以字节为单位)不一致则需要设置,否则可以忽略
MF_MT_FRAME_RATE Frame rate.
MF_MT_FRAME_SIZE Frame size.
MF_MT_INTERLACE_MODE 扫描模式
MF_MT_ALL_SAMPLES_INDEPENDENT 表示每个 sample 是否独立。对于未压缩的格式,设置为 TRUE
MF_MT_PIXEL_ASPECT_RATIO 像素长宽比

另外,如果知道以下值,请设置(否则可以忽略)

Attribute Description
MF_MT_VIDEO_PRIMARIES Color primaries.
MF_MT_TRANSFER_FUNCTION Transfer function.
MF_MT_YUV_MATRIX Transfer matrix.
MF_MT_VIDEO_CHROMA_SITING Chroma siting.
MF_MT_VIDEO_NOMINAL_RANGE Nominal range.

更多详细信息,参阅 Extended Color Information。For example, if you create a media type that describes a video standard, and the standard defines the chroma siting, add this information to the media type. Doing so helps to preserve color fidelity throughout the pipeline.

The following functions might be useful when creating a video media type.

Function Description
MFAverageTimePerFrameToFrameRate Calculates the frame rate, given the average frame duration.
MFCalculateImageSize Calculates the image size for an uncompressed video format.
MFFrameRateToAverageTimePerFrame Calculates the average duration of a video frame, given the frame rate.
MFGetStrideForBitmapInfoHeader Returns the minimum surface stride for a video format. For more information, see Image Stride.
MFInitVideoFormat Initializes an MFVIDEOFORMAT structure for some standard video formats, such as NTSC television. You can then use the structure to initialize a media type.
MFIsFormatYUV Queries whether a video format is a YUV format.

Examples

此示例显示一个函数,该函数填充了未压缩视频格式的常见信息。此函数返回一个 IMFMediaType 指针。你可以根据需要往 media type 上添加其他 attribute。

HRESULT CreateUncompressedVideoType(
    DWORD                fccFormat,  // FOURCC or D3DFORMAT value.     
    UINT32               width, 
    UINT32               height,
    MFVideoInterlaceMode interlaceMode,
    const MFRatio&       frameRate,
    const MFRatio&       par,
    IMFMediaType         **ppType
    )
{
    if (ppType == NULL)
    {
        return E_POINTER;
    }

    GUID    subtype = MFVideoFormat_Base;
    LONG    lStride = 0;
    UINT    cbImage = 0;

    IMFMediaType *pType = NULL;

    // Set the subtype GUID from the FOURCC or D3DFORMAT value.
    subtype.Data1 = fccFormat;

    HRESULT hr = MFCreateMediaType(&pType);
    if (FAILED(hr))
    {
        goto done;
    }

    hr = pType->SetGUID(MF_MT_MAJOR_TYPE, MFMediaType_Video);
    if (FAILED(hr))
    {
        goto done;
    }

    hr = pType->SetGUID(MF_MT_SUBTYPE, subtype);
    if (FAILED(hr))
    {
        goto done;
    }

    hr = pType->SetUINT32(MF_MT_INTERLACE_MODE, interlaceMode);
    if (FAILED(hr))
    {
        goto done;
    }

    hr = MFSetAttributeSize(pType, MF_MT_FRAME_SIZE, width, height);
    if (FAILED(hr))
    {
        goto done;
    }

    // Calculate the default stride value.
    hr = pType->SetUINT32(MF_MT_DEFAULT_STRIDE, UINT32(lStride));
    if (FAILED(hr))
    {
        goto done;
    }

    // Calculate the image size in bytes.
    hr = MFCalculateImageSize(subtype, width, height, &cbImage);
    if (FAILED(hr))
    {
        goto done;
    }

    hr = pType->SetUINT32(MF_MT_SAMPLE_SIZE, cbImage);
    if (FAILED(hr))
    {
        goto done;
    }

    hr = pType->SetUINT32(MF_MT_FIXED_SIZE_SAMPLES, TRUE);
    if (FAILED(hr))
    {
        goto done;
    }

    hr = pType->SetUINT32(MF_MT_ALL_SAMPLES_INDEPENDENT, TRUE);
    if (FAILED(hr))
    {
        goto done;
    }

    // Frame rate
    hr = MFSetAttributeRatio(pType, MF_MT_FRAME_RATE, frameRate.Numerator, 
        frameRate.Denominator);
    if (FAILED(hr))
    {
        goto done;
    }

    // Pixel aspect ratio
    hr = MFSetAttributeRatio(pType, MF_MT_PIXEL_ASPECT_RATIO, par.Numerator, 
        par.Denominator);
    if (FAILED(hr))
    {
        goto done;
    }

    // Return the pointer to the caller.
    *ppType = pType;
    (*ppType)->AddRef();

done:
    SafeRelease(&pType);
    return hr;
}

下面的例子中,输入一个视频编码格式,然后创建一个所对应的未压缩的视频格式 media type。这个 media type 可以用来配置编解码器等等

HRESULT ConvertVideoTypeToUncompressedType(
    IMFMediaType *pType,    // Pointer to an encoded video type.
    const GUID& subtype,    // Uncompressed subtype (eg, RGB-32, AYUV)
    IMFMediaType **ppType   // Receives a matching uncompressed video type.
    )
{
    IMFMediaType *pTypeUncomp = NULL;

    HRESULT hr = S_OK;
    GUID majortype = { 0 };
    MFRatio par = { 0 };

    hr = pType->GetMajorType(&majortype);

    if (majortype != MFMediaType_Video)
    {
        return MF_E_INVALIDMEDIATYPE;
    }

    // Create a new media type and copy over all of the items.
    // This ensures that extended color information is retained.

    if (SUCCEEDED(hr))
    {
        hr = MFCreateMediaType(&pTypeUncomp);
    }

    if (SUCCEEDED(hr))
    {
        hr = pType->CopyAllItems(pTypeUncomp);
    }

    // Set the subtype.
    if (SUCCEEDED(hr))
    {
        hr = pTypeUncomp->SetGUID(MF_MT_SUBTYPE, subtype);
    }

    // Uncompressed means all samples are independent.
    if (SUCCEEDED(hr))
    {
        hr = pTypeUncomp->SetUINT32(MF_MT_ALL_SAMPLES_INDEPENDENT, TRUE);
    }

    // Fix up PAR if not set on the original type.
    if (SUCCEEDED(hr))
    {
        hr = MFGetAttributeRatio(
            pTypeUncomp, 
            MF_MT_PIXEL_ASPECT_RATIO, 
            (UINT32*)&par.Numerator, 
            (UINT32*)&par.Denominator
            );

        // Default to square pixels.
        if (FAILED(hr))
        {
            hr = MFSetAttributeRatio(
                pTypeUncomp, 
                MF_MT_PIXEL_ASPECT_RATIO, 
                1, 1
                );
        }
    }

    if (SUCCEEDED(hr))
    {
        *ppType = pTypeUncomp;
        (*ppType)->AddRef();
    }

    SafeRelease(&pTypeUncomp);
    return hr;
}

About YUV Video

In this article

  1. Benefits of YUV
  2. YUV in Computer Video
  3. For More Information
  4. Related topics

数字视频通常以 YUV 格式编码。本文介绍了 YUV 视频的一般概念以及一些术语,不会深入介绍有关 YUV 视频处理的数学知识。

如果你了解计算机图形学,你可能熟悉 RGB 颜色。RGB 颜色使用三个颜色值表示:red,green,blue。这些值直接对应于可见光谱的某些部分。三个 RGB 值可以形成一个三维数学坐标系,称为 color space(色彩空间)。 三种颜色分别定义了三个轴,如下图所示。任何有效的 RGB 颜色都位于此色彩空间中的某个位置。例如纯紫色是 100% 的蓝色blue,100% 的红色red,加上 0% 的绿色green。

diagram showing rgb color space

尽管 RGB 是表示颜色的常用方法,但也有一些其他的选择。YUV 这个词表示一系列的色彩空间。所有的这些色彩空间都将亮度信息和颜色信息分开编码表示。与 RGB 一样,YUV 也使用三个值来表示任意颜色,这三个值称为 Y',U,和 V。(事实上,术语 "YUV" 的这种用法在技术上是不准确的。在计算机视频中,"YUV" 这个词大多数情况下用来表示了一种特定的、名叫 Y'CbCr 的色彩空间,稍后将进行讨论。但是要知道,YUV 是用来表示  任何与 Y'CbCr 相同原理(亮度和颜色分开表示)的色彩空间  的术语。)

Y' 分量,也称为 luma,代表颜色的亮度值。符号(')用来和一个相近的概念 luminance 区分,luminance 也用 Y 表示。luminance 从线性 RGB 值派生,而 luma 从非线性(伽马校正)的 RGB 值派生。Luminance 更接近测量到的真是亮度,而 luma 更实用是因为技术原因。符号(‘)经常被省略,YUV 色彩空间总是使用 luma,而不是 luminance。

Luma 是通过对红色、绿色和蓝色进行加权计算得到。对于标准清晰度(standard-definition)电视来说,使用以下公式:

Y' = 0.299R + 0.587G + 0.114B

这个公式反映了这样一个事实,即人眼对某些波长的光比其他波长更敏感,这影响了一种颜色的感知亮度。蓝光显示得最暗,绿色显示得最亮,红色就在两者之间。该公式还反映了早期电视中使用的荧光粉的物理特性。考虑到现代电视技术,一个较新的公式用于高清电视:

Y' = 0.2125R + 0.7154G + 0.0721B

标准清晰度电视的 luma 计算方程定义在 ITU-R BT.601 标准中。对于高清电视,相关的的标准为 ITU-R BT.709。

U 和 V 分量,也叫做 chromacolor difference,是通过原始 RGB 颜色中的红色和蓝色减去 Y 得出的:

U = B - Y'

V = R - Y'

当然这些值包含了足够的信息还原成原来的 RGB 值

Benefits of YUV

模拟信号电视使用 YUV 是出于历史原因。模拟彩色电视信号的设计与黑白电视机是兼容的。彩色电视将色度信息(U 和 V)叠加到 luma 信号上形成彩色画面,而黑白电视会忽略色彩信息,只是用 luma 来显示黑白画面。(信号的设计使得色度信息不会明显干扰 luma 信号,所以彩电可以将信号还原回 RGB。

YUV 还有一个对现在影响比较大的优势。人眼对色调变化的敏感性不如亮度的变化。因此,在不牺牲图像感知质量的情况下,图像可以携带比亮度信息更少的色度信息。例如,通常以 luma 水平分辨率(也就是图像宽度)的一半对色度进行采样。换句话说,同一行像素,每两个 luma 值,对应一个 U 值和一个 V 值(就是每两个像素共用一组 U 和 V)。假设用 8bit 对每个值进行编码,则每两个像素(两个 Y',一个 U,一个 V)共需要 4 字节,平均每像素 16bit,即比等效的 24bit RGB 编码要减少 30%

YUV 与 RGB 相比本质上并没有压缩。除非对 chroma(色度)进行向下采样,否则 YUV 像素的大小与 RGB 像素的大小相同。此外,从 RGB 到 YUV 的转换也不会有损。只要没有向下采样,则可以将 YUV 像素转换回 RGB而不丢失信息。乡下采样会使图像变小并丢失一些颜色信息。但是如果执行正确,损失在感知上并不明显。(这段说的好乱。。)

YUV in Computer Video

前面列出的 YUV 公式并不完全是数字视频中使用的转换。数字视频中通常使用一种名叫 Y'CbCr 的 YUV 格式。从本质上讲, Y'CbCr 是将 YUV 分量控制在以下范围:

Component Range
Y' 16–235
Cb/Cr 16–240, with 128 representing zero

Y'CbCr 这些分量 8bit 精度,下面是精确推导,使用 BT.601 标准:

  1. 使用范围是 [0...1] 的 RGB 值。0 是纯黑,1 是纯白。重要的是,这些是非线性(伽马校正过?gamma corrected) RGB 值。

  2. 计算 luma。对于 BT.601, Y' = 0.299R + 0.587G + 0.114B。

  3. 计算中间色度差值(B - Y')和(R - Y')。这些值的范围是,(B - Y')是+/- 0.886,(R - Y')是 +/- 0.701。

  4. 缩放色度差值,如下:

    Pb = (0.5 / (1 - 0.114)) × (B - Y')

    Pr = (0.5 / (1 - 0.299)) × (R - Y')

    这些缩放因子旨在为这两个值提供相同的数值范围,+/- 0.5。他们共同定义了一个名为 Y'PbPr 的 YUV 色彩空间。此色彩空间用于模拟组件视频(analog component video)。

  5. 缩放 Y'PbPr 的值最后可以得到 Y'CbCr:

    Y' = 16 + 219 × Y'

    Cb = 128 + 224 × Pb

    Cr = 128 + 224 × Pr

你可以直接将 RGB 转换为 Y'CbCr 而无需存储中间结果。这里只是列出了步骤以显示 Y'CbCr 如何得到。

下面展示了各种颜色的 RGB 值和 YCbCr 值,同样使用 BT.601 标准。

Color R G B Y' Cb Cr
Black 黑 0 0 0 16 128 128
Red 红 255 0 0 81 90 240
Green 绿 0 255 0 145 54 34
Blue 蓝 0 0 255 41 240 110
Cyan 青? 0 255 255 170 166 16
Magenta 紫? 255 0 255 106 202 222
Yellow 黄 255 255 0 210 16 146
White 白 255 255 255 235 128 128

如图表所示,Cb 和 Cr 好像与直观的颜色概念不太一样。例如纯白和纯黑都包含了 Cb 和 Cr 的中间值128。Cb 的最大值和最小值分别为蓝色和黄色,类似,Cr 的最大值和最小值对应红色和 cyan(青色?)。

For More Information

 

 

 

原创文章 59 获赞 41 访问量 10万+

猜你喜欢

转载自blog.csdn.net/rzdyzx/article/details/88428059