[FFmpeg-devel] [patch] - fixes a few prores 4444 samples

Michael Niedermayer michaelni at gmx.at
Tue Sep 20 06:30:17 CEST 2011


On Tue, Sep 20, 2011 at 01:08:47AM +0200, Jonne Ahner wrote:
[...]
> @@ -447,6 +449,35 @@ static void decode_slice_chroma(AVCodecContext *avctx, SliceContext *slice,
>      }
>  }
>  
> +static void decode_slice_chroma444(AVCodecContext *avctx, SliceContext *slice,
> +                              uint8_t *dst, int dst_stride,
> +                              const uint8_t *buf, unsigned buf_size,
> +                              const int *qmat)
> +{
> +    ProresContext *ctx = avctx->priv_data;
> +    LOCAL_ALIGNED_16(DCTELEM, blocks, [8*4*64]);
> +    DCTELEM *block;
> +    GetBitContext gb;
> +    int i, blocks_per_slice = slice->mb_count<<2;
> +
> +    for (i = 0; i < blocks_per_slice; i++)
> +        ctx->dsp.clear_block(blocks+(i<<6));
> +
> +    init_get_bits(&gb, buf, buf_size << 3);
> +
> +    decode_dc_coeffs(&gb, blocks, blocks_per_slice, qmat);
> +    decode_ac_coeffs(avctx, &gb, blocks, blocks_per_slice, qmat);
> +
> +    block = blocks;
> +    for (i = 0; i < slice->mb_count; i++) {
> +        ctx->idct_put(block+(0<<6), dst, dst_stride);
> +        ctx->idct_put(block+(2<<6), dst+16, dst_stride);
> +        ctx->idct_put(block+(1<<6), dst+8*dst_stride, dst_stride);
> +        ctx->idct_put(block+(3<<6), dst+8*dst_stride+16, dst_stride);
> +        block += 4*64;
> +        dst += 32;
> +    }
> +}

this can be merged with teh 422 code

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110920/7917a43b/attachment.asc>


More information about the ffmpeg-devel mailing list