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