From f3f2e49ee2cea50fd990defb4434c245c3af55d4 Mon Sep 17 00:00:00 2001 From: michael Date: Fri, 31 Dec 2004 13:14:01 +0000 Subject: faster packed<->planar conversation git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14284 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libaf/af_lavcresample.c | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/libaf/af_lavcresample.c b/libaf/af_lavcresample.c index 20d9ffc878..c99e29e7ee 100644 --- a/libaf/af_lavcresample.c +++ b/libaf/af_lavcresample.c @@ -118,9 +118,18 @@ static af_data_t* play(struct af_instance_s* af, af_data_t* data) } } - for(j=0; jin[i][j + s->index]= *(in++); + if(chans==1){ + memcpy(&s->in[0][s->index], in, in_len * sizeof(int16_t)); + }else if(chans==2){ + for(j=0; jin[0][j + s->index]= *(in++); + s->in[1][j + s->index]= *(in++); + } + }else{ + for(j=0; jin[i][j + s->index]= *(in++); + } } } in_len += s->index; @@ -135,9 +144,18 @@ static af_data_t* play(struct af_instance_s* af, af_data_t* data) memmove(s->in[i], s->in[i] + consumed, s->index*sizeof(int16_t)); } - for(j=0; j