X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Fvf_convolution.c;h=1305569c8889abc6e54634acd5af2b8b6c493307;hb=1811b7d1f5330e04a48b1d6425cf1ef6ed776ed1;hp=96d40b40f1edf8eab23230565c016d8d1b3df74b;hpb=b4ca32414ea28ad29b4bd387c298f5a676dace2a;p=ffmpeg diff --git a/libavfilter/vf_convolution.c b/libavfilter/vf_convolution.c index 96d40b40f1e..1305569c888 100644 --- a/libavfilter/vf_convolution.c +++ b/libavfilter/vf_convolution.c @@ -132,7 +132,7 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16, AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRAP10, AV_PIX_FMT_GBRAP12, AV_PIX_FMT_GBRAP16, - AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY9, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY16, + AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY9, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY14, AV_PIX_FMT_GRAY16, AV_PIX_FMT_NONE }; @@ -157,7 +157,7 @@ static void filter16_prewitt(uint8_t *dstp, int width, int sumb = AV_RN16A(&c[0][2 * x]) * -1 + AV_RN16A(&c[2][2 * x]) * 1 + AV_RN16A(&c[3][2 * x]) * -1 + AV_RN16A(&c[5][2 * x]) * 1 + AV_RN16A(&c[6][2 * x]) * -1 + AV_RN16A(&c[8][2 * x]) * 1; - dst[x] = av_clip(sqrt(suma*suma + sumb*sumb) * scale + delta, 0, peak); + dst[x] = av_clip(sqrtf(suma*suma + sumb*sumb) * scale + delta, 0, peak); } } @@ -173,7 +173,7 @@ static void filter16_roberts(uint8_t *dstp, int width, int suma = AV_RN16A(&c[0][2 * x]) * 1 + AV_RN16A(&c[1][2 * x]) * -1; int sumb = AV_RN16A(&c[4][2 * x]) * 1 + AV_RN16A(&c[3][2 * x]) * -1; - dst[x] = av_clip(sqrt(suma*suma + sumb*sumb) * scale + delta, 0, peak); + dst[x] = av_clip(sqrtf(suma*suma + sumb*sumb) * scale + delta, 0, peak); } } @@ -191,7 +191,7 @@ static void filter16_sobel(uint8_t *dstp, int width, int sumb = AV_RN16A(&c[0][2 * x]) * -1 + AV_RN16A(&c[2][2 * x]) * 1 + AV_RN16A(&c[3][2 * x]) * -2 + AV_RN16A(&c[5][2 * x]) * 2 + AV_RN16A(&c[6][2 * x]) * -1 + AV_RN16A(&c[8][2 * x]) * 1; - dst[x] = av_clip(sqrt(suma*suma + sumb*sumb) * scale + delta, 0, peak); + dst[x] = av_clip(sqrtf(suma*suma + sumb*sumb) * scale + delta, 0, peak); } } @@ -211,7 +211,7 @@ static void filter_prewitt(uint8_t *dst, int width, int sumb = c0[x] * -1 + c2[x] * 1 + c3[x] * -1 + c5[x] * 1 + c6[x] * -1 + c8[x] * 1; - dst[x] = av_clip_uint8(sqrt(suma*suma + sumb*sumb) * scale + delta); + dst[x] = av_clip_uint8(sqrtf(suma*suma + sumb*sumb) * scale + delta); } } @@ -226,7 +226,7 @@ static void filter_roberts(uint8_t *dst, int width, int suma = c[0][x] * 1 + c[1][x] * -1; int sumb = c[4][x] * 1 + c[3][x] * -1; - dst[x] = av_clip_uint8(sqrt(suma*suma + sumb*sumb) * scale + delta); + dst[x] = av_clip_uint8(sqrtf(suma*suma + sumb*sumb) * scale + delta); } } @@ -246,7 +246,7 @@ static void filter_sobel(uint8_t *dst, int width, int sumb = c0[x] * -1 + c2[x] * 1 + c3[x] * -2 + c5[x] * 2 + c6[x] * -1 + c8[x] * 1; - dst[x] = av_clip_uint8(sqrt(suma*suma + sumb*sumb) * scale + delta); + dst[x] = av_clip_uint8(sqrtf(suma*suma + sumb*sumb) * scale + delta); } }