[FFmpeg-devel] remove int readers

Michael Niedermayer michaelni
Sat Jun 23 12:16:59 CEST 2007


Hi

On Fri, Jun 22, 2007 at 10:08:58PM -0400, Ronald S. Bultje wrote:
> Hi,
> 
> On 6/22/07, Ramiro Ribeiro Polla <ramiro at lisha.ufsc.br> wrote:
> >
> >It no longer applies. Could you send an updated patch?
> >And please svn diff it from the source folder.
> 
> 
> I think it's common to use a source-folder patch (i.e. one that is applied
> with -p1 from the source folder)? At least that is kernel-style... Anyone
> else wants me to switch to -p0 (does anyone really care?)?
> 
> New patch with get_bits_long for oggparsetheora, removed the (offset) cast
> in ffm.c attached. I left the get_pts() in the mpeg reader as-is, if
> everyone hates it I'll change it...
[...]
> @@ -694,15 +694,9 @@
>  
>  static int64_t get_pts(const uint8_t *p)
>  {
> -    int64_t pts;
> -    int val;
> -
> -    pts = (int64_t)((p[0] >> 1) & 0x07) << 30;
> -    val = (p[1] << 8) | p[2];
> -    pts |= (int64_t)(val >> 1) << 15;
> -    val = (p[3] << 8) | p[4];
> -    pts |= (int64_t)(val >> 1);
> -    return pts;
> +    return ((int64_t)((p[0] >> 1) & 0x07)   << 30) |
> +                     ((AV_RB16(p + 1) >> 1) << 15) |
> +                      (AV_RB16(p + 3) >> 1);
>  }

i see


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

Complexity theory is the science of finding the exact solution to an
approximation. Benchmarking OTOH is finding an approximation of the exact
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070623/5b91275b/attachment.pgp>



More information about the ffmpeg-devel mailing list