1
0
mirror of https://github.com/jojo61/vdr-plugin-softhdcuvid.git synced 2023-10-10 13:37:41 +02:00

Improve Edit Speed

This commit is contained in:
jojo61 2019-10-23 16:25:10 +02:00
parent 6fbf240f6e
commit 9e8cd60f28

16
video.c
View File

@ -2545,6 +2545,7 @@ int init_filters(AVCodecContext * dec_ctx,CuvidDecoder * decoder,AVFrame *frame)
#endif #endif
#ifdef YADIF #ifdef YADIF
const char *filters_descr = "yadif_cuda=1:0:1"; // mode=send_field,parity=tff,deint=interlaced"; const char *filters_descr = "yadif_cuda=1:0:1"; // mode=send_field,parity=tff,deint=interlaced";
enum AVPixelFormat pix_fmts[] = { format, AV_PIX_FMT_NONE };
#endif #endif
enum AVPixelFormat format = PIXEL_FORMAT; enum AVPixelFormat format = PIXEL_FORMAT;
char args[512]; char args[512];
@ -2555,10 +2556,6 @@ int init_filters(AVCodecContext * dec_ctx,CuvidDecoder * decoder,AVFrame *frame)
AVFilterInOut *inputs = avfilter_inout_alloc(); AVFilterInOut *inputs = avfilter_inout_alloc();
AVBufferSrcParameters *src_params; AVBufferSrcParameters *src_params;
#ifdef YADIF
enum AVPixelFormat pix_fmts[] = { format, AV_PIX_FMT_NONE };
#endif
if (decoder->filter_graph) if (decoder->filter_graph)
avfilter_graph_free(&decoder->filter_graph); avfilter_graph_free(&decoder->filter_graph);
@ -2731,8 +2728,10 @@ static enum AVPixelFormat Cuvid_get_format(CuvidDecoder * decoder,
ist->hwaccel_output_format = AV_PIX_FMT_NV12; ist->hwaccel_output_format = AV_PIX_FMT_NV12;
} }
if (1 || video_ctx->width != decoder->InputWidth // if ((1 || video_ctx->width != decoder->InputWidth
|| video_ctx->height != decoder->InputHeight) { // || video_ctx->height != decoder->InputHeight) &&
if (decoder->TrickSpeed == 0) {
#ifdef PLACEBO #ifdef PLACEBO
VideoThreadLock(); VideoThreadLock();
#endif #endif
@ -4129,9 +4128,10 @@ static void CuvidSyncDecoder(CuvidDecoder * decoder)
++decoder->FramesDropped; ++decoder->FramesDropped;
CuvidAdvanceDecoderFrame(decoder); CuvidAdvanceDecoderFrame(decoder);
} }
else if ((diff < -65 * 90)) // give it some time to get frames to drop else if ((diff < -65 * 90)) { // give it some time to get frames to drop
Debug(3,"Delay Audio %d ms\n",abs(diff/90));
AudioDelayms(abs(diff/90)); AudioDelayms(abs(diff/90));
}
decoder->SyncCounter = 1; decoder->SyncCounter = 1;
} }
#if defined(DEBUG) || defined(AV_INFO) #if defined(DEBUG) || defined(AV_INFO)