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:
Aurelien Jacobs 2007-07-09 21:07:24 +00:00
parent 7d6ac9a319
commit b776e3d11b
2 changed files with 16 additions and 17 deletions

View File

@ -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

View File

@ -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 ];
}