]> git.sesse.net Git - ffmpeg/commitdiff
Merge remote-tracking branch 'qatar/master'
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 9 Jan 2013 11:30:14 +0000 (12:30 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 9 Jan 2013 11:30:14 +0000 (12:30 +0100)
* qatar/master:
  xan: Convert to bytestream2
  oggenc: add a page_duration option and deprecate the pagesize option
  x86: lavr: add SSE2/AVX dither_int_to_float()

Conflicts:
libavcodec/xan.c
libavformat/oggenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
doc/muxers.texi
libavcodec/xan.c
libavformat/oggenc.c
libavresample/x86/dither.asm
libavresample/x86/dither_init.c

diff --cc doc/muxers.texi
Simple merge
index 3a559e929ba112255dc8dc61e66f0fec154a71ed,a1671e1cc59bbdf7227edf1de877acd56ca74253..219eedd92dccc7a6101faacc9526d5eed7dfb5bf
@@@ -526,13 -511,9 +530,13 @@@ static int xan_decode_frame(AVCodecCont
          uint32_t new_pal;
          int size;
          int i;
-         tag  = bytestream_get_le32(&buf);
-         size = bytestream_get_be32(&buf);
+         tag  = bytestream2_get_le32(&ctx);
+         size = bytestream2_get_be32(&ctx);
 +        if(size < 0) {
 +            av_log(avctx, AV_LOG_ERROR, "Invalid tag size %d\n", size);
 +            return AVERROR_INVALIDDATA;
 +        }
-         size = FFMIN(size, buf_end - buf);
+         size = FFMIN(size, bytestream2_get_bytes_left(&ctx));
          switch (tag) {
          case PALT_TAG:
              if (size < PALETTE_SIZE)
              tmpptr += s->palettes_count * AVPALETTE_COUNT;
              for (i = 0; i < PALETTE_COUNT; i++) {
  #if RUNTIME_GAMMA
-                 int r = gamma_corr(*buf++);
-                 int g = gamma_corr(*buf++);
-                 int b = gamma_corr(*buf++);
+                 int r = gamma_corr(bytestream2_get_byteu(&ctx));
+                 int g = gamma_corr(bytestream2_get_byteu(&ctx));
+                 int b = gamma_corr(bytestream2_get_byteu(&ctx));
  #else
-                 int r = gamma_lookup[*buf++];
-                 int g = gamma_lookup[*buf++];
-                 int b = gamma_lookup[*buf++];
+                 int r = gamma_lookup[bytestream2_get_byteu(&ctx)];
+                 int g = gamma_lookup[bytestream2_get_byteu(&ctx)];
+                 int b = gamma_lookup[bytestream2_get_byteu(&ctx)];
  #endif
 -                *tmpptr++ = (r << 16) | (g << 8) | b;
 +                *tmpptr++ = (0xFFU << 24) | (r << 16) | (g << 8) | b;
              }
              s->palettes_count++;
              break;
index 2ff6704698bbb03a692792e0a47714311c89e6ad,6212d16373bfb2a7f1161f10a3cff9047f861c67..31e28413e91dadf2f7dde67265a63ad35aa1f2e5
@@@ -74,10 -75,10 +76,12 @@@ typedef struct 
  #define PARAM AV_OPT_FLAG_ENCODING_PARAM
  
  static const AVOption options[] = {
-     { "pagesize", "preferred page size in bytes",
 +    { "oggpagesize", "Set preferred Ogg page size.",
 +      offsetof(OGGContext, pref_size), AV_OPT_TYPE_INT, {.i64 = 0}, 0, MAX_PAGE_SIZE, AV_OPT_FLAG_ENCODING_PARAM},
+     { "pagesize", "preferred page size in bytes (deprecated)",
          OFFSET(pref_size), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, MAX_PAGE_SIZE, PARAM },
+     { "page_duration", "preferred page duration, in microseconds",
+         OFFSET(pref_duration), AV_OPT_TYPE_INT, { .i64 = 1000000 }, 0, INT64_MAX, PARAM },
      { NULL },
  };
  
Simple merge
Simple merge