1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-04-19 09:02:26 +02:00

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@pkh.me>
This commit is contained in:
Clément Bœsch 2017-04-01 12:12:42 +02:00
commit f047da4ebe

View File

@ -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"
@ -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;