From c3a9835c054a8f4f702869e6674272b277c6a4d0 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Tue, 20 Mar 2018 09:01:25 +0100 Subject: [PATCH] closedcaption: zvbi: Remove dead code * RGB8 is never used * some inline functions were never used --- ext/closedcaption/bit_slicer.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/ext/closedcaption/bit_slicer.c b/ext/closedcaption/bit_slicer.c index 3bb870241b..98d6ad7c50 100644 --- a/ext/closedcaption/bit_slicer.c +++ b/ext/closedcaption/bit_slicer.c @@ -35,7 +35,6 @@ # define VBI_PIXFMT_BGRA24_LE VBI_PIXFMT_BGRA32_LE # define VBI_PIXFMT_RGBA24_BE VBI_PIXFMT_RGBA32_BE # define VBI_PIXFMT_BGRA24_BE VBI_PIXFMT_BGRA32_BE -# define VBI_PIXFMT_RGB8 101 # define vbi_pixfmt_bytes_per_pixel VBI_PIXFMT_BPP /** @@ -66,31 +65,25 @@ /* Read a sample with pixfmt conversion. pixfmt is const. */ #if G_BYTE_ORDER == G_LITTLE_ENDIAN #define GREEN(raw) \ - ((VBI_PIXFMT_RGB8 == pixfmt) ? \ - *(const uint8_t *)(raw) & bs->green_mask : \ ((VBI_PIXFMT_RGB16_LE == pixfmt) ? \ *(const uint16_t *)(raw) & bs->green_mask : \ ((VBI_PIXFMT_RGB16_BE == pixfmt) ? \ GREEN2 (raw, 1) : \ - (raw)[0]))) + (raw)[0])) #elif G_BYTE_ORDER == G_BIG_ENDIAN #define GREEN(raw) \ - ((VBI_PIXFMT_RGB8 == pixfmt) ? \ - *(const uint8_t *)(raw) & bs->green_mask : \ ((VBI_PIXFMT_RGB16_LE == pixfmt) ? \ GREEN2 (raw, 0) : \ ((VBI_PIXFMT_RGB16_BE == pixfmt) ? \ *(const uint16_t *)(raw) & bs->green_mask : \ - (raw)[0]))) + (raw)[0])) #else #define GREEN(raw) \ - ((VBI_PIXFMT_RGB8 == pixfmt) ? \ - *(const uint8_t *)(raw) & bs->green_mask : \ ((VBI_PIXFMT_RGB16_LE == pixfmt) ? \ GREEN2 (raw, 0) : \ ((VBI_PIXFMT_RGB16_BE == pixfmt) ? \ GREEN2 (raw, 1) : \ - (raw)[0]))) + (raw)[0])) #endif /* raw0 = raw[index >> 8], linear interpolated. */ @@ -465,10 +458,10 @@ null_function (vbi3_bit_slicer * bs, uint8_t * buffer, vbi3_bit_slicer_point * points, unsigned int *n_points, const uint8_t * raw) { - buffer = buffer; /* unused */ - points = points; - n_points = n_points; - raw = raw; + /* buffer = buffer; /\* unused *\/ */ + /* points = points; */ + /* n_points = n_points; */ + /* raw = raw; */ warning (&bs->log, "vbi3_bit_slicer_set_params() not called.");