mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 12:09:55 +00:00
move ff_set_qscale from h263.c to mpegvideo.c
Originally committed as revision 9567 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
7d6ac9a319
commit
b776e3d11b
@ -2516,23 +2516,6 @@ void mpeg4_encode_picture_header(MpegEncContext * s, int picture_number)
|
||||
|
||||
#endif //CONFIG_ENCODERS
|
||||
|
||||
/**
|
||||
* set qscale and update qscale dependent variables.
|
||||
*/
|
||||
void ff_set_qscale(MpegEncContext * s, int qscale)
|
||||
{
|
||||
if (qscale < 1)
|
||||
qscale = 1;
|
||||
else if (qscale > 31)
|
||||
qscale = 31;
|
||||
|
||||
s->qscale = qscale;
|
||||
s->chroma_qscale= s->chroma_qscale_table[qscale];
|
||||
|
||||
s->y_dc_scale= s->y_dc_scale_table[ qscale ];
|
||||
s->c_dc_scale= s->c_dc_scale_table[ s->chroma_qscale ];
|
||||
}
|
||||
|
||||
/**
|
||||
* predicts the dc.
|
||||
* encoding quantized level -> quantized diff
|
||||
|
@ -2352,3 +2352,19 @@ static void dct_unquantize_h263_inter_c(MpegEncContext *s,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* set qscale and update qscale dependent variables.
|
||||
*/
|
||||
void ff_set_qscale(MpegEncContext * s, int qscale)
|
||||
{
|
||||
if (qscale < 1)
|
||||
qscale = 1;
|
||||
else if (qscale > 31)
|
||||
qscale = 31;
|
||||
|
||||
s->qscale = qscale;
|
||||
s->chroma_qscale= s->chroma_qscale_table[qscale];
|
||||
|
||||
s->y_dc_scale= s->y_dc_scale_table[ qscale ];
|
||||
s->c_dc_scale= s->c_dc_scale_table[ s->chroma_qscale ];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user