python-codecs: fix vaapi gray output

This commit is contained in:
Koushik Dutta
2023-05-26 14:16:50 -07:00
parent 79765ba58e
commit 1ebcf32998
3 changed files with 11 additions and 5 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/python-codecs",
"version": "0.1.63",
"version": "0.1.64",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@scrypted/python-codecs",
"version": "0.1.63",
"version": "0.1.64",
"devDependencies": {
"@scrypted/sdk": "file:../../sdk"
}

View File

@@ -1,6 +1,6 @@
{
"name": "@scrypted/python-codecs",
"version": "0.1.63",
"version": "0.1.64",
"description": "Python Codecs for Scrypted",
"keywords": [
"scrypted",

View File

@@ -172,8 +172,14 @@ class VaapiPostProcess():
vaapipostproc.set_property('height', outputHeight)
# not sure vaapi supports non-rgba across all hardware...
# (11): rgba - GST_VIDEO_FORMAT_RGBA
vaapipostproc.set_property('format', 11)
# GST_VIDEO_FORMAT_RGBA (11) rgb with alpha channel last
# GST_VIDEO_FORMAT_GRAY8 (25) 8-bit grayscale
format = toCapsFormat(options)
if format == 'GRAY8':
vaapipostproc.set_property('format', 25)
else:
vaapipostproc.set_property('format', 11)
if crop:
left = int(crop['left'])