On 03/12/13 00:16, Anton Khirnov wrote:
> +    av_pix_fmt_get_chroma_sub_sample(avctx->pix_fmt, &chroma_h_shift,
> +                                     &chroma_v_shift);
> +
> +    if (avctx->codec->id == AV_CODEC_ID_LJPEG &&
> +        avctx->pix_fmt   == AV_PIX_FMT_BGRA) {
> +        vsample[0] = hsample[0] =
> +        vsample[1] = hsample[1] =
> +        vsample[2] = hsample[2] = 1;
> +    } else {
> +        vsample[0] = 2;
> +        vsample[1] = 2 >> chroma_v_shift;
> +        vsample[2] = 2 >> chroma_v_shift;
> +        hsample[0] = 2;
> +        hsample[1] = 2 >> chroma_h_shift;
> +        hsample[2] = 2 >> chroma_h_shift;
> +    }
>  

This chunk would enjoy a line or two in the commit message.

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

Reply via email to