[FFmpeg-cvslog] Merge commit '3cc3463f306f425f76bd962755df1132eeac6dfa'

Clément Bœsch git at videolan.org
Sat Apr 1 13:17:05 EEST 2017


ffmpeg | branch: master | Clément Bœsch <u at pkh.me> | Sat Apr  1 12:12:42 2017 +0200| [f047da4ebe418f95a46b00d38b45e1daf858ec52] | committer: Clément Bœsch

Merge commit '3cc3463f306f425f76bd962755df1132eeac6dfa'

* commit '3cc3463f306f425f76bd962755df1132eeac6dfa':
  avisynth: Support pix_fmts added to AviSynth+

This commit is mostly a noop, see
92916e8542e425ca20daddb490261a5818643206.

Cosmetics and a small fix are merged.

Merged-by: Clément Bœsch <u at pkh.me>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f047da4ebe418f95a46b00d38b45e1daf858ec52
---

 libavformat/avisynth.c | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c
index 6d47571..5670028 100644
--- a/libavformat/avisynth.c
+++ b/libavformat/avisynth.c
@@ -3,6 +3,7 @@
  * Copyright (c) 2012 AvxSynth Team
  *
  * This file is part of FFmpeg
+ *
  * FFmpeg is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
@@ -18,8 +19,11 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "libavutil/attributes.h"
 #include "libavutil/internal.h"
+
 #include "libavcodec/internal.h"
+
 #include "avformat.h"
 #include "internal.h"
 #include "config.h"
@@ -245,7 +249,7 @@ static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st)
 
     switch (avs->vi->pixel_type) {
 #ifdef USING_AVISYNTH
-/* 10~16-bit YUV pix_fmts (AviSynth+) */
+    /* 10~16-bit YUV pix_fmts (AviSynth+) */
     case AVS_CS_YUV444P10:
         st->codecpar->format = AV_PIX_FMT_YUV444P10;
         planar               = 1;
@@ -294,7 +298,7 @@ static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st)
         st->codecpar->format = AV_PIX_FMT_YUV420P16;
         planar               = 1;
         break;
-/* 8~16-bit YUV pix_fmts with Alpha (AviSynth+) */
+    /* 8~16-bit YUV pix_fmts with Alpha (AviSynth+) */
     case AVS_CS_YUVA444:
         st->codecpar->format = AV_PIX_FMT_YUVA444P;
         planar               = 4;
@@ -331,7 +335,7 @@ static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st)
         st->codecpar->format = AV_PIX_FMT_YUVA420P16;
         planar               = 4;
         break;
-/* Planar RGB pix_fmts (AviSynth+)  */
+    /* Planar RGB pix_fmts (AviSynth+) */
     case AVS_CS_RGBP:
         st->codecpar->format = AV_PIX_FMT_GBRP;
         planar               = 3;
@@ -352,7 +356,7 @@ static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st)
         st->codecpar->format = AV_PIX_FMT_GBRP16;
         planar               = 3;
         break;
-/* Planar RGB pix_fmts with Alpha (AviSynth+) */
+    /* Planar RGB pix_fmts with Alpha (AviSynth+) */
     case AVS_CS_RGBAP:
         st->codecpar->format = AV_PIX_FMT_GBRAP;
         planar               = 5;
@@ -369,12 +373,12 @@ static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st)
         st->codecpar->format = AV_PIX_FMT_GBRAP16;
         planar               = 5;
         break;
-/* GRAY16 (AviSynth+) */
+    /* GRAY16 (AviSynth+) */
     case AVS_CS_Y16:
         st->codecpar->format = AV_PIX_FMT_GRAY16;
         planar               = 2;
         break;
-/* pix_fmts added in AviSynth 2.6 */
+    /* pix_fmts added in AviSynth 2.6 */
     case AVS_CS_YV24:
         st->codecpar->format = AV_PIX_FMT_YUV444P;
         planar               = 1;
@@ -391,7 +395,7 @@ static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st)
         st->codecpar->format = AV_PIX_FMT_GRAY8;
         planar               = 2;
         break;
-/* 16-bit packed RGB pix_fmts (AviSynth+) */
+    /* 16-bit packed RGB pix_fmts (AviSynth+) */
     case AVS_CS_BGR48:
         st->codecpar->format = AV_PIX_FMT_BGR48;
         break;
@@ -399,7 +403,7 @@ static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st)
         st->codecpar->format = AV_PIX_FMT_BGRA64;
         break;
 #endif
-/* AviSynth 2.5 and AvxSynth pix_fmts */
+    /* AviSynth 2.5 and AvxSynth pix_fmts */
     case AVS_CS_BGR24:
         st->codecpar->format = AV_PIX_FMT_BGR24;
         break;
@@ -606,6 +610,7 @@ static int avisynth_read_packet_video(AVFormatContext *s, AVPacket *pkt,
     const unsigned char *src_p;
     int n, i, plane, rowsize, planeheight, pitch, bits;
     const char *error;
+    int avsplus av_unused;
 
     if (avs->curr_frame >= avs->vi->num_frames)
         return AVERROR_EOF;
@@ -618,9 +623,6 @@ static int avisynth_read_packet_video(AVFormatContext *s, AVPacket *pkt,
 #ifdef USING_AVISYNTH
     /* Detect whether we're using AviSynth 2.6 or AviSynth+ by
      * looking for whether avs_is_planar_rgb exists. */
-
-    int avsplus;
-
     if (GetProcAddress(avs_library.library, "avs_is_planar_rgb") == NULL)
         avsplus = 0;
     else
@@ -683,7 +685,7 @@ static int avisynth_read_packet_video(AVFormatContext *s, AVPacket *pkt,
         }
 
 #ifdef USING_AVISYNTH
-        /* Flip Planar RGB video. */
+        /* Flip Planar RGB video */
         if (avsplus && (avs_library.avs_is_planar_rgb(avs->vi) ||
                         avs_library.avs_is_planar_rgba(avs->vi))) {
             src_p = src_p + (planeheight - 1) * pitch;


======================================================================

diff --cc libavformat/avisynth.c
index 6d47571,fd5f323..5670028
--- a/libavformat/avisynth.c
+++ b/libavformat/avisynth.c
@@@ -2,8 -2,9 +2,9 @@@
   * AviSynth/AvxSynth support
   * Copyright (c) 2012 AvxSynth Team
   *
 - * This file is part of Libav.
 + * This file is part of FFmpeg
+  *
 - * Libav is free software; you can redistribute it and/or
 + * FFmpeg is free software; you can redistribute it and/or
   * modify it under the terms of the GNU Lesser General Public
   * License as published by the Free Software Foundation; either
   * version 2.1 of the License, or (at your option) any later version.



More information about the ffmpeg-cvslog mailing list