[Ffmpeg-devel] Re: [Ffmpeg-cvslog] CVS: ffmpeg/libavcodec dv.c, 1.72, 1.73
Roman Shaposhnick
rvs
Fri Feb 24 18:44:41 CET 2006
On Thu, Feb 23, 2006 at 09:21:57PM -0500, Dan Maas wrote:
> > for(a=2; a==2 || vs_total_ac_bits < size[0]; a+=a){
> > b = blks;
> > size[0] = 0;
>
> I could be wrong, but shouldn't that be
> size[0] = (6*5)*4;
> to account for the 4-bit EOB code in each block?
Right! Good catch.
> > Are you sure that we need this chunk of code ? My concern is -- in case
> > where encoder maxes out on all QNOs being 0s -- there's very little we
> > can to do salvage the situation anyway. Or did you have another idea
> > when creating this chunk of code ?
>
> Actually I like that addition... IMHO it is better to zero out the
> high frequencies rather than run out of space and get essentially
> random/undefined results.
>
> You can see this by trying to encode pure noise. Most blocks run out
> of space before encoding all the coefficients, which creates some odd
> visual patterns. IMHO blurring out the noise is preferable to creating
> structured artifacts.
Sounds reasonable. I was just curious that this case doesn't seem to
be covered by the DV spec which makes it sort of an undefined behaviour.
But then, again, I only have an SMTPE one, so may be it *is* covered
by the original Sony's SPEC, so if anybosy knows for sure please check
it out.
Otherwise I'm totally fine with this plan.
Thanks,
Roman.
More information about the ffmpeg-devel
mailing list