mirror of https://git.ffmpeg.org/ffmpeg.git
parent
c70d547751
commit
1e35519fe0
|
@ -157,6 +157,7 @@ static int filter_postscale(AVFilterContext *ctx, void *arg, int jobnr, int nb_j
|
||||||
{
|
{
|
||||||
GBlurContext *s = ctx->priv;
|
GBlurContext *s = ctx->priv;
|
||||||
ThreadData *td = arg;
|
ThreadData *td = arg;
|
||||||
|
const float max = (1 << s->depth) - 1;
|
||||||
const int height = td->height;
|
const int height = td->height;
|
||||||
const int width = td->width;
|
const int width = td->width;
|
||||||
const int64_t numpixels = width * (int64_t)height;
|
const int64_t numpixels = width * (int64_t)height;
|
||||||
|
@ -166,8 +167,10 @@ static int filter_postscale(AVFilterContext *ctx, void *arg, int jobnr, int nb_j
|
||||||
float *buffer = s->buffer;
|
float *buffer = s->buffer;
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
for (i = slice_start; i < slice_end; i++)
|
for (i = slice_start; i < slice_end; i++) {
|
||||||
buffer[i] *= postscale;
|
buffer[i] *= postscale;
|
||||||
|
buffer[i] = av_clipf(buffer[i], 0.f, max);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue