You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	avfilter/blend_modes: Always preserve constness
These casts cast const away temporarily; they are safe, because the pointers that are initialized point to const data. But this is nevertheless not nice and leads to warnings when using -Wcast-qual. blend_modes.c generates 546 (2*39*7) such warnings which is the majority of such warnings for FFmpeg as a whole. vf_blend.c and vf_blend_init.h also use this pattern; they have also been changed. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
		| @@ -93,8 +93,8 @@ static void fn0(NAME)(const uint8_t *_top, ptrdiff_t top_linesize, \ | ||||
|      ptrdiff_t width, ptrdiff_t height,                       \ | ||||
|      FilterParams *param, double *values, int starty)         \ | ||||
| {                                                                                   \ | ||||
|     const PIXEL *top = (PIXEL *)_top;                                               \ | ||||
|     const PIXEL *bottom = (PIXEL *)_bottom;                                         \ | ||||
|     const PIXEL *top = (const PIXEL *)_top;                                         \ | ||||
|     const PIXEL *bottom = (const PIXEL *)_bottom;                                   \ | ||||
|     PIXEL *dst = (PIXEL *)_dst;                                                     \ | ||||
|     const float opacity = param->opacity;                                           \ | ||||
|                                                                                     \ | ||||
|   | ||||
| @@ -133,8 +133,8 @@ static void blend_expr_## name(const uint8_t *_top, ptrdiff_t top_linesize, | ||||
|                                ptrdiff_t width, ptrdiff_t height,              \ | ||||
|                                FilterParams *param, double *values, int starty) \ | ||||
| {                                                                              \ | ||||
|     const type *top = (type*)_top;                                             \ | ||||
|     const type *bottom = (type*)_bottom;                                       \ | ||||
|     const type *top = (const type*)_top;                                       \ | ||||
|     const type *bottom = (const type*)_bottom;                                 \ | ||||
|     type *dst = (type*)_dst;                                                   \ | ||||
|     AVExpr *e = param->e;                                                      \ | ||||
|     int y, x;                                                                  \ | ||||
|   | ||||
| @@ -82,8 +82,8 @@ static void blend_normal_##name(const uint8_t *_top, ptrdiff_t top_linesize, | ||||
|                                 ptrdiff_t width, ptrdiff_t height,                \ | ||||
|                                 FilterParams *param, double *values, int starty)  \ | ||||
| {                                                                                 \ | ||||
|     const type *top = (type*)_top;                                                \ | ||||
|     const type *bottom = (type*)_bottom;                                          \ | ||||
|     const type *top = (const type*)_top;                                          \ | ||||
|     const type *bottom = (const type*)_bottom;                                    \ | ||||
|     type *dst = (type*)_dst;                                                      \ | ||||
|     const float opacity = param->opacity;                                         \ | ||||
|                                                                                   \ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user