diff options
| author | 2008-07-17 08:09:52 +0000 | |
|---|---|---|
| committer | 2008-07-17 08:09:52 +0000 | |
| commit | 5244807bf307a2cd81a8f2f5e4f5feaa9d452280 (patch) | |
| tree | 87c7dd64a5ca6d40bef8697b990c7fcf3d757334 /src/lib | |
| parent | b5f2aa1240d8f727bb2d376c08cb85ae4cd7d48a (diff) | |
Cleanups.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/util/astring.c | 4 | ||||
| -rw-r--r-- | src/lib/util/aviio.c | 2 | ||||
| -rw-r--r-- | src/lib/util/vbiparse.c | 28 |
3 files changed, 17 insertions, 17 deletions
diff --git a/src/lib/util/astring.c b/src/lib/util/astring.c index 5a86d611f89..df05efaafbe 100644 --- a/src/lib/util/astring.c +++ b/src/lib/util/astring.c @@ -354,7 +354,7 @@ int astring_vprintf(astring *dst, const char *format, va_list args) /*------------------------------------------------- - astring_catprintf - formatted printf to + astring_catprintf - formatted printf to the end of an astring -------------------------------------------------*/ @@ -376,7 +376,7 @@ int astring_catprintf(astring *dst, const char *format, ...) /*------------------------------------------------- - astring_catprintf - formatted vprintf to + astring_catprintf - formatted vprintf to the end of an astring -------------------------------------------------*/ diff --git a/src/lib/util/aviio.c b/src/lib/util/aviio.c index 557edddcc9a..8598f868ba4 100644 --- a/src/lib/util/aviio.c +++ b/src/lib/util/aviio.c @@ -2669,7 +2669,7 @@ static avi_error huffyuv_decompress_to_yuy16(avi_stream *stream, const UINT8 *da { UINT16 *prevrow = BITMAP_ADDR16(bitmap, y - prevlines, 0); UINT16 *dest = BITMAP_ADDR16(bitmap, y, 0); - + /* handle the first four bytes independently */ x = 0; if (y == 0) diff --git a/src/lib/util/vbiparse.c b/src/lib/util/vbiparse.c index 4dca2ccb5a7..b11941cb71f 100644 --- a/src/lib/util/vbiparse.c +++ b/src/lib/util/vbiparse.c @@ -26,7 +26,7 @@ ***************************************************************************/ /*------------------------------------------------- - vbi_parse_manchester_code - parse a Manchester + vbi_parse_manchester_code - parse a Manchester code from a line of video data -------------------------------------------------*/ @@ -37,7 +37,7 @@ int vbi_parse_manchester_code(const UINT16 *source, int sourcewidth, int sources double clock, bestclock; int x, firstedge; int besterr; - + /* fail if the width is too large */ if (sourcewidth > MAX_SOURCE_WIDTH) return 0; @@ -55,12 +55,12 @@ int vbi_parse_manchester_code(const UINT16 *source, int sourcewidth, int sources /* bail if the line is all black or all white */ if (max < 0x80 || min > 0x80) return 0; - + /* determine the midpoint and then set the thresholds to be halfway */ mid = (min + max) / 2; min = mid - (mid - min) / 2; max = mid + (max - mid) / 2; - + /* convert the source into absolute high/low */ srcabsval = (source[0] > mid); for (x = 0; x < sourcewidth; x++) @@ -72,7 +72,7 @@ int vbi_parse_manchester_code(const UINT16 *source, int sourcewidth, int sources srcabsval = 0; srcabs[x] = srcabsval; } - + /* find the first transition; this is assumed to be the middle of the first bit */ for (x = 0; x < sourcewidth - 1; x++) if (srcabs[x] != srcabs[x + 1]) @@ -80,7 +80,7 @@ int vbi_parse_manchester_code(const UINT16 *source, int sourcewidth, int sources if (x == sourcewidth - 1) return 0; firstedge = x; - + /* now scan to find a clock that has a nearby transition on each beat */ bestclock = 0; besterr = 1000; @@ -92,11 +92,11 @@ int vbi_parse_manchester_code(const UINT16 *source, int sourcewidth, int sources for (x = 1; x < expectedbits; x++) { int curbit = firstedge + (double)x * clock; - + /* exact match? */ if (srcabs[curbit + 0] != srcabs[curbit + 1]) continue; - + /* off-by-one? */ if (srcabs[curbit + 1 + 0] != srcabs[curbit + 1 + 1] || srcabs[curbit - 1 + 0] != srcabs[curbit - 1 + 1]) { @@ -104,11 +104,11 @@ int vbi_parse_manchester_code(const UINT16 *source, int sourcewidth, int sources if (++error < besterr) continue; } - + /* anything else fails immediately */ break; } - + /* if we got to the end, this is the best candidate so far */ if (x == expectedbits) { @@ -116,19 +116,19 @@ int vbi_parse_manchester_code(const UINT16 *source, int sourcewidth, int sources bestclock = clock; } } - + /* if nobody matched, fail */ if (bestclock == 0) return 0; - /* now extract the bits */ + /* now extract the bits */ for (x = 0; x < expectedbits; x++) { int leftbit = firstedge + ((double)x - 0.25) * bestclock; int rightbit = firstedge + ((double)x + 0.25) * bestclock; int left = srcabs[leftbit]; int right = srcabs[rightbit]; - + /* all bits should be marked by transitions; fail if we don't get one */ if (left == right) return 0; @@ -139,7 +139,7 @@ int vbi_parse_manchester_code(const UINT16 *source, int sourcewidth, int sources /*------------------------------------------------- - vbi_parse_white_flag - compute the "white + vbi_parse_white_flag - compute the "white flag" from a line of video data -------------------------------------------------*/ |
