Re: [FFmpeg-devel] [PATCH 3/4] libswresample: Avoid needlessly large on-stack array.

2014-09-03 Thread Michael Niedermayer
On Wed, Sep 03, 2014 at 07:36:32AM +0200, Reimar Döffinger wrote:
 On 03.09.2014, at 06:28, Michael Niedermayer michae...@gmx.at wrote:
  On Wed, Sep 03, 2014 at 12:01:54AM +0200, Reimar Döffinger wrote:
  We only actually use a tiny part of it.
  
  Signed-off-by: Reimar Döffinger reimar.doeffin...@gmx.de
  ---
  libswresample/rematrix.c | 7 ---
  1 file changed, 4 insertions(+), 3 deletions(-)
  
  i think there a multiple loops left that can access more of the array
  
  2 i spotted:
  for(i=0; i64; i++){
 if(in_ch_layout  out_ch_layout  (1ULLi))
 matrix[i][i]= 1.0;
 }
 
 Seems I missed that somehow. That one might be a bit of a mess.
 

  if(s-rematrix_volume  0){
 for(i=0; iSWR_CH_MAX; i++)
 for(j=0; jSWR_CH_MAX; j++){
 s-matrix[i][j] *= s-rematrix_volume;
 }
 }
 
 That is s-matrix?

true, ive misread that somehow


[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Observe your enemies, for they first find out your faults. -- Antisthenes


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 3/4] libswresample: Avoid needlessly large on-stack array.

2014-09-03 Thread Reimar Döffinger
On Wed, Sep 03, 2014 at 07:36:32AM +0200, Reimar Döffinger wrote:
 On 03.09.2014, at 06:28, Michael Niedermayer michae...@gmx.at wrote:
  On Wed, Sep 03, 2014 at 12:01:54AM +0200, Reimar Döffinger wrote:
  We only actually use a tiny part of it.
  
  Signed-off-by: Reimar Döffinger reimar.doeffin...@gmx.de
  ---
  libswresample/rematrix.c | 7 ---
  1 file changed, 4 insertions(+), 3 deletions(-)
  
  i think there a multiple loops left that can access more of the array
  
  2 i spotted:
  for(i=0; i64; i++){
 if(in_ch_layout  out_ch_layout  (1ULLi))
 matrix[i][i]= 1.0;
 }
 
 Seems I missed that somehow. That one might be a bit of a mess.

Sent new version that hopefully is correct and not too messy...
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 3/4] libswresample: Avoid needlessly large on-stack array.

2014-09-02 Thread Reimar Döffinger
On 03.09.2014, at 06:28, Michael Niedermayer michae...@gmx.at wrote:
 On Wed, Sep 03, 2014 at 12:01:54AM +0200, Reimar Döffinger wrote:
 We only actually use a tiny part of it.
 
 Signed-off-by: Reimar Döffinger reimar.doeffin...@gmx.de
 ---
 libswresample/rematrix.c | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)
 
 i think there a multiple loops left that can access more of the array
 
 2 i spotted:
 for(i=0; i64; i++){
if(in_ch_layout  out_ch_layout  (1ULLi))
matrix[i][i]= 1.0;
}

Seems I missed that somehow. That one might be a bit of a mess.

 if(s-rematrix_volume  0){
for(i=0; iSWR_CH_MAX; i++)
for(j=0; jSWR_CH_MAX; j++){
s-matrix[i][j] *= s-rematrix_volume;
}
}

That is s-matrix?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel