3 ms·
I'd really like to see a citation for the claim there is "no consistent way to decode a H.264 video stream." H.264 decoding should be fully deterministic and c
by cornstalks 5y ago
I'd really like to see a citation for the claim there is "no consistent way to decode a H.264 video stream."
H.264 decoding should be fully deterministic and consistent, I believe. That said, bugs exist, shortcuts are taken, and not all decoders are truly compliant. But "some decoders are non-compliant" is very different from "it's impossible to consistently decode H.264".
- AceJohnny2 5y agoBack in the day when I was involved with video codec fw, I remember we were having trouble with some codec's (VP8?) deblocking pass, We had to implement that in SW because the particular method that codec used wasn't possible with our HW. A very legitimate question we asked ourselves was whether we could skip it altogether: the pass did smooth out edges between MacroBlocks, but on our test streams you really had to look closely at still frames to see the difference. So I can imagine different codecs implementing different parts of standard, as long as you could produce a valid stream/image that was acceptable to the human eye. (I don't remember what the final decision was for our deblocking. I would guess that certified compliance required it to be implemented)
- pjc50 5y agoYeah, having done some work on this in the past I think both are true: the standard should decode deterministically, but it's also quite complicated, so most of them are buggy. (A colleague of mine filed something like 30% of all the bugs on the H265 bug tracker, for instances where the reference implementation produced different results than the textual specification. Because we'd written a parser for the English text ..) There is also the concept of a "profile", a set of features which an encoder/decoder may limit itself to on small hardware. http://blog.mediacoderhq.com/h264-profiles-and-levels/ http://blog.mediacoderhq.com/h264-profiles-and-levels/
- josephg 5y agoWhenever I hear things like this I’m surprised there’s no set of reference videos & reference decoded frames. Like: “this video file should decode into this uncompressed video. This video file should decode into this other uncompressed video” - etc, with a large combinations of encoder features. Like a video equivalent of the commonmark test suite[1] I was playing with email parsers a couple of years ago and I still don’t know if my cobbled together email parser works correctly with all emails. 40 years after RFC822 it seems there’s still no standard, reference set of email message test cases to process to verify an email parser is correct & robust. [1] https://spec.commonmark.org/0.30/spec.json https://spec.commonmark.org/0.30/spec.json
- pjc50 5y agoOh, those exist, in fact that's what we were working on making! It's just that they're commercial products e.g. https://www.hhi.fraunhofer.de/en/departments/vca/technologies-and-solutions/h264-avc/h264-bitstream-test-suite.html https://www.hhi.fraunhofer.de/en/departments/vca/technologie... https://www.allegrodvt.com/video-ip-compliance-streams/compliance-streams-validation-verification/h264-avc-elementary-streams/ https://www.allegrodvt.com/video-ip-compliance-streams/compl...