39 |
* MinChen <chenm001@163.com> |
* MinChen <chenm001@163.com> |
40 |
* 14.04.2002 added FrameCodeB() |
* 14.04.2002 added FrameCodeB() |
41 |
* |
* |
42 |
* $Id: encoder.c,v 1.91 2003-02-15 15:22:17 edgomez Exp $ |
* $Id: encoder.c,v 1.92 2003-02-15 18:48:15 edgomez Exp $ |
43 |
* |
* |
44 |
****************************************************************************/ |
****************************************************************************/ |
45 |
|
|
631 |
return; |
return; |
632 |
stop_conv_timer(); |
stop_conv_timer(); |
633 |
|
|
634 |
|
if ((pFrame->general & XVID_CHROMAOPT)) { |
635 |
|
image_chroma_optimize(&pEnc->queue[pEnc->queue_tail], |
636 |
|
pEnc->mbParam.width, pEnc->mbParam.height, pEnc->mbParam.edged_width); |
637 |
|
} |
638 |
|
|
639 |
pEnc->queue_size++; |
pEnc->queue_size++; |
640 |
pEnc->queue_tail = (pEnc->queue_tail + 1) % pEnc->mbParam.max_bframes; |
pEnc->queue_tail = (pEnc->queue_tail + 1) % pEnc->mbParam.max_bframes; |
641 |
} |
} |
855 |
} |
} |
856 |
stop_conv_timer(); |
stop_conv_timer(); |
857 |
|
|
858 |
|
if ((pFrame->general & XVID_CHROMAOPT)) { |
859 |
|
image_chroma_optimize(&pEnc->current->image, |
860 |
|
pEnc->mbParam.width, pEnc->mbParam.height, pEnc->mbParam.edged_width); |
861 |
|
} |
862 |
|
|
863 |
// queue input frame, and dequue next image |
// queue input frame, and dequue next image |
864 |
if (pEnc->queue_size > 0) |
if (pEnc->queue_size > 0) |
865 |
{ |
{ |
1248 |
return XVID_ERR_FORMAT; |
return XVID_ERR_FORMAT; |
1249 |
stop_conv_timer(); |
stop_conv_timer(); |
1250 |
|
|
1251 |
|
if ((pFrame->general & XVID_CHROMAOPT)) { |
1252 |
|
image_chroma_optimize(&pEnc->current->image, |
1253 |
|
pEnc->mbParam.width, pEnc->mbParam.height, pEnc->mbParam.edged_width); |
1254 |
|
} |
1255 |
|
|
1256 |
if (pFrame->general & XVID_EXTRASTATS) |
if (pFrame->general & XVID_EXTRASTATS) |
1257 |
{ image_copy(&pEnc->sOriginal, &pEnc->current->image, |
{ image_copy(&pEnc->sOriginal, &pEnc->current->image, |
1258 |
pEnc->mbParam.edged_width, pEnc->mbParam.height); |
pEnc->mbParam.edged_width, pEnc->mbParam.height); |