/* * H.26L/H.264/AVC/JVT/14496-10/... encoder/decoder * Copyright (c) 2003-2010 Michael Niedermayer * * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "libavutil/common.h" #include "libavutil/intreadwrite.h" #include "bit_depth_template.c" #include "hpel_template.c" #include "pel_template.c" static inline void FUNC(copy_block2)(uint8_t *dst, const uint8_t *av_restrict src, int dstStride, int srcStride, int h) { int i; for(i=0; i>= sizeof(pixel)-1;\ srcStride >>= sizeof(pixel)-1;\ for(i=0; i>= sizeof(pixel)-1;\ srcStride >>= sizeof(pixel)-1;\ for(i=0; i>= sizeof(pixel)-1;\ srcStride >>= sizeof(pixel)-1;\ src -= 2*srcStride;\ for(i=0; i>= sizeof(pixel)-1;\ srcStride >>= sizeof(pixel)-1;\ for(i=0; i>= sizeof(pixel)-1;\ srcStride >>= sizeof(pixel)-1;\ for(i=0; i>= sizeof(pixel)-1;\ srcStride >>= sizeof(pixel)-1;\ src -= 2*srcStride;\ for(i=0; i>= sizeof(pixel)-1;\ srcStride >>= sizeof(pixel)-1;\ for(i=0; i>= sizeof(pixel)-1;\ srcStride >>= sizeof(pixel)-1;\ for(i=0; i>= sizeof(pixel)-1;\ srcStride >>= sizeof(pixel)-1;\ src -= 2*srcStride;\ for(i=0; i>5)+1)>>1) //#define op_avg2(a, b) a = (((a)*w1+cm[((b) + 16)>>5]*w2 + o + 64)>>7) #define op_put(a, b) a = CLIP(((b) + 16)>>5) #define op2_avg(a, b) a = (((a)+CLIP(((b) + 512)>>10)+1)>>1) #define op2_put(a, b) a = CLIP(((b) + 512)>>10) H264_LOWPASS(put_ , op_put, op2_put) H264_LOWPASS(avg_ , op_avg, op2_avg) H264_MC(put_, 2) H264_MC(put_, 4) H264_MC(put_, 8) H264_MC(put_, 16) H264_MC(avg_, 4) H264_MC(avg_, 8) H264_MC(avg_, 16) #undef op_avg #undef op_put #undef op2_avg #undef op2_put