/*
- * This file is part of FFmpeg.
+ * This file is part of Libav.
*
- * FFmpeg is free software; you can redistribute it and/or
+ * Libav 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,
+ * Libav 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
+ * License along with Libav; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/**
-* @file intrax8dsp.c
+* @file
*@brief IntraX8 frame subdecoder image manipulation routines
*/
#include "dsputil.h"
+#include "intrax8dsp.h"
+#include "libavutil/common.h"
/*
area positions, #3 is 1 pixel only, other are 8 pixels
int x,y;
unsigned int p;//power divided by 2
int a;
- uint16_t left_sum[2][8];
- uint16_t top_sum[2][8];
- memset(left_sum,0,2*8*sizeof(uint16_t));
- memset( top_sum,0,2*8*sizeof(uint16_t));
+ uint16_t left_sum[2][8] = { { 0 } };
+ uint16_t top_sum[2][8] = { { 0 } };
for(i=0;i<8;i++){
a=src[area2+7-i]<<4;
x8_loop_filter(src, 1, stride, qscale);
}
-void ff_intrax8dsp_init(DSPContext* dsp, AVCodecContext *avctx) {
- dsp->x8_h_loop_filter=x8_h_loop_filter;
- dsp->x8_v_loop_filter=x8_v_loop_filter;
- dsp->x8_setup_spatial_compensation=x8_setup_spatial_compensation;
- dsp->x8_spatial_compensation[0]=spatial_compensation_0;
- dsp->x8_spatial_compensation[1]=spatial_compensation_1;
- dsp->x8_spatial_compensation[2]=spatial_compensation_2;
- dsp->x8_spatial_compensation[3]=spatial_compensation_3;
- dsp->x8_spatial_compensation[4]=spatial_compensation_4;
- dsp->x8_spatial_compensation[5]=spatial_compensation_5;
- dsp->x8_spatial_compensation[6]=spatial_compensation_6;
- dsp->x8_spatial_compensation[7]=spatial_compensation_7;
- dsp->x8_spatial_compensation[8]=spatial_compensation_8;
- dsp->x8_spatial_compensation[9]=spatial_compensation_9;
- dsp->x8_spatial_compensation[10]=spatial_compensation_10;
- dsp->x8_spatial_compensation[11]=spatial_compensation_11;
+av_cold void ff_intrax8dsp_init(IntraX8DSPContext *dsp)
+{
+ dsp->h_loop_filter=x8_h_loop_filter;
+ dsp->v_loop_filter=x8_v_loop_filter;
+ dsp->setup_spatial_compensation=x8_setup_spatial_compensation;
+ dsp->spatial_compensation[0]=spatial_compensation_0;
+ dsp->spatial_compensation[1]=spatial_compensation_1;
+ dsp->spatial_compensation[2]=spatial_compensation_2;
+ dsp->spatial_compensation[3]=spatial_compensation_3;
+ dsp->spatial_compensation[4]=spatial_compensation_4;
+ dsp->spatial_compensation[5]=spatial_compensation_5;
+ dsp->spatial_compensation[6]=spatial_compensation_6;
+ dsp->spatial_compensation[7]=spatial_compensation_7;
+ dsp->spatial_compensation[8]=spatial_compensation_8;
+ dsp->spatial_compensation[9]=spatial_compensation_9;
+ dsp->spatial_compensation[10]=spatial_compensation_10;
+ dsp->spatial_compensation[11]=spatial_compensation_11;
}