Skip to content

Instantly share code, notes, and snippets.

View quietvoid's full-sized avatar

quietvoid

  • Canada
  • 23:39 (UTC -05:00)
View GitHub Profile
@quietvoid
quietvoid / hdr10plus_dovi.patch
Created January 21, 2021 18:52
Fixes MTK rendering when both Dolby Vision and HDR10+ are present
diff --git a/xbmc/utils/BitstreamConverter.cpp b/xbmc/utils/BitstreamConverter.cpp
index d31253f7de..6fa8c6cf31 100644
--- a/xbmc/utils/BitstreamConverter.cpp
+++ b/xbmc/utils/BitstreamConverter.cpp
@@ -972,10 +972,21 @@ void CBitstreamConverter::BitstreamAllocAndCopy( uint8_t **poutbuf, int *poutbuf
void *tmp;
// MTK Dolby Vision decoder (seems) to expect header of size 4
- if (dovi_workaround &&
- (nal_type == HEVC_NAL_UNSPEC62 || nal_type == HEVC_NAL_UNSPEC63))
@quietvoid
quietvoid / kodi-dovi.patch
Created January 21, 2021 03:11
Kodi MTK Dolby Vision patch
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp
index 415d336292..45d823294e 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp
@@ -745,11 +745,23 @@ bool CDVDVideoCodecAndroidMediaCodec::Open(CDVDStreamInfo &hints, CDVDCodecOptio
goto FAIL;
if (m_codecname.find("OMX.Nvidia", 0, 10) == 0)
+ {
m_invalidPTSValue = AV_NOPTS_VALUE;
@quietvoid
quietvoid / wofi-emoji.sh
Last active August 17, 2025 12:43 — forked from jdonofrio728/wofi-emoji.sh
Wofi emoji picker
#!/usr/bin/env bash
# Source: https://gist.github.com/NearHuscarl/5d366e1a3b788814bcbea62c1f66241d
#
# Use wofi to pick emoji because that's what this
# century is about apparently...
#
# Requirements:
# wofi, wlroots based compositor
#
@quietvoid
quietvoid / singlepass-scenecut-aware-qp.patch
Last active July 24, 2023 00:16
Enables x265 --scenecut-aware-qp for single pass, fixes float precision in settings string and allows offset to be set to 0
diff --git a/source/common/param.cpp b/source/common/param.cpp
index 8695ad686..f3aaccd54 100755
--- a/source/common/param.cpp
+++ b/source/common/param.cpp
@@ -1359,9 +1359,9 @@ int x265_param_parse(x265_param* p, const char* name, const char* value)
{
if (window1 > 0)
p->fwdScenecutWindow = window1;
- if (refQpDelta1 > 0)
+ if (refQpDelta1 >= 0)
@quietvoid
quietvoid / script.py
Last active February 27, 2021 04:08
BDSup2Sup XML to timestamps
import xml.etree.ElementTree as ET
import math
tree = ET.parse('timestamps.xml')
in_format = tree.find('Description/Format')
fps = float(in_format.attrib['FrameRate'])
lines = tree.findall('Events/Event')