00001 /* 00002 * H261 common code 00003 * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at> 00004 * Copyright (c) 2004 Maarten Daniels 00005 * 00006 * This file is part of FFmpeg. 00007 * 00008 * FFmpeg is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU Lesser General Public 00010 * License as published by the Free Software Foundation; either 00011 * version 2.1 of the License, or (at your option) any later version. 00012 * 00013 * FFmpeg is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License along with FFmpeg; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00021 */ 00022 00028 #include "dsputil.h" 00029 #include "avcodec.h" 00030 #include "h261.h" 00031 00032 #define IS_FIL(a) ((a)&MB_TYPE_H261_FIL) 00033 00034 uint8_t ff_h261_rl_table_store[2][2*MAX_RUN + MAX_LEVEL + 3]; 00035 00036 void ff_h261_loop_filter(MpegEncContext *s){ 00037 H261Context * h= (H261Context*)s; 00038 const int linesize = s->linesize; 00039 const int uvlinesize= s->uvlinesize; 00040 uint8_t *dest_y = s->dest[0]; 00041 uint8_t *dest_cb= s->dest[1]; 00042 uint8_t *dest_cr= s->dest[2]; 00043 00044 if(!(IS_FIL (h->mtype))) 00045 return; 00046 00047 s->dsp.h261_loop_filter(dest_y , linesize); 00048 s->dsp.h261_loop_filter(dest_y + 8, linesize); 00049 s->dsp.h261_loop_filter(dest_y + 8 * linesize , linesize); 00050 s->dsp.h261_loop_filter(dest_y + 8 * linesize + 8, linesize); 00051 s->dsp.h261_loop_filter(dest_cb, uvlinesize); 00052 s->dsp.h261_loop_filter(dest_cr, uvlinesize); 00053 } 00054