Compare commits

...

5 Commits

Author SHA1 Message Date
jojo61
ad99776be8 Fix too small OSD Buffer 2025-02-09 13:15:40 +01:00
jojo61
f3ae69042f Prepare for adaptive streams 2025-01-11 12:16:22 +01:00
jojo61
6768bc5b18 Clarify use of LIBPLACEBO_GL 2024-10-22 09:39:51 +02:00
jojo61
e624e9c83d Fix compiling for softhddrm 2024-10-20 10:38:39 +02:00
jojo61
c907239bb5 better wording 2024-10-17 13:17:24 +02:00
5 changed files with 29 additions and 13 deletions

View File

@ -23,7 +23,7 @@ CUVID ?= 0
DRM ?= 0
# use libplacebo -
# available for all decoders but for DRM you need LIBPLACEBO_GL
# available for all decoders but for DRM and VAAPI you need LIBPLACEBO_GL
LIBPLACEBO ?= 0
LIBPLACEBO_GL ?= 0

View File

@ -251,8 +251,8 @@ Setup: /etc/vdr/setup.conf
(Red * 65536 + Green * 256 + Blue)
softhddevice.StudioLevels = 0
0 use limited RGB (16-235) with vdpau.
1 use full RGB (0-255) with vdpau.
0 use limited RGB (16-235) with placebo.
1 use full RGB (0-255) with placebo.
softhddevice.Suspend.Close = 0
1 suspend closes x11 window, connection and audio device.

View File

@ -469,6 +469,7 @@ void CodecVideoDecode(VideoDecoder *decoder, const AVPacket *avpkt) {
*pkt = *avpkt; // use copy
ret = avcodec_send_packet(video_ctx, pkt);
//printf("send packet %x\n",ret);
if (ret < 0) {
return;
}
@ -487,7 +488,8 @@ void CodecVideoDecode(VideoDecoder *decoder, const AVPacket *avpkt) {
return;
}
if (ret >= 0) {
if (decoder->filter) {
//printf("Videosize %d:%d ttf %d\n",frame->width,frame->height,frame->interlaced_frame);
if ((frame->flags & AV_FRAME_FLAG_INTERLACED) && decoder->filter) {
if (decoder->filter == 1) {
if (init_filters(video_ctx, decoder->HwDecoder, frame) < 0) {
Debug(3, "video: Init of VAAPI deint Filter failed\n");
@ -558,7 +560,7 @@ next_part:
// printf("video frame pts %#012" PRIx64 "
//%dms\n",frame->pts,(int)(apts - frame->pts) / 90);
#ifdef YADIF
if (decoder->filter) {
if ((frame->flags & AV_FRAME_FLAG_INTERLACED) && decoder->filter) {
if (decoder->filter == 1) {
if (init_filters(video_ctx, decoder->HwDecoder, frame) < 0) {
Debug(3,"video: Init of YADIF Filter failed\n");

View File

@ -61,7 +61,7 @@ extern void ToggleLUT();
/// vdr-plugin version number.
/// Makefile extracts the version number for generating the file name
/// for the distribution archive.
static const char *const VERSION = "3.27"
static const char *const VERSION = "3.29"
#ifdef GIT_REV
"-GIT" GIT_REV
#endif
@ -1226,7 +1226,7 @@ void cMenuSetupSoft::Create(void) {
Add(new cMenuEditIntItem(tr("Video background color (Alpha)"), (int *)&BackgroundAlpha, 0, 0xFF));
#endif
#ifdef PLACEBO
Add(new cMenuEditBoolItem(tr("RGB Level"), &StudioLevels, trVDR("limited RGB"), trVDR("Full RGB")));
Add(new cMenuEditBoolItem(tr("Color Range"), &StudioLevels, trVDR("limited RGB"), trVDR("Full RGB")));
#endif
Add(new cMenuEditBoolItem(tr("60hz display mode"), &_60HzMode, trVDR("no"), trVDR("yes")));
Add(new cMenuEditBoolItem(tr("Soft start a/v sync"), &SoftStartSync, trVDR("no"), trVDR("yes")));
@ -1526,8 +1526,8 @@ void cMenuSetupSoft::Store(void) {
SetupStore("DetachFromMainMenu", ConfigDetachFromMainMenu = DetachFromMainMenu);
switch (OsdSize) {
case 0:
OsdWidth = 0;
OsdHeight = 0;
OsdWidth = 1920;
OsdHeight = 1080;
break;
case 1:
OsdWidth = 1920;

22
video.c
View File

@ -3503,6 +3503,18 @@ static void CuvidRenderFrame(CuvidDecoder *decoder, const AVCodecContext *video_
VideoSetPts(&decoder->PTS, decoder->Interlaced, video_ctx, frame);
}
if ((decoder->InputWidth != frame->width) || (decoder->InputHeight != frame->height)) {
printf("Framesize change\n");
CuvidCleanup(decoder);
decoder->InputAspect = frame->sample_aspect_ratio;
decoder->InputWidth = frame->width;
decoder->InputHeight = frame->height;
decoder->Interlaced = 0;
decoder->SurfacesNeeded = VIDEO_SURFACES_MAX + 1;
CuvidSetupOutput(decoder);
}
// update aspect ratio changes
if (decoder->InputWidth && decoder->InputHeight && av_cmp_q(decoder->InputAspect, frame->sample_aspect_ratio)) {
Debug(3, "video/cuvid: aspect ratio changed\n");
@ -3836,7 +3848,7 @@ static void CuvidMixVideo(CuvidDecoder *decoder, __attribute__((unused)) int lev
current = decoder->SurfacesRb[decoder->SurfaceRead];
#ifdef USE_DRM
AVFrame *frame;
AVFrameSideData *sd, *sd1 = NULL, *sd2 = NULL;
if (!decoder->Closing) {
frame = decoder->frames[current];
@ -3978,7 +3990,7 @@ static void CuvidMixVideo(CuvidDecoder *decoder, __attribute__((unused)) int lev
// target.repr.bits.bit_shift =0;
#if USE_DRM
AVFrame *frame;
frame = decoder->frames[current];
switch (VulkanTargetColorSpace) {
@ -5371,8 +5383,10 @@ void VideoOsdInit(void) {
// printf("\nset osd %d x %d\n",OsdWidth,OsdHeight);
if (posd)
free(posd);
posd = (unsigned char *)calloc((OsdWidth + 1) * (OsdHeight + 1) * 4, 1);
// posd = (unsigned char *)calloc((4096 + 1) * (2160 + 1) * 4, 1);
if (OsdWidth >= 1920 && OsdHeight >= 1080)
posd = (unsigned char *)calloc((OsdWidth + 1) * (OsdHeight + 1) * 4, 1);
else
posd = (unsigned char *)calloc((4096 + 1) * (2160 + 1) * 4, 1);
VideoOsdClear();
}