* [FFmpeg-devel] [PATCH] avcodec/lpc: account for odd len values
@ 2024-05-31 12:39 James Almer
2024-05-31 13:04 ` Rémi Denis-Courmont
0 siblings, 1 reply; 2+ messages in thread
From: James Almer @ 2024-05-31 12:39 UTC (permalink / raw)
To: ffmpeg-devel
Signed-off-by: James Almer <jamrial@gmail.com>
---
libavcodec/lpc.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/libavcodec/lpc.c b/libavcodec/lpc.c
index dfd6114690..e793e54038 100644
--- a/libavcodec/lpc.c
+++ b/libavcodec/lpc.c
@@ -120,9 +120,8 @@ static void lpc_compute_autocorr_c(const double *data, ptrdiff_t len, int lag,
if(j==lag){
double sum = 1.0;
- for(i=j-1; i<len; i+=2){
- sum += data[i ] * data[i-j ]
- + data[i+1] * data[i-j+1];
+ for(i=j-1; i<len; i++){
+ sum += data[i] * data[i-j];
}
autoc[j] = sum;
}
--
2.45.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [FFmpeg-devel] [PATCH] avcodec/lpc: account for odd len values
2024-05-31 12:39 [FFmpeg-devel] [PATCH] avcodec/lpc: account for odd len values James Almer
@ 2024-05-31 13:04 ` Rémi Denis-Courmont
0 siblings, 0 replies; 2+ messages in thread
From: Rémi Denis-Courmont @ 2024-05-31 13:04 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Le 31 mai 2024 15:39:35 GMT+03:00, James Almer <jamrial@gmail.com> a écrit :
>Signed-off-by: James Almer <jamrial@gmail.com>
>---
> libavcodec/lpc.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
>diff --git a/libavcodec/lpc.c b/libavcodec/lpc.c
>index dfd6114690..e793e54038 100644
>--- a/libavcodec/lpc.c
>+++ b/libavcodec/lpc.c
>@@ -120,9 +120,8 @@ static void lpc_compute_autocorr_c(const double *data, ptrdiff_t len, int lag,
>
> if(j==lag){
> double sum = 1.0;
>- for(i=j-1; i<len; i+=2){
>- sum += data[i ] * data[i-j ]
>- + data[i+1] * data[i-j+1];
>+ for(i=j-1; i<len; i++){
>+ sum += data[i] * data[i-j];
> }
> autoc[j] = sum;
> }
LGTM
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-05-31 13:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-31 12:39 [FFmpeg-devel] [PATCH] avcodec/lpc: account for odd len values James Almer
2024-05-31 13:04 ` Rémi Denis-Courmont
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git