[FFmpeg-devel] openjpeg: 12bits JP2 file (16bits support + patch)

Baptiste Coudurier baptiste.coudurier
Wed Feb 11 19:15:29 CET 2009


Hi,

On 2/11/2009 5:50 AM, Mathieu Malaterre wrote:
> [...]
>

Some nipticks:

> @@ -114,7 +115,11 @@
>  
>      switch(image->numcomps)
>      {
> -        case 1:  avctx->pix_fmt = PIX_FMT_GRAY8;
> +        case 1:  if( image->comps[0].prec <= 8) avctx->pix_fmt = PIX_FMT_GRAY8;
> +                 else if( image->comps[0].prec <= 16) avctx->pix_fmt = PIX_FMT_GRAY16LE;
> +                 //else if( image->comps[0].prec <= 32) avctx->pix_fmt = PIX_FMT_GRAY32;

Space after '('

> +                 else av_log(avctx, AV_LOG_ERROR, "%d components prec unsupported.\n", image->comps[0].prec );

Space before ')'

> +                 assert( image->comps[0].sgnd == 0 );

Space after '(' and before ')'

>                   break;
>          case 3:  if(check_image_attributes(image)) {
>                       avctx->pix_fmt = PIX_FMT_RGB24;
> @@ -145,8 +150,13 @@
>      for(y = 0; y < height; y++) {
>          index = y*width;
>          img_ptr = picture->data[0] + y*picture->linesize[0];
> +        img_ptr16 = picture->data[0] + y*picture->linesize[0];
>          for(x = 0; x < width; x++, index++) {
> -            *img_ptr++ = image->comps[0].data[index] >> adjust[0];
> +            if( avctx->pix_fmt == PIX_FMT_GRAY8 )

Ditto.

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
checking for life_signs in -lkenny... no
FFmpeg maintainer                                  http://www.ffmpeg.org




More information about the ffmpeg-devel mailing list