mirror of
https://github.com/jojo61/vdr-plugin-softhdcuvid.git
synced 2023-10-10 13:37:41 +02:00
more drm DETA/ATTA fixes
This commit is contained in:
parent
ce3813a9e9
commit
269c396a2c
3
drm.c
3
drm.c
@ -558,6 +558,7 @@ static void drm_clean_up () {
|
|||||||
EglCheck();
|
EglCheck();
|
||||||
eglDestroyContext (eglDisplay, eglSharedContext);
|
eglDestroyContext (eglDisplay, eglSharedContext);
|
||||||
EglCheck();
|
EglCheck();
|
||||||
|
eglSharedContext = NULL;
|
||||||
|
|
||||||
eglTerminate (eglDisplay);
|
eglTerminate (eglDisplay);
|
||||||
EglCheck();
|
EglCheck();
|
||||||
@ -565,7 +566,7 @@ static void drm_clean_up () {
|
|||||||
gbm_device_destroy (gbm.dev);
|
gbm_device_destroy (gbm.dev);
|
||||||
drmDropMaster(render->fd_drm);
|
drmDropMaster(render->fd_drm);
|
||||||
close (render->fd_drm);
|
close (render->fd_drm);
|
||||||
|
eglDisplay = NULL;
|
||||||
free(render);
|
free(render);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -330,6 +330,7 @@ void cOglGlyph::LoadTexture(FT_BitmapGlyph ftGlyph) {
|
|||||||
|
|
||||||
extern "C" void GlxInitopengl();
|
extern "C" void GlxInitopengl();
|
||||||
extern "C" void GlxDrawopengl();
|
extern "C" void GlxDrawopengl();
|
||||||
|
extern "C" void GlxDestroy();
|
||||||
/****************************************************************************************
|
/****************************************************************************************
|
||||||
* cOglFont
|
* cOglFont
|
||||||
****************************************************************************************/
|
****************************************************************************************/
|
||||||
@ -1733,6 +1734,8 @@ void cOglThread::Cleanup(void) {
|
|||||||
cOglFont::Cleanup();
|
cOglFont::Cleanup();
|
||||||
#ifndef USE_DRM
|
#ifndef USE_DRM
|
||||||
glutExit();
|
glutExit();
|
||||||
|
#else
|
||||||
|
GlxDestroy();
|
||||||
#endif
|
#endif
|
||||||
pthread_mutex_unlock(&OSDMutex);
|
pthread_mutex_unlock(&OSDMutex);
|
||||||
}
|
}
|
||||||
|
18
video.c
18
video.c
@ -2858,7 +2858,11 @@ static enum AVPixelFormat Cuvid_get_format(CuvidDecoder * decoder, AVCodecContex
|
|||||||
#ifdef CUVID
|
#ifdef CUVID
|
||||||
ist->active_hwaccel_id = HWACCEL_CUVID;
|
ist->active_hwaccel_id = HWACCEL_CUVID;
|
||||||
#else
|
#else
|
||||||
|
if (VideoDeinterlace[decoder->Resolution]) // need deinterlace
|
||||||
ist->filter = 1; // init deint vaapi
|
ist->filter = 1; // init deint vaapi
|
||||||
|
else
|
||||||
|
ist->filter = 0;
|
||||||
|
|
||||||
ist->active_hwaccel_id = HWACCEL_VAAPI;
|
ist->active_hwaccel_id = HWACCEL_VAAPI;
|
||||||
#endif
|
#endif
|
||||||
ist->hwaccel_pix_fmt = PIXEL_FORMAT;
|
ist->hwaccel_pix_fmt = PIXEL_FORMAT;
|
||||||
@ -6392,11 +6396,19 @@ void VideoSetAbove()
|
|||||||
///
|
///
|
||||||
void VideoSetDeinterlace(int mode[VideoResolutionMax])
|
void VideoSetDeinterlace(int mode[VideoResolutionMax])
|
||||||
{
|
{
|
||||||
|
#ifdef CUVID
|
||||||
VideoDeinterlace[0] = mode[0]; // 576i
|
VideoDeinterlace[0] = mode[0]; // 576i
|
||||||
VideoDeinterlace[1] = 1; //mode[1]; // 720p
|
VideoDeinterlace[1] = 1; //mode[1]; // 720p
|
||||||
VideoDeinterlace[2] = mode[2]; // fake 1080
|
VideoDeinterlace[2] = mode[2]; // fake 1080
|
||||||
VideoDeinterlace[3] = mode[3]; // 1080
|
VideoDeinterlace[3] = mode[3]; // 1080
|
||||||
VideoDeinterlace[4] = 1, //mode[4]; 2160p
|
VideoDeinterlace[4] = 1, //mode[4]; 2160p
|
||||||
|
#else
|
||||||
|
VideoDeinterlace[0] = 1; // 576i
|
||||||
|
VideoDeinterlace[1] = 0; //mode[1]; // 720p
|
||||||
|
VideoDeinterlace[2] = 1; // fake 1080
|
||||||
|
VideoDeinterlace[3] = 1; // 1080
|
||||||
|
VideoDeinterlace[4] = 0, //mode[4]; 2160p
|
||||||
|
#endif
|
||||||
VideoSurfaceModesChanged = 1;
|
VideoSurfaceModesChanged = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6819,5 +6831,11 @@ int GlxDrawopengl () {
|
|||||||
eglMakeCurrent(eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, eglSharedContext);
|
eglMakeCurrent(eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, eglSharedContext);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GlxDestroy() {
|
||||||
|
eglDestroyContext (eglDisplay, eglOSDContext);
|
||||||
|
eglOSDContext = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user