Repository navigation
Add a LUT parameter to producer_avformat - #1212
Conversation
|
Explain the purpose when there is already avfilter and a filtergraph property on the producer. |
There was a problem hiding this comment.
Pull request overview
This PR adds support for applying a 3D LUT to video decoded by the avformat producer by introducing a new lut property that maps to FFmpeg’s lut3d filter.
Changes:
- Bump
producer_avformatmetadata version and add a newlutparameter in the YAML service definition. - Extend
setup_filters()to optionally insert alut3dfilter (with escaped file path) into the video filter chain. - Rebuild the video filter graph when the
lutproperty changes, and ensure filter setup is triggered whenlutis present.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/modules/avformat/producer_avformat.yml |
Adds the lut parameter to the avformat producer’s public parameter schema and bumps the module version. |
src/modules/avformat/producer_avformat.c |
Implements LUT handling by inserting lut3d into the filter chain and rebuilding filters on property changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The filter needs to be added precisely before the linear color conversion as observed here: If I use the filtergraph property, then we would also have to use that for rotate.
I was hoping you would have advice about that before I dig into it too deep. Also see here: |
|
Regarding hwaccel, I think it will work; just checking if you tested that. I tried, but just a basic test like this fails: I made a change: And now it works with hwaccel plus preview scaling (hw-scaler) and rotate. |
This parameter allows the application to specify a 3d lut file to be applied to the source.
Thanks. The patch works for me and I applied it. |
This parameter allows the application to specify a 3d lut file to be applied to the source.