[x265] [PATCH] dhdr10: fix warnings in windows
Pradeep Ramachandran
pradeep at multicorewareinc.com
Tue May 9 09:14:25 CEST 2017
On Fri, May 5, 2017 at 5:33 PM, <bhavna at multicorewareinc.com> wrote:
> # HG changeset patch
> # User Bhavna Hariharan <bhavna at multicorewareinc.com>
> # Date 1493966622 -19800
> # Fri May 05 12:13:42 2017 +0530
> # Node ID e9f8ba5e98165e2c91e5f602423c3c4981ad0fa0
> # Parent 5d5f40bf6268a0996d34bd3fbe3fe80cb7cf2899
> dhdr10: fix warnings in windows
>
Pushed to stable branch
>
> diff -r 5d5f40bf6268 -r e9f8ba5e9816 source/dynamicHDR10/
> BasicStructures.cpp
> --- a/source/dynamicHDR10/BasicStructures.cpp Wed May 03 12:05:12 2017
> +0530
> +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
> @@ -1,40 +0,0 @@
> -/**
> - * @file BasicStructures.cpp
> - * @brief Defines the structure of metadata
> parameters
> - * @author Daniel Maximiliano Valenzuela, Seongnam Oh.
> - * @create date 03/01/2017
> - * @version 0.0.1
> - *
> - * Copyright @ 2017 Samsung Electronics, DMS Lab, Samsung Research
> America and Samsung Research Tijuana
> - *
> - * This program is free software; you can redistribute it and/or
> - * modify it under the terms of the GNU General Public License
> - * as published by the Free Software Foundation; either version 2
> - * of the License, or (at your option) any later version.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> - * GNU General Public License for more details.
> - *
> - * You should have received a copy of the GNU General Public License
> - * along with this program; if not, write to the Free Software
> - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
> - * MA 02110-1301, USA.
> -**/
> -
> -#include "BasicStructures.h"
> -#include "vector"
> -
> -struct PercentileLuminance{
> -
> - float averageLuminance = 0.0;
> - float maxRLuminance = 0.0;
> - float maxGLuminance = 0.0;
> - float maxBLuminance = 0.0;
> - int order;
> - std::vector<unsigned int> percentiles;
> -};
> -
> -
> -
> diff -r 5d5f40bf6268 -r e9f8ba5e9816 source/dynamicHDR10/BasicStructures.h
> --- a/source/dynamicHDR10/BasicStructures.h Wed May 03 12:05:12 2017
> +0530
> +++ b/source/dynamicHDR10/BasicStructures.h Fri May 05 12:13:42 2017
> +0530
> @@ -47,4 +47,14 @@
> std::vector<int> coeff;
> };
>
> +struct PercentileLuminance{
> +
> + float averageLuminance = 0.0;
> + float maxRLuminance = 0.0;
> + float maxGLuminance = 0.0;
> + float maxBLuminance = 0.0;
> + int order;
> + std::vector<unsigned int> percentiles;
> +};
> +
> #endif // BASICSTRUCTURES_H
> diff -r 5d5f40bf6268 -r e9f8ba5e9816 source/dynamicHDR10/CMakeLists.txt
> --- a/source/dynamicHDR10/CMakeLists.txt Wed May 03 12:05:12 2017
> +0530
> +++ b/source/dynamicHDR10/CMakeLists.txt Fri May 05 12:13:42 2017
> +0530
> @@ -2,7 +2,7 @@
> if(ENABLE_DYNAMIC_HDR10)
>
> add_library(dynamicHDR10 OBJECT
> - BasicStructures.cpp BasicStructures.h
> + BasicStructures.h
> json11/json11.cpp json11/json11.h
> JsonHelper.cpp JsonHelper.h
> metadataFromJson.cpp metadataFromJson.h
> @@ -153,7 +153,7 @@
> if(ENABLE_SHARED)
> add_library(dynamicHDR10 SHARED
> json11/json11.cpp json11/json11.h
> - BasicStructures.cpp BasicStructures.h
> + BasicStructures.h
> JsonHelper.cpp JsonHelper.h
> metadataFromJson.cpp metadataFromJson.h
> SeiMetadataDictionary.cpp SeiMetadataDictionary.h
> @@ -161,7 +161,7 @@
> else()
> add_library(dynamicHDR10 STATIC
> json11/json11.cpp json11/json11.h
> - BasicStructures.cpp BasicStructures.h
> + BasicStructures.h
> JsonHelper.cpp JsonHelper.h
> metadataFromJson.cpp metadataFromJson.h
> SeiMetadataDictionary.cpp SeiMetadataDictionary.h
> diff -r 5d5f40bf6268 -r e9f8ba5e9816 source/dynamicHDR10/json11/json11.cpp
> --- a/source/dynamicHDR10/json11/json11.cpp Wed May 03 12:05:12 2017
> +0530
> +++ b/source/dynamicHDR10/json11/json11.cpp Fri May 05 12:13:42 2017
> +0530
> @@ -26,6 +26,12 @@
> #include <cstdio>
> #include <limits>
>
> +#if _MSC_VER
> +#pragma warning(disable: 4510) //const member cannot be default
> initialized
> +#pragma warning(disable: 4512) //assignment operator could not be
> generated
> +#pragma warning(disable: 4610) //const member cannot be default
> initialized
> +#endif
> +
> namespace json11 {
>
> static const int max_depth = 200;
> @@ -435,7 +441,7 @@
> char get_next_token() {
> consume_garbage();
> if (i == str.size())
> - return fail("unexpected end of input", 0);
> + return fail("unexpected end of input", '0');
>
> return str[i++];
> }
> @@ -472,7 +478,7 @@
> string parse_string() {
> string out;
> long last_escaped_codepoint = -1;
> - while (true) {
> + for (;;) {
> if (i == str.size())
> return fail("unexpected end of input in string", "");
>
> @@ -665,7 +671,7 @@
> if (ch == '}')
> return data;
>
> - while (1) {
> + for (;;) {
> if (ch != '"')
> return fail("expected '\"' in object, got " +
> esc(ch));
>
> @@ -698,7 +704,7 @@
> if (ch == ']')
> return data;
>
> - while (1) {
> + for (;;) {
> i--;
> data.push_back(parse_json(depth + 1));
> if (failed)
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20170509/06230d1d/attachment.html>
More information about the x265-devel
mailing list