[Ffmpeg-devel] [PATCH] flv adpcm encoder

Michael Niedermayer michaelni
Tue Mar 6 13:47:30 CET 2007


Hi

On Tue, Mar 06, 2007 at 10:28:42AM +0100, Benjamin Larsson wrote:
> Michael Niedermayer skrev:
> >Hi
> >
> >
> >On Mon, Mar 05, 2007 at 08:04:40AM +0100, Benjamin Larsson wrote:
> >  
> >>Jeff Clagg wrote:
> >>    
> >>>On Sun, Mar 04, 2007 at 10:51:50PM +0100, Benjamin Larsson wrote:
> >>>      
> >>>>Hi, this is an almost working by the specs adpcm encoder for flv and swf
> >>>>files. I think the reason it isn't work so well is because of the muxing
> >>>>and not the encoding. If the muxing isn't fixed there is not much reason
> >>>>for this patch to be applied.
> >>>>        
> >>>I'm very impressed by how small and elegant the code is.
> >>>      
> >>Thanks.
> >>
> >>Anyway, here is an updated less elegant version.
> >>    
> >
> >[...]
> >  
> >>@@ -180,6 +180,9 @@
> >>         avctx->frame_size = BLKSIZE * avctx->channels;
> >>         avctx->block_align = BLKSIZE;
> >>         break;
> >>+    case CODEC_ID_ADPCM_SWF:
> >>+        avctx->frame_size = 4*BLKSIZE * avctx->channels;
> >>+        break;
> >>    
> >
> >shouldnt block_align be initalized here too?
> >
> >[...]
> >  
> 
> I don't know what block_align does. 

its the number of bytes of an encoded packet if this is constant and
yes it doesnt seem that all adpcm encoders set it correctly


> It made no changes when I used it. 
> And it seams that the frame_size needs to be different depending on the 
> sampling frequency and video frame rate. So I guess the specs are wrong 
> or missleading.
> >[...]
> >for(i=0; i<avctx->channels; i++){
> >    put_bits(&pb, 16, samples[i] & 0xFFFF);
> >    put_bits(&pb, 6, c->status[i].step_index & 0x3F);
> >    c->status[i].prev_sample = (signed short)samples[i];
> >}
> >  
> I'll change that when the encoding and muxing are working. Can it be 
> applied when those issues are sorted out ?

apply the whole patch with the change if its all working? yes
apply the whole patch and the change seperately if its all working? yes
apply the whole patch with the change now? yes
apply the whole patch and the change seperately now? yes
apply the whole patch now and the change when its all working? no

have i awnsered your question? :)

[...]
-- 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070306/9878cd8c/attachment.pgp>



More information about the ffmpeg-devel mailing list