Re: [x265] [PATCH] Dolby Vision: Fix MinGW build warnings and nits

2018-12-13 Thread Pradeep Ramachandran
On Thu, Dec 13, 2018 at 12:04 PM Aruna Matheswaran <
ar...@multicorewareinc.com> wrote:

> # HG changeset patch
> # User Aruna Matheswaran 
> # Date 1544678715 -19800
> #  Thu Dec 13 10:55:15 2018 +0530
> # Node ID 81373aab81dfe2e31a5ef353b1073d8bf1e22502
> # Parent  3023bd8b05c0a0dc4f60b4a1afc6619c5cc3d5a0
> Dolby Vision: Fix MinGW build warnings and nits
>

Pushed to default branch.


>
> diff -r 3023bd8b05c0 -r 81373aab81df doc/reST/cli.rst
> --- a/doc/reST/cli.rst Wed Oct 17 11:08:38 2018 +0530
> +++ b/doc/reST/cli.rst Thu Dec 13 10:55:15 2018 +0530
> @@ -2216,7 +2216,7 @@
>
>  Currently only profile 5 enabled, Default 0 (disabled)
>
> -.. option:: --dolby-vision-rpu
> +.. option:: --dolby-vision-rpu 
>
>  File containing Dolby Vision RPU metadata. If given, x265's Dolby
> Vision
>  metadata parser will fill the RPU field of input pictures with the
> metadata
> diff -r 3023bd8b05c0 -r 81373aab81df source/x265.cpp
> --- a/source/x265.cpp Wed Oct 17 11:08:38 2018 +0530
> +++ b/source/x265.cpp Thu Dec 13 10:55:15 2018 +0530
> @@ -572,15 +572,15 @@
>   * and fill the rpu field of the input picture */
>  static int rpuParser(x265_picture * pic, FILE * ptr)
>  {
> -uint8_t byte;
> +uint8_t byteVal;
>  uint32_t code = 0;
>  int bytesRead = 0;
>  pic->rpu.payloadSize = 0;
>
>  if (!pic->pts)
>  {
> -while (bytesRead++ < 4 && fread(&byte, sizeof(uint8_t), 1, ptr))
> -code = (code << 8) | byte;
> +while (bytesRead++ < 4 && fread(&byteVal, sizeof(uint8_t), 1,
> ptr))
> +code = (code << 8) | byteVal;
>
>  if (code != START_CODE)
>  {
> @@ -590,9 +590,9 @@
>  }
>
>  bytesRead = 0;
> -while (fread(&byte, sizeof(uint8_t), 1, ptr))
> +while (fread(&byteVal, sizeof(uint8_t), 1, ptr))
>  {
> -code = (code << 8) | byte;
> +code = (code << 8) | byteVal;
>  if (bytesRead++ < 3)
>  continue;
>  if (bytesRead >= 1024)
>
> ___
> x265-devel mailing list
> x265-devel@videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
___
x265-devel mailing list
x265-devel@videolan.org
https://mailman.videolan.org/listinfo/x265-devel


Re: [x265] MinGW, GCC: Shadow declaration of type 'byte' in rpuParser, x265 CLI

2018-12-13 Thread Mario Rohkrämer
May be fixed already by the not yet approved patch by Aruna, sorry... to  
be checked when it's available.


--

Fun and success!
Mario *LigH* Rohkrämer
mailto:cont...@ligh.de
___
x265-devel mailing list
x265-devel@videolan.org
https://mailman.videolan.org/listinfo/x265-devel


[x265] MinGW, GCC: Shadow declaration of type 'byte' in rpuParser, x265 CLI

2018-12-13 Thread Mario *LigH* Rohkrämer

[ 97%] Building CXX object CMakeFiles/cli.dir/x265.cpp.obj
H:/development/media-autobuild_suite-master/build/x265-hg/source/x265.cpp: 
In function 'int rpuParser(x265_picture*, FILE*)':
H:/development/media-autobuild_suite-master/build/x265-hg/source/x265.cpp:575:13: 
warning: declaration of 'byte' shadows a global declaration [-Wshadow]

 uint8_t byte;
 ^~~~
In file included from 
H:/development/media-autobuild_suite-master/msys64/mingw32/i686-w64-mingw32/include/wtypes.h:8:0,
 from 
H:/development/media-autobuild_suite-master/msys64/mingw32/i686-w64-mingw32/include/winscard.h:10,
 from 
H:/development/media-autobuild_suite-master/msys64/mingw32/i686-w64-mingw32/include/windows.h:97,
 from 
H:/development/media-autobuild_suite-master/build/x265-hg/source/common/threading.h:32,
 from 
H:/development/media-autobuild_suite-master/build/x265-hg/source/output/reconplay.h:29,
 from 
H:/development/media-autobuild_suite-master/build/x265-hg/source/x265.cpp:33:
H:/development/media-autobuild_suite-master/msys64/mingw32/i686-w64-mingw32/include/rpcndr.h:63:25: 
note: shadowed declaration is here

   typedef unsigned char byte;
 ^~~~

--

Fun and success!

Mario *LigH* Rohkrämer
maito:cont...@ligh.de
___
x265-devel mailing list
x265-devel@videolan.org
https://mailman.videolan.org/listinfo/x265-devel