Unified · Split
| @@ -108,7 +108,7 @@ static int config(struct vf_instance *vf, · 107 unmodified lines | |||
| 108 | int i, j; | 108 | int i, j; |
| 109 | 109 | ||
| 110 | vf->priv->pvStride= width; | 110 | vf->priv->pvStride= width; |
| 111 | vf->priv->pv= (void*)memalign(8, width*height*2*sizeof(int32_t)); | 111 | vf->priv->pv= av_malloc(width*height*2*sizeof(int32_t)); |
| 112 | initPv(vf->priv, width, height); | 112 | initPv(vf->priv, width, height); |
| 113 | 113 | ||
| 114 | for(i=0; i<SUB_PIXELS; i++){ | 114 | for(i=0; i<SUB_PIXELS; i++){ |
| @@ -132,7 +132,7 @@ static int config(struct vf_instance *vf, · 17 unmodified lines | |||
| 132 | static void uninit(struct vf_instance *vf){ | 132 | static void uninit(struct vf_instance *vf){ |
| 133 | if(!vf->priv) return; | 133 | if(!vf->priv) return; |
| 134 | 134 | ||
| 135 | free(vf->priv->pv); | 135 | av_free(vf->priv->pv); |
| 136 | vf->priv->pv= NULL; | 136 | vf->priv->pv= NULL; |
| 137 | 137 | ||
| 138 | free(vf->priv); | 138 | free(vf->priv); |
| @@ -350,7 +350,7 @@ static int config(struct vf_instance *vf, · 349 unmodified lines | |||
| 350 | int h= (height+16+15)&(~15); | 350 | int h= (height+16+15)&(~15); |
| 351 | 351 | ||
| 352 | vf->priv->temp_stride= (width+16+15)&(~15); | 352 | vf->priv->temp_stride= (width+16+15)&(~15); |
| 353 | vf->priv->src = memalign(8, vf->priv->temp_stride*(h+8)*sizeof(uint8_t)); | 353 | vf->priv->src = av_malloc(vf->priv->temp_stride*(h+8)*sizeof(uint8_t)); |
| 354 | 354 | ||
| 355 | return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); | 355 | return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); |
| 356 | } | 356 | } |
| @@ -410,7 +410,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ · 53 unmodified lines | |||
| 410 | static void uninit(struct vf_instance *vf){ | 410 | static void uninit(struct vf_instance *vf){ |
| 411 | if(!vf->priv) return; | 411 | if(!vf->priv) return; |
| 412 | 412 | ||
| 413 | free(vf->priv->src); | 413 | av_free(vf->priv->src); |
| 414 | vf->priv->src= NULL; | 414 | vf->priv->src= NULL; |
| 415 | 415 | ||
| 416 | free(vf->priv); | 416 | free(vf->priv); |
| @@ -95,7 +95,7 @@ static int allocStuff(FilterParam *f, int width, int height){ · 94 unmodified lines | |||
| 95 | SwsVector *vec; | 95 | SwsVector *vec; |
| 96 | SwsFilter swsF; | 96 | SwsFilter swsF; |
| 97 | int i,x,y; | 97 | int i,x,y; |
| 98 | f->preFilterBuf= (uint8_t*)memalign(8, stride*height); | 98 | f->preFilterBuf= av_malloc(stride*height); |
| 99 | f->preFilterStride= stride; | 99 | f->preFilterStride= stride; |
| 100 | 100 | ||
| 101 | vec = sws_getGaussianVec(f->preFilterRadius, f->quality); | 101 | vec = sws_getGaussianVec(f->preFilterRadius, f->quality); |
| @@ -119,7 +119,7 @@ static int allocStuff(FilterParam *f, int width, int height){ · 17 unmodified lines | |||
| 119 | vec = sws_getGaussianVec(f->radius, f->quality); | 119 | vec = sws_getGaussianVec(f->radius, f->quality); |
| 120 | f->distWidth= vec->length; | 120 | f->distWidth= vec->length; |
| 121 | f->distStride= (vec->length+7)&~7; | 121 | f->distStride= (vec->length+7)&~7; |
| 122 | f->distCoeff= (int32_t*)memalign(8, f->distWidth*f->distStride*sizeof(int32_t)); | 122 | f->distCoeff= av_malloc(f->distWidth*f->distStride*sizeof(int32_t)); |
| 123 | 123 | ||
| 124 | for(y=0; y<vec->length; y++){ | 124 | for(y=0; y<vec->length; y++){ |
| 125 | for(x=0; x<vec->length; x++){ | 125 | for(x=0; x<vec->length; x++){ |
| @@ -153,10 +153,10 @@ static void freeBuffers(FilterParam *f){ · 27 unmodified lines | |||
| 153 | if(f->preFilterContext) sws_freeContext(f->preFilterContext); | 153 | if(f->preFilterContext) sws_freeContext(f->preFilterContext); |
| 154 | f->preFilterContext=NULL; | 154 | f->preFilterContext=NULL; |
| 155 | 155 | ||
| 156 | free(f->preFilterBuf); | 156 | av_free(f->preFilterBuf); |
| 157 | f->preFilterBuf=NULL; | 157 | f->preFilterBuf=NULL; |
| 158 | 158 | ||
| 159 | free(f->distCoeff); | 159 | av_free(f->distCoeff); |
| 160 | f->distCoeff=NULL; | 160 | f->distCoeff=NULL; |
| 161 | } | 161 | } |
| 162 | 162 | ||