[x265] [PATCH] Fix HDR10+ LLC JSON support

indumathi at multicorewareinc.com indumathi at multicorewareinc.com
Thu Jul 12 16:18:38 CEST 2018


# HG changeset patch
# User indumathi at multicorewareinc.com
# Date 1529069445 -19800
#      Fri Jun 15 19:00:45 2018 +0530
# Node ID 18eaffdd36384d04c907bdd9c3fd9962d95af66d
# Parent  7763d20f092a208904b3ae3ec1762441d1573696
Fix HDR10+ LLC JSON support

diff -r 7763d20f092a -r 18eaffdd3638 source/dynamicHDR10/metadataFromJson.cpp
--- a/source/dynamicHDR10/metadataFromJson.cpp	Thu Jul 12 12:14:00 2018 +0530
+++ b/source/dynamicHDR10/metadataFromJson.cpp	Fri Jun 15 19:00:45 2018 +0530
@@ -88,7 +88,7 @@
             if(!percentileData.empty())
             {
                 JsonArray distributionValues = percentileData[PercentileNames::DistributionValues].array_items();
-                obj.order = distributionValues.size();
+                obj.order = static_cast<int>(distributionValues.size());
                 obj.percentiles.resize(obj.order);
                 for(int i = 0; i < obj.order; ++i)
                 {
@@ -127,7 +127,7 @@
             if(!percentileData.empty())
             {
                 JsonArray percentageValues = percentileData[PercentileNames::DistributionIndex].array_items();
-                int order = percentageValues.size();
+                int order = static_cast<int>(percentageValues.size());
                 percentages.resize(order);
                 for(int i = 0; i < order; ++i)
                 {
@@ -165,7 +165,7 @@
             obj.sPx = jsonData[BezierCurveNames::KneePointX].int_value();
             obj.sPy = jsonData[BezierCurveNames::KneePointY].int_value();
             JsonArray anchorValues = data[BezierCurveNames::AnchorsTag].array_items();
-            obj.order = anchorValues.size();
+            obj.order = static_cast<int>(anchorValues.size());
             obj.coeff.resize(obj.order);
             for(int i = 0; i < obj.order; ++i)
             {
@@ -489,7 +489,7 @@
         Json lumObj = fileData[frame][LuminanceNames::TagName];
         LuminanceParameters luminanceData;
         if(!((isLLCJson && mPimpl->luminanceParamFromLLCJson(lumObj, luminanceData)) ||
-            !(isLLCJson && mPimpl->luminanceParamFromJson(lumObj, luminanceData))))
+            !(mPimpl->luminanceParamFromJson(lumObj, luminanceData) && isLLCJson)))
         {
             std::cout << "error parsing luminance parameters frame: " << w << std::endl;
         }
@@ -559,7 +559,7 @@
         if (w == 0)
         {
             if(!((isLLCJson && mPimpl->bezierCurveFromLLCJson(fileData[frame][BezierCurveNames::TagName], curveData)) ||
-                !(isLLCJson && mPimpl->bezierCurveFromJson(fileData[frame][BezierCurveNames::TagName], curveData))))
+                !(mPimpl->bezierCurveFromJson(fileData[frame][BezierCurveNames::TagName], curveData) && isLLCJson)))
             {
                 toneMappingFlag = 0;
             }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x265.patch
Type: text/x-patch
Size: 2805 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20180712/44311399/attachment.bin>


More information about the x265-devel mailing list