--- decoder.c 2003/12/09 14:31:40 1.49.2.21 +++ decoder.c 2003/12/13 13:52:25 1.49.2.25 @@ -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.21 2003/12/09 14:31:40 syskin Exp $ + * $Id: decoder.c,v 1.49.2.25 2003/12/13 13:52:25 syskin Exp $ * ****************************************************************************/ @@ -58,6 +58,7 @@ #include "image/image.h" #include "image/colorspace.h" +#include "image/postprocessing.h" #include "utils/mem_align.h" static int @@ -1316,6 +1317,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) && 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); + img = &dec->tmp; + } + image_output(img, dec->width, dec->height, dec->edged_width, (uint8_t**)frame->output.plane, frame->output.stride, frame->output.csp, dec->interlacing); @@ -1450,6 +1461,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; }