1
0
mirror of https://git.ffmpeg.org/ffmpeg.git synced 2026-10-24 02:09:03 +03:00

vulkan/prores_ks_estimate_slice: zero the bits of a missing alpha plane

The trellis and the encoder sum the bits of all four planes, but
without an alpha plane nothing wrote the fourth. In VRAM this produced
garbage slice sizes, and a frame size that crashed the packet assembly.
This commit is contained in:
Lynne
2026-09-22 01:19:31 +09:00
parent d00b41926a
commit ddc140ebfc

View File

@@ -254,6 +254,16 @@ void main() [[maximally_reconverges]]
scores[slice].bits[q][plane] = FFALIGN(bits, 8);
scores[slice].score[q][plane] = error;
/* The trellis and the encoder sum all four planes */
if (num_planes == 3 && plane == 0) {
scores[slice].bits[q][3] = 0;
scores[slice].score[q][3] = 0;
if (q == max_quant) {
scores[slice].bits[max_quant + 1][3] = 0;
scores[slice].score[max_quant + 1][3] = 0;
}
}
/* Accumulate total bits and error of all planes */
int total_bits = sum_of_planes(bits);
int total_score = sum_of_planes(error);