[FFmpeg-devel] [PATCH] pixdesc.h: add support for bitstream formats

Michael Niedermayer michaelni
Tue Mar 31 23:23:36 CEST 2009


On Tue, Mar 31, 2009 at 10:32:10PM +0200, Stefano Sabatini wrote:
> Hi, as in subject.
> 
> Summary:
> 

> * pixdesc-read-line-cosmetics.patch
>   Spaces are beautiful, but Michael may disagree so this is my second
>   and last attempt to try to push it, so I won't have to update the
>   other patches accordingly.

i will not accept this


> 
> * pixdesc-define-step-offset-for-bitstream.patch
>   Make the step and offset express a number of bits for bitstreams formats.

ok


[...]
> * pixdesc-read-line-indent.patch
>   Reindent after the previous patch.

you dont have to post indent fixup patches ...

[...]

> Index: libavfilter-soc/ffmpeg/libavcodec/pixdesc.h
> ===================================================================
> --- libavfilter-soc.orig/ffmpeg/libavcodec/pixdesc.h	2009-03-31 21:43:24.000000000 +0200
> +++ libavfilter-soc/ffmpeg/libavcodec/pixdesc.h	2009-03-31 21:45:32.000000000 +0200
> @@ -22,6 +22,7 @@
>  #include <inttypes.h>
>  
>  #include "libavutil/intreadwrite.h"
> +#include "libavcodec/bitstream.h"
>  
>  typedef struct AVComponentDescriptor{
>      uint16_t plane        :2;            ///< which of the 4 planes contains the component
> @@ -104,10 +105,21 @@
>      int shift= comp.shift;
>      int step = comp.step_minus1+1;
>      int flags= desc->flags;
> -    const uint8_t *p= data[plane]+y*linesize[plane] + x * step + comp.offset_plus1 - 1;
> -
> -    //FIXME initial x in case of PIX_FMT_BITSTREAM is wrong
>  
> +    if (flags & PIX_FMT_BITSTREAM) {
> +        GetBitContext gb;
> +        init_get_bits(&gb, data[plane] + y*linesize[plane], linesize[plane]*8);
> +        skip_bits(&gb, x*step + comp.offset_plus1-1);

skip_bits_long()

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

GMX, the mailprovider that uses RBL lists to reject mails from your friends
running their own mailserver at home. The mailprovider that obscures the
origin of mails (mis)identified as viruses. The mailprovider that improves
security my disallowing more secure forms of authentication.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090331/80c8d875/attachment.pgp>



More information about the ffmpeg-devel mailing list