[PATCH] ppc fix for realvideo in mkv
Hi, This patch fixes the longstanding issue of realvideo decoding in mkv on ppc, it is an endianness issue. -- Emanuele Giaquinta
On Wed, Mar 22, 2006 at 02:24:24AM +0100, Emanuele Giaquinta wrote:
This patch fixes the longstanding issue of realvideo decoding in mkv on ppc, it is an endianness issue.
:) I can finally watch Lost in Translation .. Moritz, OK to apply? Diego
2006/3/22, Diego Biurrun <diego@biurrun.de>:
On Wed, Mar 22, 2006 at 02:24:24AM +0100, Emanuele Giaquinta wrote:
This patch fixes the longstanding issue of realvideo decoding in mkv on ppc, it is an endianness issue.
:) I can finally watch Lost in Translation ..
Moritz, OK to apply?
Diego
use uint32_t * and add remark /*real hack*/
Hey, (this message might become a dupe if a moderator approves my previous one ;)) Thanks for fixing this bug. The patch has two problems that I'd like you to fix before I apply it: 1. variable declaration after instructions (trivial to fix) and 2. possible non-aligned memory access as "a" might point to non-aligned addresses The solution for 2 would be something like put_uint32_be(a + i, get_uint32_le(a + i)); which doesn't try to read a complete uint32_t at once. Mosu -- If Darl McBride was in charge, he'd probably make marriage unconstitutional too, since clearly it de-emphasizes the commercial nature of normal human interaction, and probably is a major impediment to the commercial growth of prostitution. - Linus Torvalds
Hi, On Wed, Mar 22, 2006 at 12:52:16PM +0100, Moritz Bunkus wrote:
2. possible non-aligned memory access as "a" might point to non-aligned addresses
There is other breakage like this in that code anyway though (some bugzilla bug, don't remember which though)... Greetings, Reimar Döffinger
Is this one ok? -- Emanuele Giaquinta
On Wed, Mar 22, 2006 at 07:02:19PM +0100, Emanuele Giaquinta wrote:
Is this one ok?
No, extradata is considered binary data. It's not ok for the demuxer to rewrite it for byte order. If such a hack is needed it belongs in the realvideo decoder module. Rich
Hey, On Wednesday 22 March 2006 19:31, Rich Felker wrote:
No, extradata is considered binary data. It's not ok for the demuxer to rewrite it for byte order. If such a hack is needed it belongs in the realvideo decoder module.
We're not talking about codec extradata here. In this case the frames have to contain an offset table in machine order which is ALSO present right at the start of the frame itself in little endian (don't ask me why, it's the way it is with the RealVideo decoder). In Matroska this extra table is not present while it IS present in RMFF files. Therefore it's OK for the Matroska demuxer to rebuild the table on the fly. Anyway, the issue is not really worth discussing. Mosu -- If Darl McBride was in charge, he'd probably make marriage unconstitutional too, since clearly it de-emphasizes the commercial nature of normal human interaction, and probably is a major impediment to the commercial growth of prostitution. - Linus Torvalds
On Wed, Mar 22, 2006 at 08:01:34PM +0100, Moritz Bunkus wrote:
Hey,
On Wednesday 22 March 2006 19:31, Rich Felker wrote:
No, extradata is considered binary data. It's not ok for the demuxer to rewrite it for byte order. If such a hack is needed it belongs in the realvideo decoder module.
We're not talking about codec extradata here. In this case the frames have to contain an offset table in machine order which is ALSO present right at the start of the frame itself in little endian (don't ask me why, it's the way it is with the RealVideo decoder). In Matroska this extra table is not present while it IS present in RMFF files. Therefore it's OK for the Matroska demuxer to rebuild the table on the fly.
Ah, well there's still no reason for it to be machine-order specific. If the code is written correctly (to write it as _bytes_!!) then there is no endian issue. Rich
Hi, On Wed, Mar 22, 2006 at 06:10:38PM -0500, Rich Felker wrote:
Ah, well there's still no reason for it to be machine-order specific. If the code is written correctly (to write it as _bytes_!!) then there is no endian issue.
I am more than happy if you (or anyone else) want to properly fix demux_real.c. I personally turned away in disgust. Greetings, Reimar Döffinger
Hey, On Wednesday 22 March 2006 19:02, Emanuele Giaquinta wrote:
Is this one ok?
Almost :) I've only added another #ifdef WORDS_BIGENDIAN around the two new variables and applied the patch. Thanks. Mosu -- If Darl McBride was in charge, he'd probably make marriage unconstitutional too, since clearly it de-emphasizes the commercial nature of normal human interaction, and probably is a major impediment to the commercial growth of prostitution. - Linus Torvalds
participants (6)
-
Diego Biurrun -
Emanuele Giaquinta -
Ivan Kalvachev -
Moritz Bunkus -
Reimar Döffinger -
Rich Felker