--- decoder.c 2003/12/10 01:01:07 1.49.2.22 +++ decoder.c 2003/12/20 11:54:27 1.49.2.27 @@ -20,7 +20,7 @@ * along with this program ; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: decoder.c,v 1.49.2.22 2003/12/10 01:01:07 Isibaar Exp $ + * $Id: decoder.c,v 1.49.2.27 2003/12/20 11:54:27 Isibaar Exp $ * ****************************************************************************/ @@ -58,6 +58,7 @@ #include "image/image.h" #include "image/colorspace.h" +#include "image/postprocessing.h" #include "utils/mem_align.h" static int @@ -204,6 +205,7 @@ dec->last_mbs = NULL; init_timer(); + init_postproc(); init_mpeg_matrix(dec->mpeg_quant_matrices); /* For B-frame support (used to save reference frame's time */ @@ -1316,13 +1318,16 @@ void decoder_output(DECODER * dec, IMAGE * img, MACROBLOCK * mbs, xvid_dec_frame_t * frame, xvid_dec_stats_t * stats, int coding_type) { - if (frame->general & (XVID_DEBLOCKY|XVID_DEBLOCKUV)) /* post process */ + if (dec->cartoon_mode) + frame->general &= ~XVID_FILMEFFECT; + + if (frame->general & (XVID_DEBLOCKY|XVID_DEBLOCKUV|XVID_FILMEFFECT) && mbs != NULL) /* post process */ { /* note: image is stored to tmp */ image_copy(&dec->tmp, img, dec->edged_width, dec->height); - image_deblock(&dec->tmp, dec->edged_width, - mbs, dec->mb_width, dec->mb_height, dec->mb_width, - frame->general); + image_postproc(&dec->tmp, dec->edged_width, + mbs, dec->mb_width, dec->mb_height, dec->mb_width, + frame->general, dec->frames); img = &dec->tmp; } @@ -1460,6 +1465,7 @@ /* XXX: not_coded vops are not used for forward prediction */ /* we should not swap(last_mbs,mbs) */ image_copy(&dec->cur, &dec->refn[0], dec->edged_width, dec->height); + SWAP(MACROBLOCK *, dec->mbs, dec->last_mbs); /* it will be swapped back */ break; }