On Sun, Nov 27, 2011 at 11:56:18PM -0800, Thad Ward wrote:
> The attached patch adds support for lagarith's FRAME_ARITH_RGB24 frame type. 
> As the decoding method is mostly identical to the RGBA frame type, I made 
> that code path handle both.
> 
> 
> Also, how does one get samples added to the fate test sample set? I've been 
> creating tests for lagarith's various frame types.
> 
> Thad Ward

> diff --git a/libavcodec/lagarith.c b/libavcodec/lagarith.c
> index 1aa9ec3..0595d57 100644
> --- a/libavcodec/lagarith.c
> +++ b/libavcodec/lagarith.c
> @@ -447,7 +447,7 @@ static int lag_decode_frame(AVCodecContext *avctx,
>      uint32_t offset_gu = 0, offset_bv = 0, offset_ry = 9;
>      int offs[4];
>      uint8_t *srcs[4], *dst;
> -    int i, j;
> +    int i, j, planes;
>  
>      AVFrame *picture = data;
>  
> @@ -479,7 +479,17 @@ static int lag_decode_frame(AVCodecContext *avctx,
>          }
>          break;
>      case FRAME_ARITH_RGBA:
> -        avctx->pix_fmt = PIX_FMT_RGB32;
> +    case FRAME_ARITH_RGB24:
> +        if (FRAME_ARITH_RGB24 == frametype) {
> +            avctx->pix_fmt = PIX_FMT_RGB24;
> +            planes = 3;
> +            offs[2] = 9;
> +        } else if(FRAME_ARITH_RGBA == frametype) {
                    ^ please add a space here

And it would be nice to have conditions in form
    if (frametype == FRAME_ARITH...)

Beside that patch looks nice.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to