OSDN Git Service

Merge remote branch 'qatar/master'
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 14 May 2011 00:19:23 +0000 (02:19 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 14 May 2011 00:19:58 +0000 (02:19 +0200)
* qatar/master:
  swscale: properly inline bits/endianness in yuv2yuvX16inC().
(We didnt pull the bug)  swscale: fix clipping of 9/10bit YUV420P.
  Add av_clip_uintp2() function
(our patch / duplicate)  dfa: fix buffer overflow checks to avoid integer overflows.
(our patch / duplicate)  movenc: always write esds descriptor length using 4 bytes.
(our patch / duplicate)  ffmpeg: use parse_number_and_die() when it makes sense
(No thanks)  ffmpeg: get rid of the 'q' key schizofrenia

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/vp8.c
libavutil/common.h
libswscale/swscale.c

Simple merge
Simple merge
@@@ -366,7 -216,22 +366,21 @@@ static av_always_inline void yuv2yuvX16
  {
      //FIXME Optimize (just quickly written not optimized..)
      int i;
 -    int shift = 11 + 16 - output_bits;
  
+ #define output_pixel(pos, val) \
+     if (big_endian) { \
+         if (output_bits == 16) { \
+             AV_WB16(pos, av_clip_uint16(val >> shift)); \
+         } else { \
+             AV_WB16(pos, av_clip_uintp2(val >> shift, output_bits)); \
+         } \
+     } else { \
+         if (output_bits == 16) { \
+             AV_WL16(pos, av_clip_uint16(val >> shift)); \
+         } else { \
+             AV_WL16(pos, av_clip_uintp2(val >> shift, output_bits)); \
+         } \
+     }
      for (i = 0; i < dstW; i++) {
          int val = 1 << 10;
          int j;