mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
avcodec/texturedspenc: Fix indexing in color distribution determination
Fixes CID1396405 MSE and PSNR is slightly improved, and some noticable corruptions disappear as well. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
6dd6c58d89
commit
ade36d61de
@ -255,11 +255,11 @@ static void optimize_colors(const uint8_t *block, ptrdiff_t stride,
|
||||
|
||||
muv = minv = maxv = bp[0];
|
||||
for (y = 0; y < 4; y++) {
|
||||
for (x = 4; x < 4; x += 4) {
|
||||
for (x = 0; x < 4; x++) {
|
||||
muv += bp[x * 4 + y * stride];
|
||||
if (bp[x] < minv)
|
||||
if (bp[x * 4 + y * stride] < minv)
|
||||
minv = bp[x * 4 + y * stride];
|
||||
else if (bp[x] > maxv)
|
||||
else if (bp[x * 4 + y * stride] > maxv)
|
||||
maxv = bp[x * 4 + y * stride];
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
frame:0 pts:0 pts_time:0
|
||||
lavfi.psnr.mse.r=36.794250
|
||||
lavfi.psnr.psnr.r=32.473003
|
||||
lavfi.psnr.mse.g=33.350525
|
||||
lavfi.psnr.psnr.g=32.899776
|
||||
lavfi.psnr.mse.b=28.317383
|
||||
lavfi.psnr.psnr.b=33.610271
|
||||
lavfi.psnr.mse.r=36.699280
|
||||
lavfi.psnr.psnr.r=32.484230
|
||||
lavfi.psnr.mse.g=33.508362
|
||||
lavfi.psnr.psnr.g=32.879272
|
||||
lavfi.psnr.mse.b=27.947266
|
||||
lavfi.psnr.psnr.b=33.667412
|
||||
lavfi.psnr.mse.a=21186.988281
|
||||
lavfi.psnr.psnr.a=4.870111
|
||||
lavfi.psnr.mse_avg=5321.362793
|
||||
lavfi.psnr.psnr_avg=10.870575
|
||||
lavfi.psnr.mse_avg=5321.285645
|
||||
lavfi.psnr.psnr_avg=10.870638
|
||||
|
@ -1,11 +1,11 @@
|
||||
frame:0 pts:0 pts_time:0
|
||||
lavfi.psnr.mse.r=36.794250
|
||||
lavfi.psnr.psnr.r=32.473003
|
||||
lavfi.psnr.mse.g=33.350525
|
||||
lavfi.psnr.psnr.g=32.899776
|
||||
lavfi.psnr.mse.b=28.317383
|
||||
lavfi.psnr.psnr.b=33.610271
|
||||
lavfi.psnr.mse.r=36.699280
|
||||
lavfi.psnr.psnr.r=32.484230
|
||||
lavfi.psnr.mse.g=33.508362
|
||||
lavfi.psnr.psnr.g=32.879272
|
||||
lavfi.psnr.mse.b=27.947266
|
||||
lavfi.psnr.psnr.b=33.667412
|
||||
lavfi.psnr.mse.a=0.000183
|
||||
lavfi.psnr.psnr.a=85.503792
|
||||
lavfi.psnr.mse_avg=24.615585
|
||||
lavfi.psnr.psnr_avg=34.218700
|
||||
lavfi.psnr.mse_avg=24.538773
|
||||
lavfi.psnr.psnr_avg=34.232277
|
||||
|
Loading…
Reference in New Issue
Block a user