Skip to content

Integrate an output comparison method for mpeg2 video decoder#256

Merged
rsanchez87 merged 3 commits into
masterfrom
COM-13022
Apr 17, 2025
Merged

Integrate an output comparison method for mpeg2 video decoder#256
rsanchez87 merged 3 commits into
masterfrom
COM-13022

Conversation

@rsanchez87
Copy link
Copy Markdown
Contributor

No description provided.

@rsanchez87 rsanchez87 marked this pull request as draft April 7, 2025 13:17
@rsanchez87 rsanchez87 force-pushed the COM-13022 branch 4 times, most recently from ec72471 to 91eeb85 Compare April 7, 2025 15:24
@rsanchez87 rsanchez87 marked this pull request as ready for review April 7, 2025 15:33
@rsanchez87 rsanchez87 marked this pull request as draft April 7, 2025 15:46
@rsanchez87 rsanchez87 marked this pull request as ready for review April 7, 2025 16:37
@rsanchez87
Copy link
Copy Markdown
Contributor Author

Copy link
Copy Markdown
Contributor

@mdimopoulos mdimopoulos left a comment

Choose a reason for hiding this comment

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

I have a few suggestions for changes and some questions, see individual comments.

Apart from that also

  • add gstreamer's standard mpeg2v decoder https://gstreamer.freedesktop.org/documentation/mpeg2dec/index.html?gi-language=c
  • if you haven't done regression tests with an ffmpeg and gstreamer decoder (other than mpeg2) i suggest you do, there is risk of regressions in this PR
  • at least 1 of the commits should be of type feat since we are adding a new comparison method
  • at the end remember to add relevant information to the docs as well as build-related files (pyproject.toml)

Comment thread fluster/decoders/ffmpeg.py Outdated
Comment thread fluster/decoders/ffmpeg.py Outdated
Comment thread fluster/decoders/gstreamer.py Outdated
Comment thread fluster/decoders/gstreamer.py Outdated
Comment thread fluster/test.py Outdated
Comment thread fluster/utils.py Outdated
Comment thread fluster/test.py Outdated
Comment thread fluster/utils.py Outdated
Comment thread fluster/decoders/gstreamer.py Outdated
Comment thread fluster/decoders/gstreamer.py Outdated
@rsanchez87 rsanchez87 force-pushed the COM-13022 branch 2 times, most recently from 2dbdf9a to d721987 Compare April 9, 2025 08:29
@rsanchez87 rsanchez87 requested a review from mdimopoulos April 9, 2025 09:13
@rsanchez87 rsanchez87 force-pushed the COM-13022 branch 2 times, most recently from 987238f to 5f7f600 Compare April 9, 2025 12:48
Copy link
Copy Markdown
Contributor

@ylatuya ylatuya left a comment

Choose a reason for hiding this comment

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

Besides the comments, you should also add a new mpeg check test suite for the tests https://github.com/fluendo/fluster/tree/master/check

Comment thread fluster/decoders/ffmpeg.py Outdated
Comment thread fluster/decoders/gstreamer.py Outdated
Comment thread fluster/test.py Outdated
Comment thread fluster/utils.py Outdated
Comment thread fluster/test.py Outdated
@rsanchez87 rsanchez87 force-pushed the COM-13022 branch 6 times, most recently from 943c014 to 55c8788 Compare April 10, 2025 07:08
@rsanchez87 rsanchez87 requested review from ylatuya and removed request for ylatuya April 10, 2025 07:39
Comment thread fluster/decoders/iso_mpeg2_video.py Outdated
Comment thread fluster/utils.py Outdated
Comment thread fluster/test_suite.py Outdated
Comment thread fluster/test_suite.py
Comment thread fluster/test_suite.py Outdated
@rsanchez87 rsanchez87 force-pushed the COM-13022 branch 2 times, most recently from b779962 to 8b954ad Compare April 11, 2025 13:58
Comment thread fluster/decoders/iso_mpeg2_video.py Outdated
Comment thread fluster/decoders/iso_mpeg2_video.py Outdated
Comment thread fluster/decoders/iso_mpeg2_video.py Outdated
Comment thread fluster/test.py Outdated
Comment thread fluster/decoders/iso_mpeg2_video.py Outdated
Comment thread fluster/test.py Outdated
Comment thread fluster/test.py Outdated
Comment thread fluster/test.py Outdated
Comment thread fluster/test.py Outdated
Comment thread fluster/test_suite.py Outdated
ctx.verbose,

if self.test_method == TestMethod.PIXEL:
reference_decoder = get_reference_decoder_for_codec(ctx.decoder.codec)
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.

This should be checked only once for the test suite instead of doing the check for every test vector. It should also not raise an exception since this will stop running the rest of the test suites.

This must be handled in the run function where the decoder to test is also checked: https://github.com/fluendo/fluster/blob/COM-13022/fluster/test_suite.py#L515

Comment thread fluster/fluster.py Outdated
decoder.multiple_layers = True
if decoder.codec != test_suite.codec:
continue
if test_suite.test_method == TestMethod.PIXEL and decoder.is_reference is True:
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.

Suggested change
if test_suite.test_method == TestMethod.PIXEL and decoder.is_reference is True:
if test_suite.test_method == TestMethod.PIXEL and decoder.is_reference:

@rsanchez87 rsanchez87 force-pushed the COM-13022 branch 2 times, most recently from efe9e14 to 4b3477d Compare April 16, 2025 12:00
…entical outputs

-Old codecs like MPEG-2 Video do not use a standarized IDCT (MPEG-C Part1) causing mismatches
in the generated output.
-This new method allows creating tests suites  that will compare the output pixel by pixel with a tolerance range
@rsanchez87 rsanchez87 merged commit acee87a into master Apr 17, 2025
4 checks passed
@rsanchez87 rsanchez87 deleted the COM-13022 branch April 17, 2025 08:47
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.

4 participants