[vlc-devel] [PATCH 1/1] codec/dirac: Rewrite libdirac encoding support; Remove decoding support

Laurent Aimar fenrir at via.ecp.fr
Mon Nov 10 19:14:38 CET 2008


On Mon, Nov 10, 2008, David Flynn wrote:
> On 2008-11-10, Laurent Aimar <fenrir at via.ecp.fr> wrote:
> > On Mon, Nov 10, 2008, David Flynn wrote:
> >> On 2008-11-10, Laurent Aimar <fenrir at via.ecp.fr> wrote:
> >> > On Mon, Nov 10, 2008, davidf+nntp at woaf.net wrote:
> >> >> +#define ENC_BUFSIZE 1024*1024*10
> >  Well assuming the standard worst case is 1:1 you have width*height*3/2 for
> > i420 which is more than 10Mbytes for 8K video.
> >  Anyway, it is a regression from the previous code if I am reading it right.
> >  I would like to avoid that. A __MAX with the a*w*h and a constant value (even
> > 10Mbytes) is a possible solution.
> 
> Previous version used 1MB.  I'll use the __MAX() route.
 I have been abused by the comment:
>    /* Set the buffer size for the encoded picture */
>    p_sys->i_buffer_in = p_enc->fmt_in.video.i_width *
>        p_enc->fmt_in.video.i_height * 3 / 2;
>    p_sys->p_buffer_in = malloc( p_sys->i_buffer_in );
 as I thought that "encoded picture" was the bitstream and not the picture
to be encoded.

> >  An error log when it is not enough for the output would be usefull to detect
> > errors.
> I shall see if that is possible.
 Thanks,

> Yes -- there is a /* TODO: detect change of interlace */ or somesuch at
> the start of the function.
> 
> The encoder won't blow up in your face -- the quality just won't be as
> good as it should be.  The eventual plan is for interlaced detection to
> be moved inside the encoder -- it then becomes a non issue.
 Ok.

> Ok, i've been trying to keep in style by using if( foo ), must've missed
> some.
> but it does vary according to (a) what was there before, (b) asthetics
> of the block of code, (c) amount of real estate to loose
> 
> I'll try and make it a little more vlc style.
 Thanks.

-- 
fenrir




More information about the vlc-devel mailing list