[FFmpeg-devel] [PATCH] Bitstream filter DTS from any format to 14bit format.

Bartlomiej Wolowiec bartek.wolowiec
Wed Aug 5 12:13:36 CEST 2009


Tuesday 04 August 2009 22:29:55 M?ns Rullg?rd napisa?(a):
> Bartlomiej Wolowiec <bartek.wolowiec at gmail.com> writes:
> > Hi,
> > Here is a small bitstream filter, which may be useful for someone.
> > --
> > Bartlomiej Wolowiec
>
> [...]
> > +
> > +    *poutbuf_size = ((dca_buffer_size + 13) / 14) << 4;
> > +    *poutbuf = av_malloc(*poutbuf_size + FF_INPUT_BUFFER_PADDING_SIZE);
> > +    pout = (uint16_t *) * poutbuf;
>
> Doesn't gcc complain about strict aliasing violations here?

Hmm... gcc-4.3.2 and gcc-4.1.2 with -Wstrict-aliasing=2 don't show any 
warnings. Any suggestions ?

> > +
> > +    while (((uint8_t *) pout - *poutbuf) & 7)
> > +        *(pout++) = 0;
>
> What's all this padding for?

New packet should start at first bit of byte, but also should start at first 
bit of 14bits word.

-- 
Bartlomiej Wolowiec
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch2
Type: text/x-diff
Size: 3764 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090805/7f0a60ec/attachment.diff>



More information about the ffmpeg-devel mailing list