21 |
* along with this program ; if not, write to the Free Software |
* along with this program ; if not, write to the Free Software |
22 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
23 |
* |
* |
24 |
* $Id: encoder.c,v 1.95.2.36 2003-08-02 15:08:19 edgomez Exp $ |
* $Id: encoder.c,v 1.95.2.37 2003-08-03 10:20:12 syskin Exp $ |
25 |
* |
* |
26 |
****************************************************************************/ |
****************************************************************************/ |
27 |
|
|
1285 |
{ |
{ |
1286 |
unsigned int i,j; |
unsigned int i,j; |
1287 |
int quant = frame->quant; |
int quant = frame->quant; |
1288 |
|
if (quant > 31) |
1289 |
|
frame->quant = quant = 31; |
1290 |
|
else if (quant < 1) |
1291 |
|
frame->quant = quant = 1; |
1292 |
|
|
1293 |
for (j=0; j<pParam->mb_height; j++) |
for (j=0; j<pParam->mb_height; j++) |
1294 |
for (i=0; i<pParam->mb_width; i++) { |
for (i=0; i<pParam->mb_width; i++) { |
1296 |
quant += pMB->dquant; |
quant += pMB->dquant; |
1297 |
if (quant > 31) |
if (quant > 31) |
1298 |
quant = 31; |
quant = 31; |
1299 |
if (quant < 1) |
else if (quant < 1) |
1300 |
quant = 1; |
quant = 1; |
1301 |
pMB->quant = quant; |
pMB->quant = quant; |
1302 |
} |
} |