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:
@@ -254,6 +254,16 @@ void main() [[maximally_reconverges]]
|
|||||||
scores[slice].bits[q][plane] = FFALIGN(bits, 8);
|
scores[slice].bits[q][plane] = FFALIGN(bits, 8);
|
||||||
scores[slice].score[q][plane] = error;
|
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 */
|
/* Accumulate total bits and error of all planes */
|
||||||
int total_bits = sum_of_planes(bits);
|
int total_bits = sum_of_planes(bits);
|
||||||
int total_score = sum_of_planes(error);
|
int total_score = sum_of_planes(error);
|
||||||
|
|||||||
Reference in New Issue
Block a user