On Mon, Oct 03, 2011 at 11:37:37AM -0700, Ronald S. Bultje wrote:
> From: "Ronald S. Bultje" <[email protected]>
> 
> ~50% decoding speedup (overall) with 4 threads.

please remember to update the commit message

> ---
>  libavcodec/proresdec.c |   71 +++++++++++++++++++++++++++++------------------
>  1 files changed, 44 insertions(+), 27 deletions(-)
> 
> diff --git a/libavcodec/proresdec.c b/libavcodec/proresdec.c
> index fed8bf0..25338da 100644
> --- a/libavcodec/proresdec.c
> +++ b/libavcodec/proresdec.c
> @@ -38,6 +38,14 @@
>  #include "get_bits.h"
>  
>  typedef struct {
> +    const uint8_t *index;            ///< array of pointers to the data of 
> each slice

pointer to the data of this slice

> +    int slice_num;
> +    int x_pos, y_pos;
> +    int slice_width;
> +    DECLARE_ALIGNED(16, DCTELEM, blocks[8 * 4 * 64]);
> +} ProresThreadData;
> +
> +typedef struct {
>      ProresDSPContext dsp;
>      AVFrame    picture;
>      ScanTable  scantable;
> @@ -51,9 +59,9 @@ typedef struct {
>      int        prev_slice_sf;            ///< scalefactor of the previous 
> decoded slice
>      DECLARE_ALIGNED(16, int16_t, qmat_luma_scaled[64]);
>      DECLARE_ALIGNED(16, int16_t, qmat_chroma_scaled[64]);
> -    DECLARE_ALIGNED(16, DCTELEM, blocks[8 * 4 * 64]);
>      int        total_slices;            ///< total number of slices in a 
> picture
> -    const uint8_t **slice_data_index;   ///< array of pointers to the data 
> of each slice
> +    ProresThreadData *slice_data;
> +    int        pic_num;
>      int        chroma_factor;
>      int        mb_chroma_factor;
>      int        num_chroma_blocks;       ///< number of chrominance blocks in 
> a macroblock
> @@ -94,7 +102,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
>      ProresContext *ctx = avctx->priv_data;
>  
>      ctx->total_slices     = 0;
> -    ctx->slice_data_index = 0;
> +    ctx->slice_data       = 0;

nit: NULL

otherwise ok

Janne
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to