closedcaption: zvbi: Remove dead code

* RGB8 is never used
* some inline functions were never used
This commit is contained in:
Edward Hervey 2018-03-20 09:01:25 +01:00 committed by Edward Hervey
parent b0b02e7cb5
commit c3a9835c05

View file

@ -35,7 +35,6 @@
# define VBI_PIXFMT_BGRA24_LE VBI_PIXFMT_BGRA32_LE # define VBI_PIXFMT_BGRA24_LE VBI_PIXFMT_BGRA32_LE
# define VBI_PIXFMT_RGBA24_BE VBI_PIXFMT_RGBA32_BE # define VBI_PIXFMT_RGBA24_BE VBI_PIXFMT_RGBA32_BE
# define VBI_PIXFMT_BGRA24_BE VBI_PIXFMT_BGRA32_BE # define VBI_PIXFMT_BGRA24_BE VBI_PIXFMT_BGRA32_BE
# define VBI_PIXFMT_RGB8 101
# define vbi_pixfmt_bytes_per_pixel VBI_PIXFMT_BPP # define vbi_pixfmt_bytes_per_pixel VBI_PIXFMT_BPP
/** /**
@ -66,31 +65,25 @@
/* Read a sample with pixfmt conversion. pixfmt is const. */ /* Read a sample with pixfmt conversion. pixfmt is const. */
#if G_BYTE_ORDER == G_LITTLE_ENDIAN #if G_BYTE_ORDER == G_LITTLE_ENDIAN
#define GREEN(raw) \ #define GREEN(raw) \
((VBI_PIXFMT_RGB8 == pixfmt) ? \
*(const uint8_t *)(raw) & bs->green_mask : \
((VBI_PIXFMT_RGB16_LE == pixfmt) ? \ ((VBI_PIXFMT_RGB16_LE == pixfmt) ? \
*(const uint16_t *)(raw) & bs->green_mask : \ *(const uint16_t *)(raw) & bs->green_mask : \
((VBI_PIXFMT_RGB16_BE == pixfmt) ? \ ((VBI_PIXFMT_RGB16_BE == pixfmt) ? \
GREEN2 (raw, 1) : \ GREEN2 (raw, 1) : \
(raw)[0]))) (raw)[0]))
#elif G_BYTE_ORDER == G_BIG_ENDIAN #elif G_BYTE_ORDER == G_BIG_ENDIAN
#define GREEN(raw) \ #define GREEN(raw) \
((VBI_PIXFMT_RGB8 == pixfmt) ? \
*(const uint8_t *)(raw) & bs->green_mask : \
((VBI_PIXFMT_RGB16_LE == pixfmt) ? \ ((VBI_PIXFMT_RGB16_LE == pixfmt) ? \
GREEN2 (raw, 0) : \ GREEN2 (raw, 0) : \
((VBI_PIXFMT_RGB16_BE == pixfmt) ? \ ((VBI_PIXFMT_RGB16_BE == pixfmt) ? \
*(const uint16_t *)(raw) & bs->green_mask : \ *(const uint16_t *)(raw) & bs->green_mask : \
(raw)[0]))) (raw)[0]))
#else #else
#define GREEN(raw) \ #define GREEN(raw) \
((VBI_PIXFMT_RGB8 == pixfmt) ? \
*(const uint8_t *)(raw) & bs->green_mask : \
((VBI_PIXFMT_RGB16_LE == pixfmt) ? \ ((VBI_PIXFMT_RGB16_LE == pixfmt) ? \
GREEN2 (raw, 0) : \ GREEN2 (raw, 0) : \
((VBI_PIXFMT_RGB16_BE == pixfmt) ? \ ((VBI_PIXFMT_RGB16_BE == pixfmt) ? \
GREEN2 (raw, 1) : \ GREEN2 (raw, 1) : \
(raw)[0]))) (raw)[0]))
#endif #endif
/* raw0 = raw[index >> 8], linear interpolated. */ /* raw0 = raw[index >> 8], linear interpolated. */
@ -465,10 +458,10 @@ null_function (vbi3_bit_slicer * bs,
uint8_t * buffer, uint8_t * buffer,
vbi3_bit_slicer_point * points, unsigned int *n_points, const uint8_t * raw) vbi3_bit_slicer_point * points, unsigned int *n_points, const uint8_t * raw)
{ {
buffer = buffer; /* unused */ /* buffer = buffer; /\* unused *\/ */
points = points; /* points = points; */
n_points = n_points; /* n_points = n_points; */
raw = raw; /* raw = raw; */
warning (&bs->log, "vbi3_bit_slicer_set_params() not called."); warning (&bs->log, "vbi3_bit_slicer_set_params() not called.");