mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-10-28 10:04:37 +08:00
avfilter/vf_uspp: Fix qpcount
Fixes: division by zero Fixes: tiny_16x8.h264 Fixes: W9IyRhjCcQxd Found-by: zhang xingxing Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
1 parent
7ac9cb4340
commit
2c05ce65e1
1 file changed
+4
-1
@@ -314,7 +314,10 @@ static void filter(AVFilterContext *ctx, uint8_t *dst[3], uint8_t *src[3],
|
||||
p->quality = p->qp * FF_QP2LAMBDA;
|
||||
else {
|
||||
int qpsum=0;
|
||||
int qpcount = (height>>4) * (height>>4);
|
||||
int qpcount = (width>>4) * (height>>4);
|
||||
|
||||
qpsum += !qpcount;
|
||||
qpcount += !qpcount;
|
||||
|
||||
for (y = 0; y < (height>>4); y++) {
|
||||
for (x = 0; x < (width>>4); x++)
|
||||
|
||||
Reference in new issue
Block a user