]> git.ipfire.org Git - thirdparty/tvheadend.git/commit
transcode: fix VAAPI deinterlace mode handling for software decode/encode profiles
authorJames Hutchinson <jahutchinson99@googlemail.com>
Wed, 6 Aug 2025 10:18:15 +0000 (11:18 +0100)
committerFlole <Flole998@users.noreply.github.com>
Fri, 15 Aug 2025 21:01:47 +0000 (23:01 +0200)
commit33066c476068792eacbbd9748eaaaf73fe8bf829
treea1e87edbf0df93ebc9488823833ffa257f57ce69
parent13ec46ae99564a7c9e98d2f1ce4b35900a22687d
transcode: fix VAAPI deinterlace mode handling for software decode/encode profiles

Move 'deinterlace_vaapi_mode' from the VAAPI codec profile to the generic Main
Video Codec Profile, allowing this setting to be applied when using VAAPI
hardware deinterlacing with software-based transcode profiles such as libx264.

This fixes a bug where 'deinterlace_vaapi_mode' was left uninitialized for
non-VAAPI codec profiles, resulting in invalid filter strings like
'deinterlace_vaapi=mode=21867:rate=2:auto=0' and filter graph setup failures.

The patch also:
- Adds validation for the mode value (range 0–4)
- Dynamically enables/disables the VAAPI mode field in the WebUI based on encoder
  and decoder settings
- Consolidates enum and mode list generation logic under 'profile_video_class.c'

This ensures that VAAPI deinterlacing can be correctly configured and used across
hybrid transcode profiles, improving compatibility and user control.

Fixes: #1878
src/transcoding/codec/codecs/libs/vaapi.c
src/transcoding/codec/internals.h
src/transcoding/codec/profile_video_class.c
src/transcoding/transcode/hwaccels/vaapi.c
src/webui/static/app/codec.js