Changeset 251988 in webkit


Ignore:
Timestamp:
Nov 4, 2019 7:38:37 AM (4 years ago)
Author:
cathiechen
Message:

Build error: redefinition of TransferFunction
https://bugs.webkit.org/show_bug.cgi?id=203742

Reviewed by Jer Noble.

TransferFunction defined in both VideoTextureCopierCV.cpp and TransferFunction.h.
Renamed TransferFunction in VideoTextureCopierCV.cpp to TransferFunctionCV.

  • platform/graphics/cv/VideoTextureCopierCV.cpp:

(WebCore::transferFunctionFromString):
(WebCore::YCbCrToRGBMatrixForRangeAndTransferFunction):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r251985 r251988  
     12019-11-04  Cathie Chen  <cathiechen@igalia.com>
     2
     3        Build error: redefinition of `TransferFunction`
     4        https://bugs.webkit.org/show_bug.cgi?id=203742
     5
     6        Reviewed by Jer Noble.
     7
     8        `TransferFunction` defined in both VideoTextureCopierCV.cpp and TransferFunction.h.
     9        Renamed `TransferFunction` in VideoTextureCopierCV.cpp to `TransferFunctionCV`.
     10
     11        * platform/graphics/cv/VideoTextureCopierCV.cpp:
     12        (WebCore::transferFunctionFromString):
     13        (WebCore::YCbCrToRGBMatrixForRangeAndTransferFunction):
     14
    1152019-11-04  youenn fablet  <youenn@apple.com>
    216
  • trunk/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp

    r248697 r251988  
    5252};
    5353
    54 enum class TransferFunction {
     54enum class TransferFunctionCV {
    5555    Unknown,
    5656    kITU_R_709_2,
     
    8686}
    8787
    88 static TransferFunction transferFunctionFromString(CFStringRef string)
     88static TransferFunctionCV transferFunctionFromString(CFStringRef string)
    8989{
    9090    if (!string || CFGetTypeID(string) != CFStringGetTypeID())
    91         return TransferFunction::Unknown;
     91        return TransferFunctionCV::Unknown;
    9292    if (CFEqual(string, kCVImageBufferYCbCrMatrix_ITU_R_709_2))
    93         return TransferFunction::kITU_R_709_2;
     93        return TransferFunctionCV::kITU_R_709_2;
    9494    if (CFEqual(string, kCVImageBufferYCbCrMatrix_ITU_R_601_4))
    95         return TransferFunction::kITU_R_601_4;
     95        return TransferFunctionCV::kITU_R_601_4;
    9696    if (CFEqual(string, kCVImageBufferYCbCrMatrix_SMPTE_240M_1995))
    97         return TransferFunction::kSMPTE_240M_1995;
     97        return TransferFunctionCV::kSMPTE_240M_1995;
    9898    if (canLoad_CoreVideo_kCVImageBufferYCbCrMatrix_DCI_P3() && CFEqual(string, kCVImageBufferYCbCrMatrix_DCI_P3))
    99         return TransferFunction::kDCI_P3;
     99        return TransferFunctionCV::kDCI_P3;
    100100    if (canLoad_CoreVideo_kCVImageBufferYCbCrMatrix_P3_D65() && CFEqual(string, kCVImageBufferYCbCrMatrix_P3_D65))
    101         return TransferFunction::kP3_D65;
     101        return TransferFunctionCV::kP3_D65;
    102102    if (canLoad_CoreVideo_kCVImageBufferYCbCrMatrix_ITU_R_2020() && CFEqual(string, kCVImageBufferYCbCrMatrix_ITU_R_2020))
    103         return TransferFunction::kITU_R_2020;
    104     return TransferFunction::Unknown;
     103        return TransferFunctionCV::kITU_R_2020;
     104    return TransferFunctionCV::Unknown;
    105105}
    106106
     
    237237}
    238238
    239 static const Vector<GLfloat> YCbCrToRGBMatrixForRangeAndTransferFunction(PixelRange range, TransferFunction transferFunction)
    240 {
    241     using MapKey = std::pair<PixelRange, TransferFunction>;
     239static const Vector<GLfloat> YCbCrToRGBMatrixForRangeAndTransferFunction(PixelRange range, TransferFunctionCV transferFunction)
     240{
     241    using MapKey = std::pair<PixelRange, TransferFunctionCV>;
    242242    using MatrixMap = StdMap<MapKey, Vector<GLfloat>>;
    243243
     
    338338
    339339    dispatch_once(&onceToken, ^{
    340         matrices.get().emplace(MapKey(PixelRange::Video, TransferFunction::kITU_R_601_4), r601VideoMatrix);
    341         matrices.get().emplace(MapKey(PixelRange::Full, TransferFunction::kITU_R_601_4), r601FullMatrix);
    342         matrices.get().emplace(MapKey(PixelRange::Video, TransferFunction::kITU_R_709_2), r709VideoMatrix);
    343         matrices.get().emplace(MapKey(PixelRange::Full, TransferFunction::kITU_R_709_2), r709FullMatrix);
    344         matrices.get().emplace(MapKey(PixelRange::Video, TransferFunction::kITU_R_2020), bt2020VideoMatrix);
    345         matrices.get().emplace(MapKey(PixelRange::Full, TransferFunction::kITU_R_2020), bt2020FullMatrix);
    346         matrices.get().emplace(MapKey(PixelRange::Video, TransferFunction::kSMPTE_240M_1995), smpte240MVideoMatrix);
    347         matrices.get().emplace(MapKey(PixelRange::Full, TransferFunction::kSMPTE_240M_1995), smpte240MFullMatrix);
     340        matrices.get().emplace(MapKey(PixelRange::Video, TransferFunctionCV::kITU_R_601_4), r601VideoMatrix);
     341        matrices.get().emplace(MapKey(PixelRange::Full, TransferFunctionCV::kITU_R_601_4), r601FullMatrix);
     342        matrices.get().emplace(MapKey(PixelRange::Video, TransferFunctionCV::kITU_R_709_2), r709VideoMatrix);
     343        matrices.get().emplace(MapKey(PixelRange::Full, TransferFunctionCV::kITU_R_709_2), r709FullMatrix);
     344        matrices.get().emplace(MapKey(PixelRange::Video, TransferFunctionCV::kITU_R_2020), bt2020VideoMatrix);
     345        matrices.get().emplace(MapKey(PixelRange::Full, TransferFunctionCV::kITU_R_2020), bt2020FullMatrix);
     346        matrices.get().emplace(MapKey(PixelRange::Video, TransferFunctionCV::kSMPTE_240M_1995), smpte240MVideoMatrix);
     347        matrices.get().emplace(MapKey(PixelRange::Full, TransferFunctionCV::kSMPTE_240M_1995), smpte240MFullMatrix);
    348348    });
    349349
     
    357357    // Assume unknown transfer functions are r.601:
    358358    if (iterator == matrices.get().end())
    359         iterator = matrices.get().find({range, TransferFunction::kITU_R_601_4});
     359        iterator = matrices.get().find({range, TransferFunctionCV::kITU_R_601_4});
    360360
    361361    ASSERT(iterator != matrices.get().end());
Note: See TracChangeset for help on using the changeset viewer.