Skip to content

add av1parse element for low rank GStreamer av1 decoders - #279

Merged
mdimopoulos merged 1 commit into
masterfrom
COM-13466
Sep 1, 2025
Merged

mdimopoulos merged 1 commit into
masterfrom
COM-13466

Conversation

@mdimopoulos

Copy link
Copy Markdown
Contributor
  • affects av1dec, dav1ddec and vaapiav1dec
  • workaround for typefind GStreamer issue when decoder has low rank

@mdimopoulos

Copy link
Copy Markdown
Contributor Author

@ndufresne this should solve the issues happening for av1 decoders with low rank.
I didn't touch the ones that have primary or above

@ndufresne

Copy link
Copy Markdown
Contributor

I'd say go for it, its a safe workaround to the negotiation issue. What we could perhaps do is link to the upstream issue, so this tiny hack have a context: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4578

@mdimopoulos

mdimopoulos commented Aug 20, 2025 •

Copy link
Copy Markdown
Contributor Author

fyi @ndufresne
Initial solution didn't work, parsebin ! av1parse still results in failures due to improper negotiation. For example with some AV1 vectors h263 parser is plugged-in and the pipeline of course fails.

I have now removed parsebin element from 3 relevant AV1 decoder pipelines. I tested it and it works fine

@mdimopoulos mdimopoulos changed the title fix: add av1parse element for low rank GStreamer av1 decoders add av1parse element for low rank GStreamer av1 decoders Aug 20, 2025
@ndufresne

Copy link
Copy Markdown
Contributor

That will break the AOM and Chromium tests that requires matroska demuxing.

@mdimopoulos

mdimopoulos commented Aug 20, 2025 •

Copy link
Copy Markdown
Contributor Author

That will break the AOM and Chromium tests that requires matroska demuxing.

I executed a quick run with the test suites i think you are referring to and everything seems to be working perfectly.

Generating summary for test suite AV1-TEST-VECTORS and decoders GStreamer-AV1-libaom-Gst1.0:
|Test|GStreamer-AV1-libaom-Gst1.0|
|-|-|
|TOTAL|242/242|
Generating summary for test suite CHROMIUM-8bit-AV1-TEST-VECTORS and decoders GStreamer-AV1-libaom-Gst1.0:
|Test|GStreamer-AV1-libaom-Gst1.0|
|-|-|
|TOTAL|13/13|
Generating summary for test suite CHROMIUM-10bit-AV1-TEST-VECTORS and decoders GStreamer-AV1-libaom-Gst1.0:
|-|-|
|Test|GStreamer-AV1-libaom-Gst1.0|
|TOTAL|23/23|

Do you refer to other test suites or decoders 🤔? @ndufresne

@mdimopoulos

Copy link
Copy Markdown
Contributor Author

@ndufresne based on the last test results i believe we are good. what do you think?

@ndufresne

ndufresne commented Aug 22, 2025 •

Copy link
Copy Markdown
Contributor

Didn't have time to test, but I'm very suspicious of your change, perhaps you didn't test exactly what you wrote here. There is IVF and MKV files, and to read those, you need to plug ivfparse/matroskademux, if you drop parsebin and only place av1parse, it cannot work.

@mdimopoulos

Copy link
Copy Markdown
Contributor Author

Didn't have time to test, but I'm very suspicious of your change, perhaps you didn't test exactly what you wrote here. There is IVF and MKV files, and to read those, you need to plug ivfparse/matroskademux, if you drop parsebin and only place av1parse, it cannot work.

I see, i will take another look just in case.

@mdimopoulos

Copy link
Copy Markdown
Contributor Author

Didn't have time to test, but I'm very suspicious of your change, perhaps you didn't test exactly what you wrote here. There is IVF and MKV files, and to read those, you need to plug ivfparse/matroskademux, if you drop parsebin and only place av1parse, it cannot work.

I see, i will take another look just in case.

It's good you were suspicious, myself was a bit surprised to see 100% success but didn't think much of it.
After a closer look, AV1-TEST-VECTORS is failing miserably. I am looking for solutions.
Thanks again @ndufresne

@mdimopoulos

mdimopoulos commented Aug 25, 2025 •

Copy link
Copy Markdown
Contributor Author

I had to go back to the initial solution parsebin ! av1parse, it seems to be the best tradeoff for now. Below the test pass count to show the point
GStreamer 1.26.2 and av1dec

Test Suite parsebin av1parse parsebin ! av1parse
AV1-ARGON-PROFILE0-CORE-ANNEX-B 0 0 27
AV1-ARGON-PROFILE0-NON-ANNEX-B 35 35 36
AV1-TEST-VECTORS 242 0 242

@ndufresne

Copy link
Copy Markdown
Contributor

Great, note that typefind is heuristic base, I can increase the AV1 parser confidence so that it overrule the broken cases, but to do that I'll need to get a list of miss-identification.

@mdimopoulos

Copy link
Copy Markdown
Contributor Author

Great, note that typefind is heuristic base, I can increase the AV1 parser confidence so that it overrule the broken cases, but to do that I'll need to get a list of miss-identification.

Ok. What would be of help to you, debug logs, the name of the parser element that is plugged in by parsebin, something else?

@ndufresne

Copy link
Copy Markdown
Contributor

Some help sorting out the errors that are due to miss-identication is always welcome. There is no magic in fixing it, I need to pick one, and figure-out if improving the typefinding that miss-identified it to now reject it, or changing around some typefinder "confidence" level.

@rsanchez87
rsanchez87 self-requested a review September 1, 2025 08:56

@rsanchez87 rsanchez87 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, @mdimopoulos, a rebase is necessary before merging to master

@rsanchez87
rsanchez87 self-requested a review September 1, 2025 08:58
- affects av1dec, dav1ddec and vaapiav1dec
- workaround for typefind GStreamer issue when decoder has low rank
@mdimopoulos
mdimopoulos merged commit d4389aa into master Sep 1, 2025
4 checks passed
@mdimopoulos
mdimopoulos deleted the COM-13466 branch September 1, 2025 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants