[x265] [PATCH] Use C++ true/false rather than Windows TRUE/FALSE

chen chenm003 at 163.com
Wed Aug 28 14:46:15 CEST 2013


I use TRUE and FALSE is not a bug, because C++ 'bool' have different implement depends on compiler.

在 2013-08-28 12:50:10,funman at videolan.org 写道:
># HG changeset patch
># User "Rafaël Carré <funman at videolan.org>
># Date 1377665234 -7200
># Node ID a5196f00d863c3599c0c4adb4ea3e2b1f3d913b3
># Parent  159d27a7c7d3c490385e6a79a1784e90ddb576be
>Use C++ true/false rather than Windows TRUE/FALSE
>
>Fix build on Linux
>
>diff -r 159d27a7c7d3 -r a5196f00d863 source/encoder/framefilter.cpp
>--- a/source/encoder/framefilter.cpp Wed Aug 28 09:18:24 2013 +0530
>+++ b/source/encoder/framefilter.cpp Wed Aug 28 06:47:14 2013 +0200
>@@ -36,7 +36,7 @@
>     : JobProvider(pool)
>     , m_cfg(NULL)
>     , m_pic(NULL)
>-    , active_lft(FALSE)
>+    , active_lft(false)
>     , m_entropyCoder(NULL)
>     , m_rdGoOnSbacCoder(NULL)
> {}
>@@ -59,7 +59,7 @@
> bool FrameFilter::findJob()
> {
>     // Check the lock
>-    if (ATOMIC_CAS32(&active_lft, FALSE, TRUE) == TRUE)
>+    if (ATOMIC_CAS32(&active_lft, false, true) == true)
>         return false;
> 
>     // NOTE: only one thread can be here
>@@ -68,10 +68,10 @@
>         // NOTE: not need atom operator here because we lock before
>         row_done++;
>         processRow(row_done);
>-        active_lft = FALSE;
>+        active_lft = false;
>         return true;
>     }
>-    active_lft = FALSE;
>+    active_lft = false;
>     return false;
> }
> 
>@@ -102,7 +102,7 @@
>     m_loopFilter.setCfg(pic->getSlice()->getPPS()->getLoopFilterAcrossTilesEnabledFlag());
>     row_ready = -1;
>     row_done = -1;
>-    active_lft = FALSE;
>+    active_lft = false;
>     if (m_cfg->param.bEnableLoopFilter)
>     {
>         m_sao.resetStats();
>_______________________________________________
>x265-devel mailing list
>x265-devel at videolan.org
>https://mailman.videolan.org/listinfo/x265-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.videolan.org/private/x265-devel/attachments/20130828/070dc7c9/attachment-0001.html>


More information about the x265-devel mailing list