[FFmpeg-devel] [PATCH] colorspace.h: Remove unused macro argument.
Akshat Singh
akshatsingh99 at gmail.com
Tue Apr 19 22:03:01 CEST 2016
How do I apply this patch?
On Wed, 20 Apr 2016 at 01:24 Reimar Döffinger <Reimar.Doeffinger at gmx.de>
wrote:
> ---
> libavcodec/dvbsub.c | 4 ++--
> libavfilter/drawutils.c | 8 ++++----
> libavfilter/vf_drawbox.c | 4 ++--
> libavutil/colorspace.h | 8 ++++----
> 4 files changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/libavcodec/dvbsub.c b/libavcodec/dvbsub.c
> index 3cdbade..d2faef0 100644
> --- a/libavcodec/dvbsub.c
> +++ b/libavcodec/dvbsub.c
> @@ -322,8 +322,8 @@ static int encode_dvb_subtitles(DVBSubtitleContext *s,
> b = (x >> 0) & 0xff;
>
> *q++ = RGB_TO_Y_CCIR(r, g, b);
> - *q++ = RGB_TO_V_CCIR(r, g, b, 0);
> - *q++ = RGB_TO_U_CCIR(r, g, b, 0);
> + *q++ = RGB_TO_V_CCIR(r, g, b);
> + *q++ = RGB_TO_U_CCIR(r, g, b);
> *q++ = 255 - a;
> }
> }
> diff --git a/libavfilter/drawutils.c b/libavfilter/drawutils.c
> index d37c83e..f415208 100644
> --- a/libavfilter/drawutils.c
> +++ b/libavfilter/drawutils.c
> @@ -106,8 +106,8 @@ int ff_fill_line_with_color(uint8_t *line[4], int
> pixel_step[4], int w, uint8_t
> int plane;
>
> dst_color[0] = RGB_TO_Y_CCIR(rgba_color[0], rgba_color[1],
> rgba_color[2]);
> - dst_color[1] = RGB_TO_U_CCIR(rgba_color[0], rgba_color[1],
> rgba_color[2], 0);
> - dst_color[2] = RGB_TO_V_CCIR(rgba_color[0], rgba_color[1],
> rgba_color[2], 0);
> + dst_color[1] = RGB_TO_U_CCIR(rgba_color[0], rgba_color[1],
> rgba_color[2]);
> + dst_color[2] = RGB_TO_V_CCIR(rgba_color[0], rgba_color[1],
> rgba_color[2]);
> dst_color[3] = rgba_color[3];
>
> for (plane = 0; plane < 4; plane++) {
> @@ -246,8 +246,8 @@ void ff_draw_color(FFDrawContext *draw, FFDrawColor
> *color, const uint8_t rgba[4
> } else if (draw->nb_planes == 3 || draw->nb_planes == 4) {
> /* assume YUV */
> color->comp[0].u8[0] = RGB_TO_Y_CCIR(rgba[0], rgba[1], rgba[2]);
> - color->comp[1].u8[0] = RGB_TO_U_CCIR(rgba[0], rgba[1], rgba[2],
> 0);
> - color->comp[2].u8[0] = RGB_TO_V_CCIR(rgba[0], rgba[1], rgba[2],
> 0);
> + color->comp[1].u8[0] = RGB_TO_U_CCIR(rgba[0], rgba[1], rgba[2]);
> + color->comp[2].u8[0] = RGB_TO_V_CCIR(rgba[0], rgba[1], rgba[2]);
> color->comp[3].u8[0] = rgba[3];
> if (draw->desc->comp[0].depth > 8)
> color->comp[0].u16[0] = color->comp[0].u8[0] <<
> (draw->desc->comp[0].depth - 8);
> diff --git a/libavfilter/vf_drawbox.c b/libavfilter/vf_drawbox.c
> index 88bb9ae..8e67de8 100644
> --- a/libavfilter/vf_drawbox.c
> +++ b/libavfilter/vf_drawbox.c
> @@ -96,8 +96,8 @@ static av_cold int init(AVFilterContext *ctx)
>
> if (!s->invert_color) {
> s->yuv_color[Y] = RGB_TO_Y_CCIR(rgba_color[0], rgba_color[1],
> rgba_color[2]);
> - s->yuv_color[U] = RGB_TO_U_CCIR(rgba_color[0], rgba_color[1],
> rgba_color[2], 0);
> - s->yuv_color[V] = RGB_TO_V_CCIR(rgba_color[0], rgba_color[1],
> rgba_color[2], 0);
> + s->yuv_color[U] = RGB_TO_U_CCIR(rgba_color[0], rgba_color[1],
> rgba_color[2]);
> + s->yuv_color[V] = RGB_TO_V_CCIR(rgba_color[0], rgba_color[1],
> rgba_color[2]);
> s->yuv_color[A] = rgba_color[3];
> }
>
> diff --git a/libavutil/colorspace.h b/libavutil/colorspace.h
> index 826ffd5..0bce00b 100644
> --- a/libavutil/colorspace.h
> +++ b/libavutil/colorspace.h
> @@ -88,12 +88,12 @@ static inline int C_JPEG_TO_CCIR(int y) {
> ((FIX(0.29900*219.0/255.0) * (r) + FIX(0.58700*219.0/255.0) * (g) + \
> FIX(0.11400*219.0/255.0) * (b) + (ONE_HALF + (16 << SCALEBITS))) >>
> SCALEBITS)
>
> -#define RGB_TO_U_CCIR(r1, g1, b1, shift)\
> +#define RGB_TO_U_CCIR(r1, g1, b1)\
> (((- FIX(0.16874*224.0/255.0) * r1 - FIX(0.33126*224.0/255.0) * g1 +
> \
> - FIX(0.50000*224.0/255.0) * b1 + (ONE_HALF << shift) - 1) >>
> (SCALEBITS + shift)) + 128)
> + FIX(0.50000*224.0/255.0) * b1 + ONE_HALF - 1) >> SCALEBITS) + 128)
>
> -#define RGB_TO_V_CCIR(r1, g1, b1, shift)\
> +#define RGB_TO_V_CCIR(r1, g1, b1)\
> (((FIX(0.50000*224.0/255.0) * r1 - FIX(0.41869*224.0/255.0) * g1 -
> \
> - FIX(0.08131*224.0/255.0) * b1 + (ONE_HALF << shift) - 1) >> (SCALEBITS
> + shift)) + 128)
> + FIX(0.08131*224.0/255.0) * b1 + ONE_HALF - 1) >> SCALEBITS) + 128)
>
> #endif /* AVUTIL_COLORSPACE_H */
> --
> 2.7.0
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
More information about the ffmpeg-devel
mailing list