@ -222,6 +222,7 @@ typedef struct ProresThreadData {
DECLARE_ALIGNED ( 16 , int16_t , blocks ) [ MAX_PLANES ] [ 64 * 4 * MAX_MBS_PER_SLICE ] ;
DECLARE_ALIGNED ( 16 , int16_t , blocks ) [ MAX_PLANES ] [ 64 * 4 * MAX_MBS_PER_SLICE ] ;
DECLARE_ALIGNED ( 16 , uint16_t , emu_buf ) [ 16 * 16 ] ;
DECLARE_ALIGNED ( 16 , uint16_t , emu_buf ) [ 16 * 16 ] ;
int16_t custom_q [ 64 ] ;
int16_t custom_q [ 64 ] ;
int16_t custom_chroma_q [ 64 ] ;
struct TrellisNode * nodes ;
struct TrellisNode * nodes ;
} ProresThreadData ;
} ProresThreadData ;
@ -232,6 +233,7 @@ typedef struct ProresContext {
int16_t quants [ MAX_STORED_Q ] [ 64 ] ;
int16_t quants [ MAX_STORED_Q ] [ 64 ] ;
int16_t quants_chroma [ MAX_STORED_Q ] [ 64 ] ;
int16_t quants_chroma [ MAX_STORED_Q ] [ 64 ] ;
int16_t custom_q [ 64 ] ;
int16_t custom_q [ 64 ] ;
int16_t custom_chroma_q [ 64 ] ;
const uint8_t * quant_mat ;
const uint8_t * quant_mat ;
const uint8_t * quant_chroma_mat ;
const uint8_t * quant_chroma_mat ;
const uint8_t * scantable ;
const uint8_t * scantable ;
@ -574,7 +576,7 @@ static int encode_slice(AVCodecContext *avctx, const AVFrame *pic,
qmat_chroma = ctx - > quants_chroma [ quant ] ;
qmat_chroma = ctx - > quants_chroma [ quant ] ;
} else {
} else {
qmat = ctx - > custom_q ;
qmat = ctx - > custom_q ;
qmat_chroma = ctx - > custom_q ;
qmat_chroma = ctx - > custom_chroma_ q ;
for ( i = 0 ; i < 64 ; i + + ) {
for ( i = 0 ; i < 64 ; i + + ) {
qmat [ i ] = ctx - > quant_mat [ i ] * quant ;
qmat [ i ] = ctx - > quant_mat [ i ] * quant ;
qmat_chroma [ i ] = ctx - > quant_chroma_mat [ i ] * quant ;
qmat_chroma [ i ] = ctx - > quant_chroma_mat [ i ] * quant ;
@ -902,7 +904,7 @@ static int find_slice_quant(AVCodecContext *avctx,
qmat_chroma = ctx - > quants_chroma [ q ] ;
qmat_chroma = ctx - > quants_chroma [ q ] ;
} else {
} else {
qmat = td - > custom_q ;
qmat = td - > custom_q ;
qmat_chroma = td - > custom_q ;
qmat_chroma = td - > custom_chroma_ q ;
for ( i = 0 ; i < 64 ; i + + ) {
for ( i = 0 ; i < 64 ; i + + ) {
qmat [ i ] = ctx - > quant_mat [ i ] * q ;
qmat [ i ] = ctx - > quant_mat [ i ] * q ;
qmat_chroma [ i ] = ctx - > quant_chroma_mat [ i ] * q ;
qmat_chroma [ i ] = ctx - > quant_chroma_mat [ i ] * q ;