提交 466fef5d 编写于 作者: M Matt Oliver

Merge remote-tracking branch 'upstream/master'

......@@ -8,7 +8,7 @@ version <next>:
- showwavespic filter
- DTS decoding through libdcadec
- Drop support for nvenc API before 5.0
- nvenc H265 encoder
- nvenc HEVC encoder
- Detelecine filter
- Intel QSV-accelerated H.264 encoding
- MMAL-accelerated H.264 decoding
......
......@@ -269,7 +269,7 @@ External library support:
--disable-lzma disable lzma [autodetect]
--enable-decklink enable Blackmagick DeckLink I/O support [no]
--enable-mmal enable decoding via MMAL [no]
--enable-nvenc enable encoding via NVENC [no]
--enable-nvenc enable NVIDIA NVENC support [no]
--enable-openal enable OpenAL 1.1 capture support [no]
--enable-opencl enable OpenCL code
--enable-opengl enable OpenGL rendering [no]
......@@ -1673,7 +1673,6 @@ HEADERS_LIST="
asm_types_h
cdio_paranoia_h
cdio_paranoia_paranoia_h
cuda_h
dev_bktr_ioctl_bt848_h
dev_bktr_ioctl_meteor_h
dev_ic_bt8xx_h
......@@ -1772,7 +1771,6 @@ SYSTEM_FUNCS="
isatty
jack_port_get_latency_range
kbhit
LoadLibrary
localtime_r
lzo1x_999_compress
mach_absolute_time
......@@ -2116,8 +2114,6 @@ mpegaudio_select="mpegaudiodsp"
mpegaudiodsp_select="dct"
mpegvideo_select="blockdsp h264chroma hpeldsp idctdsp me_cmp videodsp"
mpegvideoenc_select="me_cmp mpegvideo pixblockdsp qpeldsp"
nvenc_deps_any="dlopen LoadLibrary"
nvenc_extralibs='$ldl'
qsvdec_select="qsv"
qsvenc_select="qsv"
......@@ -2195,13 +2191,11 @@ h263p_decoder_select="h263_decoder"
h263p_encoder_select="h263_encoder"
h264_decoder_select="cabac golomb h264chroma h264dsp h264pred h264qpel startcode videodsp"
h264_decoder_suggest="error_resilience"
h264_nvenc_encoder_deps="nvenc cuda_h"
h264_qsv_decoder_deps="libmfx"
h264_qsv_decoder_select="h264_mp4toannexb_bsf h264_parser qsvdec h264_qsv_hwaccel"
h264_qsv_encoder_deps="libmfx"
h264_qsv_encoder_select="qsvenc"
hevc_decoder_select="bswapdsp cabac golomb videodsp"
hevc_nvenc_encoder_deps="nvenc cuda_h"
huffyuv_decoder_select="bswapdsp huffyuvdsp llviddsp"
huffyuv_encoder_select="bswapdsp huffman huffyuvencdsp llviddsp"
iac_decoder_select="imc_decoder"
......@@ -2491,7 +2485,8 @@ libutvideo_decoder_deps="libutvideo"
libutvideo_encoder_deps="libutvideo"
libzvbi_teletext_decoder_deps="libzvbi"
nvenc_encoder_deps="nvenc"
nvenc_h265_encoder_deps="nvenc"
nvenc_h264_encoder_deps="nvenc"
nvenc_hevc_encoder_deps="nvenc"
# demuxers / muxers
ac3_demuxer_select="ac3_parser"
......@@ -4943,6 +4938,8 @@ check_builtin machine_rw_barrier mbarrier.h "__machine_rw_barrier()"
check_builtin MemoryBarrier windows.h "MemoryBarrier()"
check_builtin sarestart signal.h "SA_RESTART"
check_builtin sync_val_compare_and_swap "" "int *ptr; int oldval, newval; __sync_val_compare_and_swap(ptr, oldval, newval)"
check_builtin gmtime_r time.h "time_t *time; struct tm *tm; gmtime_r(time, tm)"
check_builtin localtime_r time.h "time_t *time; struct tm *tm; localtime_r(time, tm)"
check_func_headers malloc.h _aligned_malloc && enable aligned_malloc
check_func ${malloc_prefix}memalign && enable memalign
......@@ -4956,9 +4953,7 @@ check_func gethrtime
check_func getopt
check_func getrusage
check_func gettimeofday
check_func gmtime_r
check_func isatty
check_func localtime_r
check_func mach_absolute_time
check_func mkstemp
check_func mmap
......@@ -4982,7 +4977,6 @@ check_func_headers windows.h CoTaskMemFree -lole32
check_func_headers windows.h GetProcessAffinityMask
check_func_headers windows.h GetProcessTimes
check_func_headers windows.h GetSystemTimeAsFileTime
check_func_headers windows.h LoadLibrary
check_func_headers windows.h MapViewOfFile
check_func_headers windows.h PeekNamedPipe
check_func_headers windows.h SetConsoleTextAttribute
......@@ -4993,7 +4987,6 @@ check_func_headers glob.h glob
enabled xlib &&
check_func_headers "X11/Xlib.h X11/extensions/Xvlib.h" XvGetPortAttribute -lXv -lX11 -lXext
check_header cuda.h
check_header direct.h
check_header dlfcn.h
check_header d3d11.h
......@@ -5181,6 +5174,10 @@ enabled mmal && { check_lib interface/mmal/mmal.h mmal_port_connect
check_lib interface/mmal/mmal.h mmal_port_connect ; }
check_lib interface/mmal/mmal.h mmal_port_connect ; } ||
die "ERROR: mmal not found"; }
enabled nvenc && { check_header nvEncodeAPI.h || die "ERROR: nvEncodeAPI.h not found."; } &&
{ check_cpp_condition nvEncodeAPI.h "NVENCAPI_MAJOR_VERSION >= 5" ||
die "ERROR: NVENC API version 4 or older is not supported"; } &&
{ [ $target_os != cygwin ] || die "ERROR: NVENC is not supported on Cygwin currently."; }
enabled openal && { { for al_libs in "${OPENAL_LIBS}" "-lopenal" "-lOpenAL32"; do
check_lib 'AL/al.h' alGetError "${al_libs}" && break; done } ||
die "ERROR: openal not found"; } &&
......@@ -5217,14 +5214,6 @@ if enabled libdc1394; then
enable libdc1394_1; } ||
die "ERROR: No version of libdc1394 found "
fi
if enabled nvenc; then
check_header nvEncodeAPI.h || die "ERROR: nvEncodeAPI.h not found.";
check_cpp_condition nvEncodeAPI.h "NVENCAPI_MAJOR_VERSION >= 5" ||
die "ERROR: NVENC API version 4 or older is not supported";
{ [ $target_os != cygwin ] || die "ERROR: NVENC is not supported on Cygwin currently."; }
fi
if ! disabled sdl; then
SDL_CONFIG="${cross_prefix}sdl-config"
if check_pkg_config sdl SDL_events.h SDL_PollEvent; then
......
......@@ -1204,6 +1204,10 @@ static FFServerIPAddressACL* parse_dynamic_acl(FFServerStream *stream,
}
acl = av_mallocz(sizeof(FFServerIPAddressACL));
if (!acl) {
fclose(f);
return NULL;
}
/* Build ACL */
while (fgets(line, sizeof(line), f)) {
......@@ -2061,7 +2065,13 @@ static int open_input_stream(HTTPContext *c, const char *info)
}
/* set buffer size */
if (buf_size > 0) ffio_set_buf_size(s->pb, buf_size);
if (buf_size > 0) {
ret = ffio_set_buf_size(s->pb, buf_size);
if (ret < 0) {
http_log("Failed to set buffer size\n");
return ret;
}
}
s->flags |= AVFMT_FLAG_GENPTS;
c->fmt_in = s;
......@@ -2123,15 +2133,20 @@ static int http_prepare_data(HTTPContext *c)
switch(c->state) {
case HTTPSTATE_SEND_DATA_HEADER:
ctx = avformat_alloc_context();
if (!ctx)
return AVERROR(ENOMEM);
c->fmt_ctx = *ctx;
av_freep(&ctx);
av_dict_copy(&(c->fmt_ctx.metadata), c->stream->metadata, 0);
c->fmt_ctx.streams = av_mallocz_array(c->stream->nb_streams,
sizeof(AVStream *));
if (!c->fmt_ctx.streams)
return AVERROR(ENOMEM);
for(i=0;i<c->stream->nb_streams;i++) {
AVStream *src;
c->fmt_ctx.streams[i] = av_mallocz(sizeof(AVStream));
/* if file or feed, then just take streams from FFServerStream struct */
if (!c->stream->feed ||
c->stream->feed == c->stream)
......@@ -2853,6 +2868,8 @@ static int prepare_sdp_description(FFServerStream *stream, uint8_t **pbuffer,
avc->streams[i]->codec = stream->streams[i]->codec;
}
*pbuffer = av_mallocz(2048);
if (!*pbuffer)
goto sdp_done;
av_sdp_create(&avc, 1, *pbuffer, 2048);
sdp_done:
......@@ -3369,6 +3386,10 @@ static AVStream *add_av_stream1(FFServerStream *stream,
return NULL;
if (copy) {
fst->codec = avcodec_alloc_context3(codec->codec);
if (!fst->codec) {
av_free(fst);
return NULL;
}
avcodec_copy_context(fst->codec, codec);
} else {
/* live streams must use the actual feed's codec since it may be
......@@ -3580,7 +3601,12 @@ static void build_feed_streams(void)
if (avformat_open_input(&s, feed->feed_filename, NULL, NULL) >= 0) {
/* set buffer size */
ffio_set_buf_size(s->pb, FFM_PACKET_SIZE);
int ret = ffio_set_buf_size(s->pb, FFM_PACKET_SIZE);
if (ret < 0) {
http_log("Failed to set buffer size\n");
exit(1);
}
/* Now see if it matches */
if (s->nb_streams == feed->nb_streams) {
matches = 1;
......@@ -3651,6 +3677,11 @@ static void build_feed_streams(void)
if (avio_check(feed->feed_filename, AVIO_FLAG_WRITE) <= 0) {
AVFormatContext *s = avformat_alloc_context();
if (!s) {
http_log("Failed to allocate context\n");
exit(1);
}
if (feed->readonly) {
http_log("Unable to create feed file '%s' as it is marked readonly\n",
feed->feed_filename);
......
......@@ -92,9 +92,8 @@ OBJS-$(CONFIG_MPEGVIDEO) += mpegvideo.o mpegvideodsp.o rl.o \
OBJS-$(CONFIG_MPEGVIDEOENC) += mpegvideo_enc.o mpeg12data.o \
motion_est.o ratecontrol.o \
mpegvideoencdsp.o
OBJS-$(CONFIG_NVENC) += nvenc_a.o
OBJS-$(CONFIG_NVENC) += nvenc.o
OBJS-$(CONFIG_PIXBLOCKDSP) += pixblockdsp.o
#OBJS-${CONFIG_NVENC} += nvenc_b.o
OBJS-$(CONFIG_QPELDSP) += qpeldsp.o
OBJS-$(CONFIG_QSV) += qsv.o
OBJS-$(CONFIG_QSVDEC) += qsvdec.o
......@@ -276,13 +275,11 @@ OBJS-$(CONFIG_H264_DECODER) += h264.o h264_cabac.o h264_cavlc.o \
h264_refs.o h264_sei.o h264_slice.o
OBJS-$(CONFIG_H264_MMAL_DECODER) += mmaldec.o
OBJS-$(CONFIG_H264_VDA_DECODER) += vda_h264_dec.o
#OBJS-$(CONFIG_H264_NVENC_ENCODER) += nvenc_b_h264.o
OBJS-$(CONFIG_H264_QSV_DECODER) += qsvdec_h264.o
OBJS-$(CONFIG_H264_QSV_ENCODER) += qsvenc_h264.o
OBJS-$(CONFIG_HEVC_DECODER) += hevc.o hevc_mvs.o hevc_ps.o hevc_sei.o \
hevc_cabac.o hevc_refs.o hevcpred.o \
hevcdsp.o hevc_filter.o
#OBJS-$(CONFIG_HEVC_NVENC_ENCODER) += nvenc_b_hevc.o
OBJS-$(CONFIG_HNM4_VIDEO_DECODER) += hnm4video.o
OBJS-$(CONFIG_HQ_HQA_DECODER) += hq_hqa.o hq_hqadata.o hq_hqadsp.o \
canopus.o
......@@ -886,8 +883,6 @@ SKIPHEADERS-$(CONFIG_D3D11VA) += d3d11va.h dxva2_internal.h
SKIPHEADERS-$(CONFIG_DXVA2) += dxva2.h dxva2_internal.h
SKIPHEADERS-$(CONFIG_LIBSCHROEDINGER) += libschroedinger.h
SKIPHEADERS-$(CONFIG_LIBUTVIDEO) += libutvideo.h
SKIPHEADERS-$(CONFIG_H264_NVENC_ENCODER) += nvenc_b.h
SKIPHEADERS-$(CONFIG_HEVC_NVENC_ENCODER) += nvenc_b.h
SKIPHEADERS-$(CONFIG_QSV) += qsv.h qsv_internal.h
SKIPHEADERS-$(CONFIG_QSVDEC) += qsvdec.h
SKIPHEADERS-$(CONFIG_QSVENC) += qsvenc.h
......
......@@ -235,8 +235,6 @@ void avcodec_register_all(void)
REGISTER_DECODER(MVC2, mvc2);
REGISTER_DECODER(MXPEG, mxpeg);
REGISTER_DECODER(NUV, nuv);
REGISTER_ENCODER(NVENC, nvenc);
REGISTER_ENCODER(NVENC_H265, nvenc_h265);
REGISTER_DECODER(PAF_VIDEO, paf_video);
REGISTER_ENCDEC (PAM, pam);
REGISTER_ENCDEC (PBM, pbm);
......@@ -563,9 +561,10 @@ void avcodec_register_all(void)
/* external libraries, that shouldn't be used by default if one of the
* above is available */
REGISTER_ENCODER(LIBOPENH264, libopenh264);
REGISTER_ENCODER(H264_NVENC, h264_nvenc);
REGISTER_ENCODER(H264_QSV, h264_qsv);
REGISTER_ENCODER(HEVC_NVENC, hevc_nvenc);
REGISTER_ENCODER(NVENC, nvenc);
REGISTER_ENCODER(NVENC_H264, nvenc_h264);
REGISTER_ENCODER(NVENC_HEVC, nvenc_hevc);
/* parsers */
REGISTER_PARSER(AAC, aac);
......
......@@ -1010,6 +1010,22 @@ static int decode_header(EXRContext *s)
int current_channel_offset = 0;
int magic_number, version, flags, i;
s->xmin = ~0;
s->xmax = ~0;
s->ymin = ~0;
s->ymax = ~0;
s->xdelta = ~0;
s->ydelta = ~0;
s->channel_offsets[0] = -1;
s->channel_offsets[1] = -1;
s->channel_offsets[2] = -1;
s->channel_offsets[3] = -1;
s->pixel_type = EXR_UNKNOWN;
s->compression = EXR_UNKN;
s->nb_channels = 0;
s->w = 0;
s->h = 0;
if (bytestream2_get_bytes_left(&s->gb) < 10) {
av_log(s->avctx, AV_LOG_ERROR, "Header too short to parse.\n");
return AVERROR_INVALIDDATA;
......@@ -1350,21 +1366,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
float one_gamma = 1.0f / s->gamma;
s->avctx = avctx;
s->xmin = ~0;
s->xmax = ~0;
s->ymin = ~0;
s->ymax = ~0;
s->xdelta = ~0;
s->ydelta = ~0;
s->channel_offsets[0] = -1;
s->channel_offsets[1] = -1;
s->channel_offsets[2] = -1;
s->channel_offsets[3] = -1;
s->pixel_type = EXR_UNKNOWN;
s->compression = EXR_UNKN;
s->nb_channels = 0;
s->w = 0;
s->h = 0;
if (one_gamma > 0.9999f && one_gamma < 1.0001f) {
for (i = 0; i < 65536; ++i)
......
......@@ -1283,16 +1283,17 @@ av_cold int ff_mpv_common_init(MpegEncContext *s)
s->parse_context.state = -1;
s->context_initialized = 1;
memset(s->thread_context, 0, sizeof(s->thread_context));
s->thread_context[0] = s;
// if (s->width && s->height) {
if (nb_slices > 1) {
for (i = 1; i < nb_slices; i++) {
s->thread_context[i] = av_malloc(sizeof(MpegEncContext));
memcpy(s->thread_context[i], s, sizeof(MpegEncContext));
}
for (i = 0; i < nb_slices; i++) {
if (i) {
s->thread_context[i] = av_memdup(s, sizeof(MpegEncContext));
if (!s->thread_context[i])
goto fail;
}
if (init_duplicate_context(s->thread_context[i]) < 0)
goto fail;
s->thread_context[i]->start_mb_y =
......@@ -1410,17 +1411,20 @@ int ff_mpv_common_frame_size_change(MpegEncContext *s)
if ((err = init_context_frame(s)))
goto fail;
memset(s->thread_context, 0, sizeof(s->thread_context));
s->thread_context[0] = s;
if (s->width && s->height) {
int nb_slices = s->slice_context_count;
if (nb_slices > 1) {
for (i = 1; i < nb_slices; i++) {
s->thread_context[i] = av_malloc(sizeof(MpegEncContext));
memcpy(s->thread_context[i], s, sizeof(MpegEncContext));
}
for (i = 0; i < nb_slices; i++) {
if (i) {
s->thread_context[i] = av_memdup(s, sizeof(MpegEncContext));
if (!s->thread_context[i]) {
err = AVERROR(ENOMEM);
goto fail;
}
}
if ((err = init_duplicate_context(s->thread_context[i])) < 0)
goto fail;
s->thread_context[i]->start_mb_y =
......
......@@ -192,7 +192,7 @@ static const NvencValuePair nvenc_h264_level_pairs[] = {
{ NULL }
};
static const NvencValuePair nvenc_h265_level_pairs[] = {
static const NvencValuePair nvenc_hevc_level_pairs[] = {
{ "auto", NV_ENC_LEVEL_AUTOSELECT },
{ "1" , NV_ENC_LEVEL_HEVC_1 },
{ "1.0" , NV_ENC_LEVEL_HEVC_1 },
......@@ -870,7 +870,7 @@ static av_cold int nvenc_encode_init(AVCodecContext *avctx)
avctx->profile = FF_PROFILE_HEVC_MAIN;
if (ctx->level) {
res = input_string_to_uint32(avctx, nvenc_h265_level_pairs, ctx->level, &ctx->encode_config.encodeCodecConfig.hevcConfig.level);
res = input_string_to_uint32(avctx, nvenc_hevc_level_pairs, ctx->level, &ctx->encode_config.encodeCodecConfig.hevcConfig.level);
if (res) {
av_log(avctx, AV_LOG_FATAL, "Level \"%s\" is unknown! Supported levels: auto, 1, 2, 2.1, 3, 3.1, 4, 4.1, 5, 5.1, 5.2, 6, 6.1, 6.2\n", ctx->level);
......@@ -1427,17 +1427,42 @@ AVCodec ff_nvenc_encoder = {
};
#endif
#if CONFIG_NVENC_H265_ENCODER
static const AVClass nvenc_h265_class = {
.class_name = "nvenc_h265",
/* Add an alias for nvenc_h264 */
#if CONFIG_NVENC_H264_ENCODER
static const AVClass nvenc_h264_class = {
.class_name = "nvenc_h264",
.item_name = av_default_item_name,
.option = options,
.version = LIBAVUTIL_VERSION_INT,
};
AVCodec ff_nvenc_h265_encoder = {
.name = "nvenc_h265",
.long_name = NULL_IF_CONFIG_SMALL("Nvidia NVENC h265 encoder"),
AVCodec ff_nvenc_h264_encoder = {
.name = "nvenc_h264",
.long_name = NULL_IF_CONFIG_SMALL("Nvidia NVENC h264 encoder"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_H264,
.priv_data_size = sizeof(NvencContext),
.init = nvenc_encode_init,
.encode2 = nvenc_encode_frame,
.close = nvenc_encode_close,
.capabilities = CODEC_CAP_DELAY,
.priv_class = &nvenc_h264_class,
.defaults = nvenc_defaults,
.pix_fmts = pix_fmts_nvenc,
};
#endif
#if CONFIG_NVENC_HEVC_ENCODER
static const AVClass nvenc_hevc_class = {
.class_name = "nvenc_hevc",
.item_name = av_default_item_name,
.option = options,
.version = LIBAVUTIL_VERSION_INT,
};
AVCodec ff_nvenc_hevc_encoder = {
.name = "nvenc_hevc",
.long_name = NULL_IF_CONFIG_SMALL("Nvidia NVENC hevc encoder"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_H265,
.priv_data_size = sizeof(NvencContext),
......@@ -1445,7 +1470,7 @@ AVCodec ff_nvenc_h265_encoder = {
.encode2 = nvenc_encode_frame,
.close = nvenc_encode_close,
.capabilities = CODEC_CAP_DELAY,
.priv_class = &nvenc_h265_class,
.priv_class = &nvenc_hevc_class,
.defaults = nvenc_defaults,
.pix_fmts = pix_fmts_nvenc,
};
......
此差异已折叠。
/*
* 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
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef AVCODEC_NVENC_H
#define AVCODEC_NVENC_H
#include <cuda.h>
#include <nvEncodeAPI.h>
#include "libavutil/fifo.h"
#include "libavutil/opt.h"
#include "avcodec.h"
typedef struct NVENCInputSurface {
NV_ENC_INPUT_PTR in;
NV_ENC_BUFFER_FORMAT format;
int locked;
} NVENCInputSurface;
typedef struct NVENCOutputSurface {
NV_ENC_OUTPUT_PTR out;
NVENCInputSurface *in;
int busy;
} NVENCOutputSurface;
typedef CUresult(CUDAAPI *PCUINIT)(unsigned int Flags);
typedef CUresult(CUDAAPI *PCUDEVICEGETCOUNT)(int *count);
typedef CUresult(CUDAAPI *PCUDEVICEGET)(CUdevice *device, int ordinal);
typedef CUresult(CUDAAPI *PCUDEVICEGETNAME)(char *name, int len, CUdevice dev);
typedef CUresult(CUDAAPI *PCUDEVICECOMPUTECAPABILITY)(int *major, int *minor, CUdevice dev);
typedef CUresult(CUDAAPI *PCUCTXCREATE)(CUcontext *pctx, unsigned int flags, CUdevice dev);
typedef CUresult(CUDAAPI *PCUCTXPOPCURRENT)(CUcontext *pctx);
typedef CUresult(CUDAAPI *PCUCTXDESTROY)(CUcontext ctx);
typedef NVENCSTATUS (NVENCAPI *PNVENCODEAPICREATEINSTANCE)(NV_ENCODE_API_FUNCTION_LIST *functionList);
typedef struct NVENCLibraryContext
{
void *cuda;
void *nvenc;
PCUINIT cu_init;
PCUDEVICEGETCOUNT cu_device_get_count;
PCUDEVICEGET cu_device_get;
PCUDEVICEGETNAME cu_device_get_name;
PCUDEVICECOMPUTECAPABILITY cu_device_compute_capability;
PCUCTXCREATE cu_ctx_create;
PCUCTXPOPCURRENT cu_ctx_pop_current;
PCUCTXDESTROY cu_ctx_destroy;
NV_ENCODE_API_FUNCTION_LIST nvenc_funcs;
} NVENCLibraryContext;
enum {
PRESET_DEFAULT,
PRESET_HP,
PRESET_HQ,
PRESET_BD ,
PRESET_LOW_LATENCY_DEFAULT ,
PRESET_LOW_LATENCY_HQ ,
PRESET_LOW_LATENCY_HP,
PRESET_LOSSLESS_DEFAULT,
PRESET_LOSSLESS_HP,
};
enum {
NV_ENC_H264_PROFILE_BASELINE,
NV_ENC_H264_PROFILE_MAIN,
NV_ENC_H264_PROFILE_HIGH,
NV_ENC_H264_PROFILE_HIGH_444,
NV_ENC_H264_PROFILE_CONSTRAINED_HIGH,
};
enum {
NVENC_LOWLATENCY = 1,
NVENC_LOSSLESS,
};
enum {
LIST_DEVICES = -2,
ANY_DEVICE,
};
typedef struct NVENCContext {
AVClass *class;
NVENCLibraryContext nvel;
NV_ENC_INITIALIZE_PARAMS params;
NV_ENC_CONFIG config;
CUcontext cu_context;
int nb_surfaces;
NVENCInputSurface *in;
NVENCOutputSurface *out;
AVFifoBuffer *timestamps;
AVFifoBuffer *pending, *ready;
int64_t last_dts;
void *nvenc_ctx;
int preset;
int profile;
int level;
int tier;
int rc;
int device;
int flags;
} NVENCContext;
int ff_nvenc_encode_init(AVCodecContext *avctx);
int ff_nvenc_encode_close(AVCodecContext *avctx);
int ff_nvenc_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *frame, int *got_packet);
#endif /* AVCODEC_NVENC_H */
/*
* 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
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "libavutil/internal.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "internal.h"
#include "nvenc.h"
#define OFFSET(x) offsetof(NVENCContext, x)
#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
static const AVOption options[] = {
{ "preset", "Set the encoding preset", OFFSET(preset), AV_OPT_TYPE_INT, { .i64 = PRESET_HQ }, PRESET_DEFAULT, PRESET_LOSSLESS_HP, VE, "preset" },
{ "default", "", 0, AV_OPT_TYPE_CONST, { .i64 = PRESET_DEFAULT }, 0, 0, VE, "preset" },
{ "hp", "", 0, AV_OPT_TYPE_CONST, { .i64 = PRESET_HP }, 0, 0, VE, "preset" },
{ "hq", "", 0, AV_OPT_TYPE_CONST, { .i64 = PRESET_HQ }, 0, 0, VE, "preset" },
{ "bd", "", 0, AV_OPT_TYPE_CONST, { .i64 = PRESET_BD }, 0, 0, VE, "preset" },
{ "ll", "low latency", 0, AV_OPT_TYPE_CONST, { .i64 = PRESET_LOW_LATENCY_DEFAULT }, 0, 0, VE, "preset" },
{ "llhq", "low latency hq", 0, AV_OPT_TYPE_CONST, { .i64 = PRESET_LOW_LATENCY_HQ }, 0, 0, VE, "preset" },
{ "llhp", "low latency hp", 0, AV_OPT_TYPE_CONST, { .i64 = PRESET_LOW_LATENCY_HP }, 0, 0, VE, "preset" },
{ "profile", "Set the encoding profile", OFFSET(profile), AV_OPT_TYPE_INT, { .i64 = NV_ENC_H264_PROFILE_HIGH }, NV_ENC_H264_PROFILE_BASELINE, NV_ENC_H264_PROFILE_CONSTRAINED_HIGH, VE, "profile" },
{ "baseline", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_H264_PROFILE_BASELINE }, 0, 0, VE, "profile" },
{ "main", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_H264_PROFILE_MAIN }, 0, 0, VE, "profile" },
{ "high", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_H264_PROFILE_HIGH }, 0, 0, VE, "profile" },
{ "high_444", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_H264_PROFILE_HIGH_444 }, 0, 0, VE, "profile" },
{ "constrained_high", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_H264_PROFILE_CONSTRAINED_HIGH }, 0, 0, VE, "profile" },
{ "level", "Set the encoding level restriction", OFFSET(level), AV_OPT_TYPE_INT, { .i64 = NV_ENC_LEVEL_AUTOSELECT }, NV_ENC_LEVEL_AUTOSELECT, NV_ENC_LEVEL_H264_51, VE, "level" },
{ "1.0", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LEVEL_H264_1 }, 0, 0, VE, "level" },
{ "1.b", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LEVEL_H264_1b }, 0, 0, VE, "level" },
{ "1.1", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LEVEL_H264_11 }, 0, 0, VE, "level" },
{ "1.2", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LEVEL_H264_12 }, 0, 0, VE, "level" },
{ "1.3", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LEVEL_H264_13 }, 0, 0, VE, "level" },
{ "2.0", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LEVEL_H264_2 }, 0, 0, VE, "level" },
{ "2.1", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LEVEL_H264_21 }, 0, 0, VE, "level" },
{ "2.2", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LEVEL_H264_22 }, 0, 0, VE, "level" },
{ "3.0", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LEVEL_H264_3 }, 0, 0, VE, "level" },
{ "3.1", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LEVEL_H264_31 }, 0, 0, VE, "level" },
{ "3.2", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LEVEL_H264_32 }, 0, 0, VE, "level" },
{ "4.0", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LEVEL_H264_4 }, 0, 0, VE, "level" },
{ "4.1", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LEVEL_H264_41 }, 0, 0, VE, "level" },
{ "4.2", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LEVEL_H264_42 }, 0, 0, VE, "level" },
{ "5.0", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LEVEL_H264_5 }, 0, 0, VE, "level" },
{ "5.1", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LEVEL_H264_51 }, 0, 0, VE, "level" },
{ "rc", "Override the preset rate-control", OFFSET(rc), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 0, VE },
{ "constqp", "Constant QP mode", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_PARAMS_RC_CONSTQP }, 0, 0, VE, "rc" },
{ "vbr", "Variable bitrate mode", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_PARAMS_RC_VBR }, 0, 0, VE, "rc" },
{ "cbr", "Constant bitrate mode", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_PARAMS_RC_CBR }, 0, 0, VE, "rc" },
{ "vbr_minqp", "Variable bitrate mode with MinQP", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_PARAMS_RC_VBR_MINQP }, 0, 0, VE, "rc" },
{ "ll_2pass_quality", "Multi-pass optimized for image quality (only for low-latency presets)", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_PARAMS_RC_2_PASS_QUALITY }, 0, 0, VE, "rc" },
{ "ll_2pass_size", "Multi-pass optimized for constant frame size (only for low-latency presets)", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_PARAMS_RC_2_PASS_FRAMESIZE_CAP }, 0, 0, VE, "rc" },
{ "vbr_2pass", "Multi-pass variable bitrate mode", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_PARAMS_RC_2_PASS_VBR }, 0, 0, VE, "rc" },
{ "surfaces", "Number of concurrent surfaces", OFFSET(nb_surfaces), AV_OPT_TYPE_INT, { .i64 = 32 }, 0, INT_MAX, VE },
{ "device", "Select a specific NVENC device", OFFSET(device), AV_OPT_TYPE_INT, { .i64 = -1 }, -2, INT_MAX, VE, "device" },
{ "any", "Pick the first device available", 0, AV_OPT_TYPE_CONST, { .i64 = ANY_DEVICE }, 0, 0, VE, "device" },
{ "list", "List the available devices", 0, AV_OPT_TYPE_CONST, { .i64 = LIST_DEVICES }, 0, 0, VE, "device" },
{ NULL }
};
static const AVClass nvenc_hevc_class = {
.class_name = "nvenc_h264",
.item_name = av_default_item_name,
.option = options,
.version = LIBAVUTIL_VERSION_INT,
};
static const AVCodecDefault defaults[] = {
{ "b", "0" },
{ "qmin", "-1" },
{ "qmax", "-1" },
{ "qdiff", "-1" },
{ "qblur", "-1" },
{ "qcomp", "-1" },
{ NULL },
};
AVCodec ff_h264_nvenc_encoder = {
.name = "nvenc_h264",
.long_name = NULL_IF_CONFIG_SMALL("NVIDIA NVENC H264 encoder"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_H264,
.init = ff_nvenc_encode_init,
.encode2 = ff_nvenc_encode_frame,
.close = ff_nvenc_encode_close,
.priv_data_size = sizeof(NVENCContext),
.priv_class = &nvenc_hevc_class,
.defaults = defaults,
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
AV_PIX_FMT_YUV420P,
AV_PIX_FMT_YUV444P,
AV_PIX_FMT_NONE },
.capabilities = CODEC_CAP_DELAY,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
};
/*
* 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
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "libavutil/internal.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "internal.h"
#include "nvenc.h"
#define OFFSET(x) offsetof(NVENCContext, x)
#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
static const AVOption options[] = {
{ "preset", "Set the encoding preset", OFFSET(preset), AV_OPT_TYPE_INT, { .i64 = PRESET_HQ }, PRESET_DEFAULT, PRESET_LOSSLESS_HP, VE, "preset" },
{ "default", "", 0, AV_OPT_TYPE_CONST, { .i64 = PRESET_DEFAULT }, 0, 0, VE, "preset" },
{ "hp", "", 0, AV_OPT_TYPE_CONST, { .i64 = PRESET_HP }, 0, 0, VE, "preset" },
{ "hq", "", 0, AV_OPT_TYPE_CONST, { .i64 = PRESET_HQ }, 0, 0, VE, "preset" },
{ "bd", "", 0, AV_OPT_TYPE_CONST, { .i64 = PRESET_BD }, 0, 0, VE, "preset" },
{ "ll", "low latency", 0, AV_OPT_TYPE_CONST, { .i64 = PRESET_LOW_LATENCY_DEFAULT }, 0, 0, VE, "preset" },
{ "llhq", "low latency hq", 0, AV_OPT_TYPE_CONST, { .i64 = PRESET_LOW_LATENCY_HQ }, 0, 0, VE, "preset" },
{ "llhp", "low latency hp", 0, AV_OPT_TYPE_CONST, { .i64 = PRESET_LOW_LATENCY_HP }, 0, 0, VE, "preset" },
{ "lossless", "lossless", 0, AV_OPT_TYPE_CONST, { .i64 = PRESET_LOSSLESS_DEFAULT }, 0, 0, VE, "preset" },
{ "losslesshp", "lossless hp", 0, AV_OPT_TYPE_CONST, { .i64 = PRESET_LOSSLESS_HP }, 0, 0, VE, "preset" },
{ "profile", "Set the encoding profile", OFFSET(profile), AV_OPT_TYPE_INT, { .i64 = FF_PROFILE_HEVC_MAIN }, FF_PROFILE_HEVC_MAIN, FF_PROFILE_HEVC_MAIN, VE, "profile" },
{ "high", "", 0, AV_OPT_TYPE_CONST, { .i64 = FF_PROFILE_HEVC_MAIN }, 0, 0, VE, "profile" },
{ "level", "Set the encoding level restriction", OFFSET(level), AV_OPT_TYPE_INT, { .i64 = NV_ENC_LEVEL_AUTOSELECT }, NV_ENC_LEVEL_AUTOSELECT, NV_ENC_LEVEL_HEVC_62, VE, "level" },
{ "1.0", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LEVEL_HEVC_1 }, 0, 0, VE, "level" },
{ "2.0", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LEVEL_HEVC_2 }, 0, 0, VE, "level" },
{ "2.1", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LEVEL_HEVC_21 }, 0, 0, VE, "level" },
{ "3.0", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LEVEL_HEVC_3 }, 0, 0, VE, "level" },
{ "3.1", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LEVEL_HEVC_31 }, 0, 0, VE, "level" },
{ "4.0", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LEVEL_HEVC_4 }, 0, 0, VE, "level" },
{ "4.1", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LEVEL_HEVC_41 }, 0, 0, VE, "level" },
{ "5.0", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LEVEL_HEVC_5 }, 0, 0, VE, "level" },
{ "5.1", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LEVEL_HEVC_51 }, 0, 0, VE, "level" },
{ "5.2", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LEVEL_HEVC_52 }, 0, 0, VE, "level" },
{ "6.0", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LEVEL_HEVC_6 }, 0, 0, VE, "level" },
{ "6.1", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LEVEL_HEVC_61 }, 0, 0, VE, "level" },
{ "6.2", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LEVEL_HEVC_62 }, 0, 0, VE, "level" },
{ "tier", "Set the encoding tier", OFFSET(tier), AV_OPT_TYPE_INT, { .i64 = NV_ENC_TIER_HEVC_MAIN }, NV_ENC_TIER_HEVC_MAIN, NV_ENC_TIER_HEVC_HIGH, VE, "tier"},
{ "main", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_TIER_HEVC_MAIN }, 0, 0, VE, "tier" },
{ "high", "", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_TIER_HEVC_HIGH }, 0, 0, VE, "tier" },
{ "rc", "Override the preset rate-control", OFFSET(rc), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 0, VE, "rc" },
{ "constqp", "Constant QP mode", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_PARAMS_RC_CONSTQP }, 0, 0, VE, "rc" },
{ "vbr", "Variable bitrate mode", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_PARAMS_RC_VBR }, 0, 0, VE, "rc" },
{ "cbr", "Constant bitrate mode", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_PARAMS_RC_CBR }, 0, 0, VE, "rc" },
{ "vbr_minqp", "Variable bitrate mode with MinQP", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_PARAMS_RC_VBR_MINQP }, 0, 0, VE, "rc" },
{ "ll_2pass_quality", "Multi-pass optimized for image quality (only for low-latency presets)", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_PARAMS_RC_2_PASS_QUALITY }, 0, 0, VE, "rc" },
{ "ll_2pass_size", "Multi-pass optimized for constant frame size (only for low-latency presets)", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_PARAMS_RC_2_PASS_FRAMESIZE_CAP }, 0, 0, VE, "rc" },
{ "vbr_2pass", "Multi-pass variable bitrate mode", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_PARAMS_RC_2_PASS_VBR }, 0, 0, VE, "rc" },
{ "surfaces", "Number of concurrent surfaces", OFFSET(nb_surfaces), AV_OPT_TYPE_INT, { .i64 = 32 }, 0, INT_MAX, VE },
{ "device", "Select a specific NVENC device", OFFSET(device), AV_OPT_TYPE_INT, { .i64 = -1 }, -2, INT_MAX, VE, "device" },
{ "any", "Pick the first device available", 0, AV_OPT_TYPE_CONST, { .i64 = ANY_DEVICE }, 0, 0, VE, "device" },
{ "list", "List the available devices", 0, AV_OPT_TYPE_CONST, { .i64 = LIST_DEVICES }, 0, 0, VE, "device" },
{ NULL }
};
static const AVClass nvenc_hevc_class = {
.class_name = "nvenc_hevc",
.item_name = av_default_item_name,
.option = options,
.version = LIBAVUTIL_VERSION_INT,
};
static const AVCodecDefault defaults[] = {
{ "b", "0" },
{ "qmin", "-1" },
{ "qmax", "-1" },
{ "qdiff", "-1" },
{ "qblur", "-1" },
{ "qcomp", "-1" },
{ NULL },
};
AVCodec ff_hevc_nvenc_encoder = {
.name = "nvenc_hevc",
.long_name = NULL_IF_CONFIG_SMALL("NVIDIA NVENC HEVC encoder"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_HEVC,
.init = ff_nvenc_encode_init,
.encode2 = ff_nvenc_encode_frame,
.close = ff_nvenc_encode_close,
.priv_data_size = sizeof(NVENCContext),
.priv_class = &nvenc_hevc_class,
.defaults = defaults,
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
AV_PIX_FMT_YUV420P,
AV_PIX_FMT_YUV444P,
AV_PIX_FMT_NONE },
.capabilities = CODEC_CAP_DELAY,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
};
......@@ -30,7 +30,7 @@
#define LIBAVCODEC_VERSION_MAJOR 56
#define LIBAVCODEC_VERSION_MINOR 41
#define LIBAVCODEC_VERSION_MICRO 101
#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
......
......@@ -187,6 +187,8 @@ static av_cold int init(AVFilterContext *ctx)
return AVERROR(EINVAL);
}
calc_coefficients(ctx);
return 0;
}
......@@ -400,8 +402,6 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
case COLOR_MODE_BT601 : av_frame_set_colorspace(out, AVCOL_SPC_BT470BG) ; break;
}
calc_coefficients(ctx);
td.src = in;
td.dst = out;
td.c2 = color->yuv_convert[color->mode][0][1];
......
......@@ -465,7 +465,9 @@ static void fill_buffer(AVIOContext *s)
/* make buffer smaller in case it ended up large after probing */
if (s->read_packet && s->orig_buffer_size && s->buffer_size > s->orig_buffer_size) {
if (dst == s->buffer) {
ffio_set_buf_size(s, s->orig_buffer_size);
int ret = ffio_set_buf_size(s, s->orig_buffer_size);
if (ret < 0)
av_log(s, AV_LOG_WARNING, "Failed to decrease buffer size\n");
s->checksum_ptr = dst = s->buffer;
}
......
......@@ -98,7 +98,9 @@ static int ffm_read_data(AVFormatContext *s,
retry_read:
if (pb->buffer_size != ffm->packet_size) {
int64_t tell = avio_tell(pb);
ffio_set_buf_size(pb, ffm->packet_size);
int ret = ffio_set_buf_size(pb, ffm->packet_size);
if (ret < 0)
return ret;
avio_seek(pb, tell, SEEK_SET);
}
id = avio_rb16(pb); /* PACKET_ID */
......
......@@ -84,18 +84,6 @@ static inline int C_JPEG_TO_CCIR(int y) {
}
#define RGB_TO_Y(r, g, b) \
((FIX(0.29900) * (r) + FIX(0.58700) * (g) + \
FIX(0.11400) * (b) + ONE_HALF) >> SCALEBITS)
#define RGB_TO_U(r1, g1, b1, shift)\
(((- FIX(0.16874) * r1 - FIX(0.33126) * g1 + \
FIX(0.50000) * b1 + (ONE_HALF << shift) - 1) >> (SCALEBITS + shift)) + 128)
#define RGB_TO_V(r1, g1, b1, shift)\
(((FIX(0.50000) * r1 - FIX(0.41869) * g1 - \
FIX(0.08131) * b1 + (ONE_HALF << shift) - 1) >> (SCALEBITS + shift)) + 128)
#define RGB_TO_Y_CCIR(r, g, b) \
((FIX(0.29900*219.0/255.0) * (r) + FIX(0.58700*219.0/255.0) * (g) + \
FIX(0.11400*219.0/255.0) * (b) + (ONE_HALF + (16 << SCALEBITS))) >> SCALEBITS)
......
FATE_SUBTITLES_ASS-$(call ALLYES, AQTITLE_DEMUXER TEXT_DECODER ICONV) += fate-sub-aqtitle
fate-sub-aqtitle: CMD = fmtstdout ass -sub_charenc windows-1250 -i $(TARGET_SAMPLES)/sub/AQTitle_capability_tester.aqt
FATE_SUBTITLES_ASS-$(call ALLYES, LAVFI_INDEV CCAPTION_DECODER MOVIE_FILTER MPEGTS_DEMUXER) += fate-sub-cc
FATE_SUBTITLES_ASS-$(call ALLYES, AVDEVICE LAVFI_INDEV CCAPTION_DECODER MOVIE_FILTER MPEGTS_DEMUXER) += fate-sub-cc
fate-sub-cc: CMD = fmtstdout ass -f lavfi -i "movie=$(TARGET_SAMPLES)/sub/Closedcaption_rollup.m2v[out0+subcc]"
FATE_SUBTITLES_ASS-$(call DEMDEC, ASS, ASS) += fate-sub-ass-to-ass-transcode
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册