mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
avcodec/mpegvideo_enc: Add intra_chroma_ac_vlc_length, it will be needed for mjpeg
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
194165aed8
commit
7366bb38f1
@ -443,6 +443,8 @@ typedef struct MpegEncContext {
|
||||
int ac_esc_length; ///< num of bits needed to encode the longest esc
|
||||
uint8_t *intra_ac_vlc_length;
|
||||
uint8_t *intra_ac_vlc_last_length;
|
||||
uint8_t *intra_chroma_ac_vlc_length;
|
||||
uint8_t *intra_chroma_ac_vlc_last_length;
|
||||
uint8_t *inter_ac_vlc_length;
|
||||
uint8_t *inter_ac_vlc_last_length;
|
||||
uint8_t *luma_dc_vlc_length;
|
||||
|
@ -3813,8 +3813,13 @@ static int dct_quantize_trellis_c(MpegEncContext *s,
|
||||
qmat = n < 4 ? s->q_intra_matrix[qscale] : s->q_chroma_intra_matrix[qscale];
|
||||
if(s->mpeg_quant || s->out_format == FMT_MPEG1)
|
||||
bias= 1<<(QMAT_SHIFT-1);
|
||||
if (n > 3 && s->intra_chroma_ac_vlc_length) {
|
||||
length = s->intra_chroma_ac_vlc_length;
|
||||
last_length= s->intra_chroma_ac_vlc_last_length;
|
||||
} else {
|
||||
length = s->intra_ac_vlc_length;
|
||||
last_length= s->intra_ac_vlc_last_length;
|
||||
}
|
||||
} else {
|
||||
start_i = 0;
|
||||
last_non_zero = -1;
|
||||
@ -4123,8 +4128,13 @@ static int messed_sign=0;
|
||||
start_i = 1;
|
||||
// if(s->mpeg_quant || s->out_format == FMT_MPEG1)
|
||||
// bias= 1<<(QMAT_SHIFT-1);
|
||||
if (n > 3 && s->intra_chroma_ac_vlc_length) {
|
||||
length = s->intra_chroma_ac_vlc_length;
|
||||
last_length= s->intra_chroma_ac_vlc_last_length;
|
||||
} else {
|
||||
length = s->intra_ac_vlc_length;
|
||||
last_length= s->intra_ac_vlc_last_length;
|
||||
}
|
||||
} else {
|
||||
dc= 0;
|
||||
start_i = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user