[FFmpeg-devel] hqx codec patch: faster decode with multi threaded decoding of slices; fixed clipping bug

James Almer jamrial at gmail.com
Wed Apr 8 01:42:34 CEST 2015


On 07/04/15 10:49 AM, Ferdinand Oeinck wrote:
> From 77116c82d128cb7efcdf5f55481fa5f349c31f22 Mon Sep 17 00:00:00 2001
> From: fo <ferdo at bigroses.nl>
> Date: Tue, 7 Apr 2015 12:42:17 +0200
> Subject: [PATCH 2/2] libavcodec/hqx: correct clipping error
> 
> ---
> libavcodec/hqx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/hqx.c b/libavcodec/hqx.c
> index ee851ed..ecaba98 100644
> --- a/libavcodec/hqx.c
> +++ b/libavcodec/hqx.c
> @@ -182,7 +182,7 @@ static void hqx_idct_put(uint16_t *dst, ptrdiff_t stride,
> 
>     for (i = 0; i < 8; i++) {
>         for (j = 0; j < 8; j++) {
> -            int v = av_clip(block[j + i * 8] + 0x800, 0, 0x1000);
> +            int v = av_clip(block[j + i * 8] + 0x800, 0, 0xFFF);
>             dst[j] = (v << 4) | (v >> 8);
>         }
>         dst += stride >> 1;
> -- 
> 2.3.4

If you want to put more than one patch in a single email then please attach them instead 
of inlining them all together in the body.

Nonetheless, keep in mind using git send-email is still preferred over attached patches, 
so use that if possible.


More information about the ffmpeg-devel mailing list