diff mbox

[FFmpeg-devel,1/8] avcodec/flac: document limitations of the LPC encoder

Message ID 20171126225111.5108-2-james.darnley@gmail.com
State New
Headers show

Commit Message

James Darnley Nov. 26, 2017, 10:51 p.m. UTC
State that the maximum value of order is 32.  This limit is used in both
C and x86 assebly code.
---
 libavcodec/flacdsp.h | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Rostislav Pehlivanov Nov. 26, 2017, 11:17 p.m. UTC | #1
On 26 November 2017 at 22:51, James Darnley <james.darnley@gmail.com> wrote:

> State that the maximum value of order is 32.  This limit is used in both
> C and x86 assebly code.
> ---
>  libavcodec/flacdsp.h | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/libavcodec/flacdsp.h b/libavcodec/flacdsp.h
> index 7bb0dd0e9a..90fd3f04b5 100644
> --- a/libavcodec/flacdsp.h
> +++ b/libavcodec/flacdsp.h
> @@ -30,6 +30,14 @@ typedef struct FLACDSPContext {
>                    int qlevel, int len);
>      void (*lpc32)(int32_t *samples, const int coeffs[32], int order,
>                    int qlevel, int len);
> +
> +    /**
> +     * These encoder functions support a maximum order of 32.
> +     *
> +     * This limit is used:
> +     * - when CONFIG_SMALL is 0 to unroll a loop in the C template.
> +     * - when SSE4 (or newer) is available on x86 to unroll a copy loop.
> +     */
>      void (*lpc16_encode)(int32_t *res, const int32_t *smp, int len, int
> order,
>                           const int32_t coefs[32], int shift);
>      void (*lpc32_encode)(int32_t *res, const int32_t *smp, int len, int
> order,
> --
> 2.15.0
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>

lgtm, should have just pushed
diff mbox

Patch

diff --git a/libavcodec/flacdsp.h b/libavcodec/flacdsp.h
index 7bb0dd0e9a..90fd3f04b5 100644
--- a/libavcodec/flacdsp.h
+++ b/libavcodec/flacdsp.h
@@ -30,6 +30,14 @@  typedef struct FLACDSPContext {
                   int qlevel, int len);
     void (*lpc32)(int32_t *samples, const int coeffs[32], int order,
                   int qlevel, int len);
+
+    /**
+     * These encoder functions support a maximum order of 32.
+     *
+     * This limit is used:
+     * - when CONFIG_SMALL is 0 to unroll a loop in the C template.
+     * - when SSE4 (or newer) is available on x86 to unroll a copy loop.
+     */
     void (*lpc16_encode)(int32_t *res, const int32_t *smp, int len, int order,
                          const int32_t coefs[32], int shift);
     void (*lpc32_encode)(int32_t *res, const int32_t *smp, int len, int order,