Commit b776e3d1 authored by Aurelien Jacobs's avatar Aurelien Jacobs

move ff_set_qscale from h263.c to mpegvideo.c

Originally committed as revision 9567 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 7d6ac9a3
......@@ -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 ];
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment