[x265] [PATCH] lookahead: change const bool to const int, so can be used safely in loop counter
Jean-Baptiste Kempf
jb at videolan.org
Tue Sep 17 14:01:28 CEST 2013
On 17 Sep, deepthi at multicorewareinc.com wrote :
> # HG changeset patch
> # User Deepthi Nandakumar <deepthi at multicorewareinc.com>
> # Date 1379415109 -19800
> # Node ID defa0cb72646c483e7708e3f40a608e4be250818
> # Parent 0d33ff236f68bc2238138a7213301b2efc0e6426
> lookahead: change const bool to const int, so can be used safely in loop counter.
>
> diff -r 0d33ff236f68 -r defa0cb72646 source/encoder/slicetype.cpp
> --- a/source/encoder/slicetype.cpp Mon Sep 16 21:06:49 2013 +0800
> +++ b/source/encoder/slicetype.cpp Tue Sep 17 16:21:49 2013 +0530
> @@ -334,7 +334,7 @@
> Lowres *fref1 = frames[p1];
> Lowres *fenc = frames[b];
>
> - const bool bBidir = (b < p1);
> + const int bBidir = (b < p1) ? 1 : 0;
> const int cuXY = cux + cuy * widthInCU;
> const int cuSize = X265_LOWRES_CU_SIZE;
> const int pelOffset = cuSize * cux + cuSize * cuy * fenc->lumaStride;
> @@ -460,7 +460,7 @@
> if (bFrameScoreCU) fenc->costEst[0][0] += icost;
> }
>
> - if (!bBidir)
> + if (bBidir == 0)
This is a very weird patch.
--
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
More information about the x265-devel
mailing list