mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
avcodec/mpeg12dec: Move non_linear_qscale to mpegvideodata
This will be used in the next commit Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
2d35757814
commit
bf9464027b
@ -96,13 +96,6 @@ static const uint32_t btype2mb_type[11] = {
|
||||
MB_TYPE_QUANT | MB_TYPE_L0L1 | MB_TYPE_CBP,
|
||||
};
|
||||
|
||||
static const uint8_t non_linear_qscale[32] = {
|
||||
0, 1, 2, 3, 4, 5, 6, 7,
|
||||
8, 10, 12, 14, 16, 18, 20, 22,
|
||||
24, 28, 32, 36, 40, 44, 48, 52,
|
||||
56, 64, 72, 80, 88, 96, 104, 112,
|
||||
};
|
||||
|
||||
/* as H.263, but only 17 codes */
|
||||
static int mpeg_decode_motion(MpegEncContext *s, int fcode, int pred)
|
||||
{
|
||||
@ -719,7 +712,7 @@ static inline int get_qscale(MpegEncContext *s)
|
||||
{
|
||||
int qscale = get_bits(&s->gb, 5);
|
||||
if (s->q_scale_type)
|
||||
return non_linear_qscale[qscale];
|
||||
return ff_mpeg2_non_linear_qscale[qscale];
|
||||
else
|
||||
return qscale << 1;
|
||||
}
|
||||
|
@ -24,6 +24,13 @@ const uint8_t ff_default_chroma_qscale_table[32] = {
|
||||
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31
|
||||
};
|
||||
|
||||
const uint8_t ff_mpeg2_non_linear_qscale[32] = {
|
||||
0, 1, 2, 3, 4, 5, 6, 7,
|
||||
8, 10, 12, 14, 16, 18, 20, 22,
|
||||
24, 28, 32, 36, 40, 44, 48, 52,
|
||||
56, 64, 72, 80, 88, 96, 104, 112,
|
||||
};
|
||||
|
||||
const uint8_t ff_mpeg1_dc_scale_table[128] = {
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
||||
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
|
||||
|
@ -28,6 +28,8 @@ extern const uint8_t ff_alternate_vertical_scan[64];
|
||||
extern const uint8_t ff_mpeg1_dc_scale_table[128];
|
||||
extern const uint8_t * const ff_mpeg2_dc_scale_table[4];
|
||||
|
||||
extern const uint8_t ff_mpeg2_non_linear_qscale[32];
|
||||
|
||||
extern const uint8_t ff_default_chroma_qscale_table[32];
|
||||
|
||||
#endif /* AVCODEC_MPEGVIDEODATA_H */
|
||||
|
Loading…
Reference in New Issue
Block a user