mirror of
https://github.com/librempeg/librempeg
synced 2024-11-23 11:39:47 +00:00
avcodec/vdpau_mpeg12: fix order of quant matrix coefficients
The matrix coefficients are stored permutated for the IDCT, rather then in plain raster order, and need to be un-permutated for the hardware.
This commit is contained in:
parent
b3e938ef80
commit
308e4ae8e3
@ -75,8 +75,9 @@ static int vdpau_mpeg_start_frame(AVCodecContext *avctx,
|
||||
info->f_code[1][0] = s->mpeg_f_code[1][0];
|
||||
info->f_code[1][1] = s->mpeg_f_code[1][1];
|
||||
for (i = 0; i < 64; ++i) {
|
||||
info->intra_quantizer_matrix[i] = s->intra_matrix[i];
|
||||
info->non_intra_quantizer_matrix[i] = s->inter_matrix[i];
|
||||
int n = s->idsp.idct_permutation[i];
|
||||
info->intra_quantizer_matrix[i] = s->intra_matrix[n];
|
||||
info->non_intra_quantizer_matrix[i] = s->inter_matrix[n];
|
||||
}
|
||||
|
||||
return ff_vdpau_common_start_frame(pic_ctx, buffer, size);
|
||||
|
Loading…
Reference in New Issue
Block a user