mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-10-28 10:04:37 +08:00
avfilter/vf_ssim360: compute the barrel density once per row
The cos() value only depends on the row, but it was computed for every pixel in the row. No change in output. Found during a code review sweep of ffmpeg using an LLM.
This commit is contained in:
1 parent
2193727b88
commit
94b8431a55
1 file changed
+1
-1
@@ -1498,8 +1498,8 @@ static int generate_density_map(SSIM360Context *s, int w, int h)
|
||||
case PROJECTION_BARREL:
|
||||
// side face
|
||||
for (int i = 0; i < h; i++) {
|
||||
d = cos(((0.5 + i) / h - 0.5) * DEFAULT_EXPANSION_COEF * M_PI_2);
|
||||
for (int j = 0; j < w * 4 / 5; j++) {
|
||||
d = cos(((0.5 + i) / h - 0.5) * DEFAULT_EXPANSION_COEF * M_PI_2);
|
||||
s->density.value[i * w + j] = d * d * d;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user