summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util/vbiparse.cpp
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-10-22 16:37:12 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2016-10-22 16:37:12 +0200
commita6bdefec8c76e9878b634119c56438a7673b0385 (patch)
tree9b435836a12773fe5b84cf1fd04866ecd9ecc2da /src/lib/util/vbiparse.cpp
parent5f3d4fb33da4304e417a0e142e82e3d292646465 (diff)
more TRUE/FALSE cleanup (nw)
Diffstat (limited to 'src/lib/util/vbiparse.cpp')
-rw-r--r--src/lib/util/vbiparse.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/util/vbiparse.cpp b/src/lib/util/vbiparse.cpp
index 42249ab6794..bfd145dd99f 100644
--- a/src/lib/util/vbiparse.cpp
+++ b/src/lib/util/vbiparse.cpp
@@ -174,7 +174,7 @@ int vbi_parse_manchester_code(const uint16_t *source, int sourcewidth, int sourc
flag" from a line of video data
-------------------------------------------------*/
-int vbi_parse_white_flag(const uint16_t *source, int sourcewidth, int sourceshift)
+bool vbi_parse_white_flag(const uint16_t *source, int sourcewidth, int sourceshift)
{
int histo[256] = { 0 };
int minval = 0xff;
@@ -216,7 +216,7 @@ int vbi_parse_white_flag(const uint16_t *source, int sourcewidth, int sourceshif
{
if (PRINTF_WHITE_FLAG)
printf("White flag NOT detected; threshold too low\n");
- return FALSE;
+ return false;
}
/*
@@ -240,7 +240,7 @@ int vbi_parse_white_flag(const uint16_t *source, int sourcewidth, int sourceshif
if (histo[x] > histo[peakval])
peakval = x;
- /* return TRUE if it is above the 90% mark */
+ /* return true if it is above the 90% mark */
result = (peakval > minval + 9 * (maxval - minval) / 10);
if (PRINTF_WHITE_FLAG)
printf("White flag %s: peak=%02X thresh=%02X\n", result ? "detected" : "NOT detected", peakval, minval + 9 * (maxval - minval) / 10);