[PATCH] lpcm 20 and 24 bit support in MPEG PS
Hi This patch add support for 20bit and 24bit lpcm in MPEG PS. There are 4 cases, I dunno if factorizing code is worth, It did not look cleaner, I'm not sure though. Vob samples with 20bit, 24bit, multi channel and mono pcm can be found here: http://www.videohelp.com/~jsoto/AudioTests/ -- Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA SMARTJOG S.A. http://www.smartjog.com Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA Phone: +33 1 49966312
Hello, On Fri, Sep 29, 2006 at 12:59:04PM +0200, Baptiste Coudurier wrote:
This patch add support for 20bit and 24bit lpcm in MPEG PS. There are 4 cases, I dunno if factorizing code is worth, It did not look cleaner, I'm not sure though.
I find it rather hackish to have the LPCM->PCM conversion in the demuxer instead as a decoder as MPlayer does, especially for the 20 bit case... Greetings, Reimar D?ffinger
Hi Reimar D?ffinger wrote:
Hello, On Fri, Sep 29, 2006 at 12:59:04PM +0200, Baptiste Coudurier wrote:
This patch add support for 20bit and 24bit lpcm in MPEG PS. There are 4 cases, I dunno if factorizing code is worth, It did not look cleaner, I'm not sure though.
I find it rather hackish to have the LPCM->PCM conversion in the demuxer instead as a decoder as MPlayer does, especially for the 20 bit case...
Greetings, Reimar D?ffinger
Demuxer is not doing any conversion, it just depack samples correctly. That is a demuxer issue, not a codec one, if demuxer do not depack it you cannot stream copy, and there is no reason to put the code in libavcodec. It looks like PCM_S24DAUD case, which has nothing to do in pcm.c, since it is 20 bit lpcm. -- Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA SMARTJOG S.A. http://www.smartjog.com Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA Phone: +33 1 49966312
Hello, On Fri, Sep 29, 2006 at 06:00:04PM +0200, Baptiste Coudurier wrote:
Demuxer is not doing any conversion, it just depack samples correctly.
With that argument there is no reason why we should have both big and little endian audio formats either.
That is a demuxer issue, not a codec one, if demuxer do not depack it you cannot stream copy,
Ok, but why is that so? Does the muxer do packing as well? I also wasn't aware that stream copy does not work with MPlayer for these files.
and there is no reason to put the code in libavcodec.
Well, except that there is lots of similar code there. And that like this you will be doing 20 bit lpcm -> 24 bit PCM -> 16 bit PCM during playback which is a waste of CPU time (and not even such a small one if it was 6 channel 192KHz, 24 bit audio)...
It looks like PCM_S24DAUD case, which has nothing to do in pcm.c, since it is 20 bit lpcm.
Nobody objected to me placing it there... Greetings, Reimar D?ffinger
Reimar D?ffinger a ?crit :
Hello, On Fri, Sep 29, 2006 at 06:00:04PM +0200, Baptiste Coudurier wrote:
Demuxer is not doing any conversion, it just depack samples correctly.
With that argument there is no reason why we should have both big and little endian audio formats either.
Maybe.
That is a demuxer issue, not a codec one, if demuxer do not depack it you cannot stream copy,
Ok, but why is that so? Does the muxer do packing as well? I also wasn't aware that stream copy does not work with MPlayer for these files.
Mplayer does the exact decoding treatment as well, but it does not work with mono, and uses a special dvdpcm decoder. Stream copy wont work except from PS to PS. Yes muxer should pack it, and it muxer's job. Atm Lavf Mpeg PS muxer does not mux 24 bit lpcm.
and there is no reason to put the code in libavcodec.
Well, except that there is lots of similar code there. And that like this you will be doing 20 bit lpcm -> 24 bit PCM -> 16 bit PCM during playback which is a waste of CPU time (and not even such a small one if it was 6 channel 192KHz, 24 bit audio)...
I agree that it is a waste of cpu time, but it is the correct way to do it. Now it seems the audio API is a bit special. Maybe we should start using AVFrame, SampleFormat, and doing conversion only when it is needed. Not only decode_to_16. And finally use CODEC_ID_RAWAUDIO. Could we go for that for 0.5.0 ?
It looks like PCM_S24DAUD case, which has nothing to do in pcm.c, since it is 20 bit lpcm.
Nobody objected to me placing it there...
True. I was not following ffmpeg one year ago. Im sorry. -- Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA checking for life_signs in -lkenny... no
Baptiste, patch forgotten? :) Diego On Sat, Sep 30, 2006 at 01:49:01PM +0200, Baptiste Coudurier wrote:
Reimar D?ffinger a ?crit :
Hello, On Fri, Sep 29, 2006 at 06:00:04PM +0200, Baptiste Coudurier wrote:
Demuxer is not doing any conversion, it just depack samples correctly.
With that argument there is no reason why we should have both big and little endian audio formats either.
Maybe.
That is a demuxer issue, not a codec one, if demuxer do not depack it you cannot stream copy,
Ok, but why is that so? Does the muxer do packing as well? I also wasn't aware that stream copy does not work with MPlayer for these files.
Mplayer does the exact decoding treatment as well, but it does not work with mono, and uses a special dvdpcm decoder. Stream copy wont work except from PS to PS. Yes muxer should pack it, and it muxer's job. Atm Lavf Mpeg PS muxer does not mux 24 bit lpcm.
and there is no reason to put the code in libavcodec.
Well, except that there is lots of similar code there. And that like this you will be doing 20 bit lpcm -> 24 bit PCM -> 16 bit PCM during playback which is a waste of CPU time (and not even such a small one if it was 6 channel 192KHz, 24 bit audio)...
I agree that it is a waste of cpu time, but it is the correct way to do it. Now it seems the audio API is a bit special.
Maybe we should start using AVFrame, SampleFormat, and doing conversion only when it is needed. Not only decode_to_16. And finally use CODEC_ID_RAWAUDIO.
Could we go for that for 0.5.0 ?
It looks like PCM_S24DAUD case, which has nothing to do in pcm.c, since it is 20 bit lpcm.
Nobody objected to me placing it there...
True. I was not following ffmpeg one year ago. Im sorry.
Diego Biurrun wrote:
Baptiste, patch forgotten? :)
Not really, Mans did not comment on it, and Michael said that it should use AVBitStreamFilter. Atm AVBitStreamFilter API has no support for demuxing, nor demuxer activation cap, so .... -- Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA SMARTJOG S.A. http://www.smartjog.com Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA Phone: +33 1 49966312
Baptiste Coudurier said:
Diego Biurrun wrote:
Baptiste, patch forgotten? :)
Not really, Mans did not comment on it, and Michael said that it should use AVBitStreamFilter. Atm AVBitStreamFilter API has no support for demuxing, nor demuxer activation cap, so ....
I'm enjoying the California sun for a few more days. I'll look at and think about this and other things when I get back home. -- M?ns Rullg?rd mru at inprovide.com
Hi M?ns Rullg?rd wrote:
Baptiste Coudurier said:
Diego Biurrun wrote:
Baptiste, patch forgotten? :)
Not really, Mans did not comment on it, and Michael said that it should use AVBitStreamFilter. Atm AVBitStreamFilter API has no support for demuxing, nor demuxer activation cap, so ....
I'm enjoying the California sun for a few more days. I'll look at and think about this and other things when I get back home.
Any update about that patch ? It fixes a broken behaviour and add feature. If it's not ok, I'll fix it using another way. -- Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA SMARTJOG S.A. http://www.smartjog.com Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA Phone: +33 1 49966312
Baptiste Coudurier wrote:
Hi
M?ns Rullg?rd wrote:
Baptiste Coudurier said:
Diego Biurrun wrote:
Baptiste, patch forgotten? :)
Not really, Mans did not comment on it, and Michael said that it should use AVBitStreamFilter. Atm AVBitStreamFilter API has no support for demuxing, nor demuxer activation cap, so .... I'm enjoying the California sun for a few more days. I'll look at and think about this and other things when I get back home.
Any update about that patch ? It fixes a broken behaviour and add feature. If it's not ok, I'll fix it using another way.
Ping. Ok solution is not beautiful, can we at least add the bits_per_sample check and error when not 16 bit ? Applying and mentioning "XXX: use AVBistreamFilter" is a solution too and would add support for those streams. -- Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA SMARTJOG S.A. http://www.smartjog.com Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA Phone: +33 1 49966312
Baptiste Coudurier wrote:
Baptiste Coudurier wrote:
Hi
M?ns Rullg?rd wrote:
Baptiste Coudurier said:
Diego Biurrun wrote:
Baptiste, patch forgotten? :)
Not really, Mans did not comment on it, and Michael said that it should use AVBitStreamFilter. Atm AVBitStreamFilter API has no support for demuxing, nor demuxer activation cap, so .... I'm enjoying the California sun for a few more days. I'll look at and think about this and other things when I get back home.
Any update about that patch ? It fixes a broken behaviour and add feature. If it's not ok, I'll fix it using another way.
Ping. Ok solution is not beautiful, can we at least add the bits_per_sample check and error when not 16 bit ?
Applying and mentioning "XXX: use AVBistreamFilter" is a solution too and would add support for those streams.
Ping.... -- Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA SMARTJOG S.A. http://www.smartjog.com Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA Phone: +33 1 49966312
Baptiste Coudurier wrote:
Baptiste Coudurier wrote:
Baptiste Coudurier wrote:
Hi
M?ns Rullg?rd wrote:
Baptiste Coudurier said:
Diego Biurrun wrote:
Baptiste, patch forgotten? :)
Not really, Mans did not comment on it, and Michael said that it should use AVBitStreamFilter. Atm AVBitStreamFilter API has no support for demuxing, nor demuxer activation cap, so .... I'm enjoying the California sun for a few more days. I'll look at and think about this and other things when I get back home.
Any update about that patch ? It fixes a broken behaviour and add feature. If it's not ok, I'll fix it using another way.
Ping. Ok solution is not beautiful, can we at least add the bits_per_sample check and error when not 16 bit ?
Applying and mentioning "XXX: use AVBistreamFilter" is a solution too and would add support for those streams.
Ping....
We did had a bug report today because of that issue. -- Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA SMARTJOG S.A. http://www.smartjog.com Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA Phone: +33 1 49966312
Baptiste Coudurier said:
Baptiste Coudurier wrote:
Baptiste Coudurier wrote:
Baptiste Coudurier wrote:
Hi
M?ns Rullg?rd wrote:
Baptiste Coudurier said:
Diego Biurrun wrote: > Baptiste, patch forgotten? :) > Not really, Mans did not comment on it, and Michael said that it should use AVBitStreamFilter. Atm AVBitStreamFilter API has no support for demuxing, nor demuxer activation cap, so .... I'm enjoying the California sun for a few more days. I'll look at and think about this and other things when I get back home.
Any update about that patch ? It fixes a broken behaviour and add feature. If it's not ok, I'll fix it using another way.
Ping. Ok solution is not beautiful, can we at least add the bits_per_sample check and error when not 16 bit ?
Applying and mentioning "XXX: use AVBistreamFilter" is a solution too and would add support for those streams.
Ping....
We did had a bug report today because of that issue.
I'm still waiting for Michael to implement or approve some means of actually using the bitstream filter he says is the proper way to handle this. -- M?ns Rullg?rd mru at inprovide.com
Hi On Fri, Jan 26, 2007 at 10:24:29AM -0000, M?ns Rullg?rd wrote:
Baptiste Coudurier said:
Baptiste Coudurier wrote:
Baptiste Coudurier wrote:
Baptiste Coudurier wrote:
Hi
M?ns Rullg?rd wrote:
Baptiste Coudurier said: > Diego Biurrun wrote: >> Baptiste, patch forgotten? :) >> > Not really, Mans did not comment on it, and Michael said that it should > use AVBitStreamFilter. Atm AVBitStreamFilter API has no support for > demuxing, nor demuxer activation cap, so .... I'm enjoying the California sun for a few more days. I'll look at and think about this and other things when I get back home.
Any update about that patch ? It fixes a broken behaviour and add feature. If it's not ok, I'll fix it using another way.
Ping. Ok solution is not beautiful, can we at least add the bits_per_sample check and error when not 16 bit ?
Applying and mentioning "XXX: use AVBistreamFilter" is a solution too and would add support for those streams.
Ping....
We did had a bug report today because of that issue.
I'm still waiting for Michael to implement or approve some means of actually using the bitstream filter he says is the proper way to handle this.
i cant approve a way if noone suggests a way ... :) and if you prefer this can also be implemented at the decoder side ... or you could even approve the patch which adds it into the demxuer but i dont think this is where the code should be [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I am the wisest man alive, for I know one thing, and that is that I know nothing. -- Socrates
Hi Michael Niedermayer wrote:
Hi
On Fri, Jan 26, 2007 at 10:24:29AM -0000, M?ns Rullg?rd wrote:
Baptiste Coudurier said:
Baptiste Coudurier wrote:
Baptiste Coudurier wrote:
Baptiste Coudurier wrote:
Hi
M?ns Rullg?rd wrote: > Baptiste Coudurier said: >> Diego Biurrun wrote: >>> Baptiste, patch forgotten? :) >>> >> Not really, Mans did not comment on it, and Michael said that it should >> use AVBitStreamFilter. Atm AVBitStreamFilter API has no support for >> demuxing, nor demuxer activation cap, so .... > I'm enjoying the California sun for a few more days. I'll look at and think > about this and other things when I get back home. > Any update about that patch ? It fixes a broken behaviour and add feature. If it's not ok, I'll fix it using another way.
Ping. Ok solution is not beautiful, can we at least add the bits_per_sample check and error when not 16 bit ?
Applying and mentioning "XXX: use AVBistreamFilter" is a solution too and would add support for those streams.
Ping....
We did had a bug report today because of that issue. I'm still waiting for Michael to implement or approve some means of actually using the bitstream filter he says is the proper way to handle this.
i cant approve a way if noone suggests a way ... :)
and if you prefer this can also be implemented at the decoder side ... or you could even approve the patch which adds it into the demxuer but i dont think this is where the code should be
if you want to wait for someone to implement AVBitstreamFilter automatic insertion, that's fine by me. IMHO a decoder is not a good idea until good support for >16 bit per sample audio is provided. Demuxer must be fixed to report error when 20/24 bit are present though. -- Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA SMARTJOG S.A. http://www.smartjog.com Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA Phone: +33 1 49966312
On Tue, Jan 30, 2007 at 02:38:09PM +0100, Baptiste Coudurier wrote:
Hi
Michael Niedermayer wrote:
Hi
On Fri, Jan 26, 2007 at 10:24:29AM -0000, M?ns Rullg?rd wrote:
Baptiste Coudurier said:
Baptiste Coudurier wrote:
Baptiste Coudurier wrote:
Baptiste Coudurier wrote: > Hi > > M?ns Rullg?rd wrote: >> Baptiste Coudurier said: >>> Diego Biurrun wrote: >>>> Baptiste, patch forgotten? :) >>>> >>> Not really, Mans did not comment on it, and Michael said that it should >>> use AVBitStreamFilter. Atm AVBitStreamFilter API has no support for >>> demuxing, nor demuxer activation cap, so .... >> I'm enjoying the California sun for a few more days. I'll look at and think >> about this and other things when I get back home. >> > Any update about that patch ? It fixes a broken behaviour and add > feature. If it's not ok, I'll fix it using another way. > Ping. Ok solution is not beautiful, can we at least add the bits_per_sample check and error when not 16 bit ?
Applying and mentioning "XXX: use AVBistreamFilter" is a solution too and would add support for those streams.
Ping....
We did had a bug report today because of that issue. I'm still waiting for Michael to implement or approve some means of actually using the bitstream filter he says is the proper way to handle this.
i cant approve a way if noone suggests a way ... :)
and if you prefer this can also be implemented at the decoder side ... or you could even approve the patch which adds it into the demxuer but i dont think this is where the code should be
if you want to wait for someone to implement AVBitstreamFilter automatic insertion, that's fine by me.
i dont see why this should be delayed until automatic bitstream filter insertion is supported, rather the total opposite ... the more bitstream filters we have the more people will want them to be activated automatically so it would speed up the auto insert implementation :)
IMHO a decoder is not a good idea until good support for >16 bit per sample audio is provided.
well and that will never be provided if there is no decoder which outputs 32bit or 24 bit ... its a chicken and egg problem one needs the other so why not write a decoder which outputs 32 or 24 bit? [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB No great genius has ever existed without some touch of madness. -- Aristotle
Michael Niedermayer wrote:
On Tue, Jan 30, 2007 at 02:38:09PM +0100, Baptiste Coudurier wrote:
Hi
Michael Niedermayer wrote:
Hi
On Fri, Jan 26, 2007 at 10:24:29AM -0000, M?ns Rullg?rd wrote:
Baptiste Coudurier wrote:
Baptiste Coudurier wrote: > Baptiste Coudurier wrote: >> Hi >> >> M?ns Rullg?rd wrote: >>> Baptiste Coudurier said: >>>> Diego Biurrun wrote: >>>>> Baptiste, patch forgotten? :) >>>>> >>>> Not really, Mans did not comment on it, and Michael >>>> said that it should use AVBitStreamFilter. Atm >>>> AVBitStreamFilter API has no support for demuxing, >>>> nor demuxer activation cap, so .... >>> I'm enjoying the California sun for a few more days. >>> I'll look at and think about this and other things >>> when I get back home. >>> >> Any update about that patch ? It fixes a broken >> behaviour and add feature. If it's not ok, I'll fix it >> using another way. >> > Ping. Ok solution is not beautiful, can we at least add > the bits_per_sample check and error when not 16 bit ? > > Applying and mentioning "XXX: use AVBistreamFilter" is a > solution too and would add support for those streams. > Ping....
We did had a bug report today because of that issue. I'm still waiting for Michael to implement or approve some means of actually using the bitstream filter he says is the
Baptiste Coudurier said: proper way to handle this. i cant approve a way if noone suggests a way ... :)
and if you prefer this can also be implemented at the decoder side ... or you could even approve the patch which adds it into the demxuer but i dont think this is where the code should be
if you want to wait for someone to implement AVBitstreamFilter automatic insertion, that's fine by me.
i dont see why this should be delayed until automatic bitstream filter insertion is supported, rather the total opposite ... the more bitstream filters we have the more people will want them to be activated automatically so it would speed up the auto insert implementation :)
actually there isn't any support at all for bitstream filters after demuxing, and before decoding.
IMHO a decoder is not a good idea until good support for >16 bit per sample audio is provided.
well and that will never be provided if there is no decoder which outputs 32bit or 24 bit ... its a chicken and egg problem one needs the other so why not write a decoder which outputs 32 or 24 bit?
First set avctx->sample_fmt in every decoder, then change output buffer system because it can't reasonably be int16_t * anymore. That should not require a decoder which outputs 32 or 24 bit per sample. If someone wants to try... -- Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA SMARTJOG S.A. http://www.smartjog.com Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA Phone: +33 1 49966312
Hi On Tue, Jan 30, 2007 at 07:10:33PM +0100, Baptiste Coudurier wrote:
Michael Niedermayer wrote:
On Tue, Jan 30, 2007 at 02:38:09PM +0100, Baptiste Coudurier wrote:
Hi
Michael Niedermayer wrote:
Hi
On Fri, Jan 26, 2007 at 10:24:29AM -0000, M?ns Rullg?rd wrote:
Baptiste Coudurier wrote: > Baptiste Coudurier wrote: >> Baptiste Coudurier wrote: >>> Hi >>> >>> M?ns Rullg?rd wrote: >>>> Baptiste Coudurier said: >>>>> Diego Biurrun wrote: >>>>>> Baptiste, patch forgotten? :) >>>>>> >>>>> Not really, Mans did not comment on it, and Michael >>>>> said that it should use AVBitStreamFilter. Atm >>>>> AVBitStreamFilter API has no support for demuxing, >>>>> nor demuxer activation cap, so .... >>>> I'm enjoying the California sun for a few more days. >>>> I'll look at and think about this and other things >>>> when I get back home. >>>> >>> Any update about that patch ? It fixes a broken >>> behaviour and add feature. If it's not ok, I'll fix it >>> using another way. >>> >> Ping. Ok solution is not beautiful, can we at least add >> the bits_per_sample check and error when not 16 bit ? >> >> Applying and mentioning "XXX: use AVBistreamFilter" is a >> solution too and would add support for those streams. >> > Ping.... > We did had a bug report today because of that issue. I'm still waiting for Michael to implement or approve some means of actually using the bitstream filter he says is the
Baptiste Coudurier said: proper way to handle this. i cant approve a way if noone suggests a way ... :)
and if you prefer this can also be implemented at the decoder side ... or you could even approve the patch which adds it into the demxuer but i dont think this is where the code should be
if you want to wait for someone to implement AVBitstreamFilter automatic insertion, that's fine by me.
i dont see why this should be delayed until automatic bitstream filter insertion is supported, rather the total opposite ... the more bitstream filters we have the more people will want them to be activated automatically so it would speed up the auto insert implementation :)
actually there isn't any support at all for bitstream filters after demuxing, and before decoding.
IMHO a decoder is not a good idea until good support for >16 bit per sample audio is provided.
well and that will never be provided if there is no decoder which outputs 32bit or 24 bit ... its a chicken and egg problem one needs the other so why not write a decoder which outputs 32 or 24 bit?
First set avctx->sample_fmt in every decoder,
no 16bit is default only non 16bit decoders needs to set this
then change output buffer system because it can't reasonably be int16_t * anymore. That should not require a decoder which outputs 32 or 24 bit per sample.
it does, iam not aware of any part of the output buffer system which doesnt support other formats, so a decoder is needed to find out which parts break [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The greatest way to live with honor in this world is to be what we pretend to be. -- Socrates
>>>>> >>>> Any update about that patch ? It fixes a broken >>>> behaviour and add feature. If it's not ok, I'll fix it >>>> using another way. >>>> >>> Ping. Ok solution is not beautiful, can we at least add >>> the bits_per_sample check and error when not 16 bit ? >>> >>> Applying and mentioning "XXX: use AVBistreamFilter" is a >>> solution too and would add support for those streams. >>> >> Ping.... >> > We did had a bug report today because of that issue. I'm still waiting for Michael to implement or approve some means of actually using the bitstream filter he says is the proper way to handle this.
I'm going to bump this as this is still a problem. If there is no intention of adding the sample reordering of this patch, how about atleast the part wich fixes up bitrate and bits_per_sample. potentially also adding a codecid for the 20bit version and "fixing" codecid. That would atleast allow users to work around it in in players by knowing that the mpeg demuxer is in use. As it is now, you have no idea that it's a something different than 16bit pcm. Even if you manage to detect it, timestamps are totally broken. /Joakim
Hi On Thu, Mar 22, 2007 at 09:21:00PM +0000, elupus wrote:
>>>>>> >>>>> Any update about that patch ? It fixes a broken >>>>> behaviour and add feature. If it's not ok, I'll fix it >>>>> using another way. >>>>> >>>> Ping. Ok solution is not beautiful, can we at least add >>>> the bits_per_sample check and error when not 16 bit ? >>>> >>>> Applying and mentioning "XXX: use AVBistreamFilter" is a >>>> solution too and would add support for those streams. >>>> >>> Ping.... >>> >> We did had a bug report today because of that issue. > I'm still waiting for Michael to implement or approve some > means of actually using the bitstream filter he says is the > proper way to handle this.
I'm going to bump this as this is still a problem. If there is no intention of adding the sample reordering of this patch, how about atleast the part wich fixes up bitrate and bits_per_sample. potentially also adding a codecid for the 20bit version and "fixing" codecid.
iam all in favor of that but iam not mpeg-ps/ts maintainer ... [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Those who are too smart to engage in politics are punished by being governed by those who are dumber. -- Plato
Michael Niedermayer wrote:
Hi
On Thu, Mar 22, 2007 at 09:21:00PM +0000, elupus wrote:
>>>>>> Any update about that patch ? It fixes a broken >>>>>> behaviour and add feature. If it's not ok, I'll fix it >>>>>> using another way. >>>>>> >>>>> Ping. Ok solution is not beautiful, can we at least add >>>>> the bits_per_sample check and error when not 16 bit ? >>>>> >>>>> Applying and mentioning "XXX: use AVBistreamFilter" is a >>>>> solution too and would add support for those streams. >>>>> >>>> Ping.... >>>> >>> We did had a bug report today because of that issue. >> I'm still waiting for Michael to implement or approve some >> means of actually using the bitstream filter he says is the >> proper way to handle this. I'm going to bump this as this is still a problem. If there is no intention of adding the sample reordering of this patch, how about atleast the part wich fixes up bitrate and bits_per_sample. potentially also adding a codecid for the 20bit version and "fixing" codecid.
iam all in favor of that but iam not mpeg-ps/ts maintainer ...
Ok, it will finally end this thread, may I suggest a CODEC_ID_DVD_LPCM then ? And decoder which take bits_per_sample into account ? Using CODEC_ID_PCM_S24BE for it seems a bit weird, this will break stream copy. -- Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA SMARTJOG S.A. http://www.smartjog.com Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA Phone: +33 1 49966312
Hi On Fri, Mar 23, 2007 at 02:15:45AM +0100, Baptiste Coudurier wrote:
Michael Niedermayer wrote:
Hi
On Thu, Mar 22, 2007 at 09:21:00PM +0000, elupus wrote:
>>>>>>> Any update about that patch ? It fixes a broken >>>>>>> behaviour and add feature. If it's not ok, I'll fix it >>>>>>> using another way. >>>>>>> >>>>>> Ping. Ok solution is not beautiful, can we at least add >>>>>> the bits_per_sample check and error when not 16 bit ? >>>>>> >>>>>> Applying and mentioning "XXX: use AVBistreamFilter" is a >>>>>> solution too and would add support for those streams. >>>>>> >>>>> Ping.... >>>>> >>>> We did had a bug report today because of that issue. >>> I'm still waiting for Michael to implement or approve some >>> means of actually using the bitstream filter he says is the >>> proper way to handle this. I'm going to bump this as this is still a problem. If there is no intention of adding the sample reordering of this patch, how about atleast the part wich fixes up bitrate and bits_per_sample. potentially also adding a codecid for the 20bit version and "fixing" codecid.
iam all in favor of that but iam not mpeg-ps/ts maintainer ...
Ok, it will finally end this thread, may I suggest a CODEC_ID_DVD_LPCM then ? And decoder which take bits_per_sample into account ?
ok [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws. -- Plato
Ok, it will finally end this thread, may I suggest a CODEC_ID_DVD_LPCM then ? And decoder which take bits_per_sample into account ?
ok
Imho, it shouldn't even remove the LPCM header, and behave as AC3/DTS. Then a parser wich get's bits per sample, bitrate and such and a decoder wich decodes to 16bit (wich seems default for audiocodecs for now) should be created. Also, I finally figured out how the channels are stored in LPCM. Pretty smart actually, mainly putting it here so it's documented somewhere :). LPCM stores the 16msb's of the first two samples for each channel first, then appended to the end of this is the 8 (or 4)lsb for each of the previous channels. eg: (4 channel 24bit) : 16msb of L1, R1, SL1, SR1, L2, R2, SL2, SR2. ( 2 * 4 * 16/8 = 16 bytes ) then 8lsb of L1, R1, SL1, SR1, L2, R2, SL2, SR2. ( 2 * 4 * 8/8 = 8 bytes ) eg: (3 channel, 20bit) : 16msb of L1, R1, C1, L2, R2, C2. ( 2 * 3 * 16/8 = 12 bytes ) then 4lsb of L1, R1, C1, L2, R2, C2. ( 2 * 3 * 4/8 = 3 bytes ) A player wich only can handle 16bit, can then easily just ditch all of the lsb data and use the 16msb bits that comes first wich, has been noticed before, is in bigendian byteorder. Joakim
Hi elupus wrote:
Ok, it will finally end this thread, may I suggest a CODEC_ID_DVD_LPCM then ? And decoder which take bits_per_sample into account ? ok
Imho, it shouldn't even remove the LPCM header, and behave as AC3/DTS. Then a parser wich get's bits per sample, bitrate and such and a decoder wich decodes to 16bit (wich seems default for audiocodecs for now) should be created.
Well I don't mind, but take care that pcm in dvd does not have any syncword/pattern, so parser will be "blind", dunno if that will be easy to handle, especially with broken/cut streams. -- Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA SMARTJOG S.A. http://www.smartjog.com Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA Phone: +33 1 49966312
Baptiste Coudurier a ?crit :
Hi
This patch add support for 20bit and 24bit lpcm in MPEG PS. There are 4 cases, I dunno if factorizing code is worth, It did not look cleaner, I'm not sure though.
Vob samples with 20bit, 24bit, multi channel and mono pcm can be found here: http://www.videohelp.com/~jsoto/AudioTests/
Mans ? Michael ? Do you have something to say ? That patch add feature and fix a broken behaviour. -- Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA checking for life_signs in -lkenny... no
Hi On Sun, Oct 01, 2006 at 04:50:19PM +0200, Baptiste Coudurier wrote:
Baptiste Coudurier a ?crit :
Hi
This patch add support for 20bit and 24bit lpcm in MPEG PS. There are 4 cases, I dunno if factorizing code is worth, It did not look cleaner, I'm not sure though.
Vob samples with 20bit, 24bit, multi channel and mono pcm can be found here: http://www.videohelp.com/~jsoto/AudioTests/
Mans ? Michael ? Do you have something to say ? That patch add feature and fix a broken behaviour.
id say this stuff should be deobfuscated by a bitstream filter ... but thats just IMHO as you asked ... mans is mpeg-ps maintainer ... [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB In the past you could go to a library and read, borrow or copy any book Today you'd get arrested for mere telling someone where the library is
participants (6)
-
baptiste.coudurier@smartjog.com -
diego@biurrun.de -
elupus@ecce.se -
michaelni@gmx.at -
mru@inprovide.com -
Reimar.Doeffinger@stud.uni-karlsruhe.de