[FFmpeg-devel] [PATCH] HE-AAC v1 try 5

Måns Rullgård mans
Mon Mar 8 16:30:46 CET 2010


Michael Niedermayer <michaelni at gmx.at> writes:

> On Mon, Mar 08, 2010 at 02:04:21PM +0000, M?ns Rullg?rd wrote:
>> Michael Niedermayer <michaelni at gmx.at> writes:
>> 
>> > On Sun, Mar 07, 2010 at 07:06:36PM -0800, Jason Garrett-Glaser wrote:
>> >> 2010/3/6 M?ns Rullg?rd <mans at mansr.com>:
>> >> > Michael Niedermayer <michaelni at gmx.at> writes:
>> >> >
>> >> >> One thing though must be resolved first, and that are the variable names
>> >> >> they are all 1:1 copied from the spec and i do not know if we can legally
>> >> >> include this in a *GPL program in terms of copyright.
>> >> >
>> >> > Of course we can. ?Copyright doesn't extend that far.
>> >> 
>> >> And if we couldn't, then we better start rewriting the H.264 decoder.
>> >
>> > our h264 decoder likely uses the same terms/variables as the spec
>> > to refer to things. the code here though uses the same variable names
>> > as sample C code in the spec.
>> 
>> No difference from a copyright point of view.
>> 
>> >> This is a stupid concern.
>> >
>> > then id like to know why did we had to rewrite an idct that was taken from
>> > reference code?
>> > Whats the difference that now its supposed to be ok but previously in a
>> > similar case it was not?
>> 
>> Copying of entire non-trivial functions falls squarely within the
>> realm of copyright.  Using the same names in otherwise original code
>> does not.
>
> heres the code i meant
>
> spec:
> msb = k0
> usb = kx
> numPatches = 0
> goalSb = NINT( 2.048E6 / Fs )
> if (goalSb < kx + M)
>     for (i = 0, k = 0 ; fMaster[i] < goalSb; i++){
>          k=i+1
>     }
> else
>     k = NMaster
>
> patch:
> +    int msb = sbr->k[0];
> +    int usb = sbr->k[4];
> +    int goal_sb = ((1000 << 11) + (sbr->sample_rate >> 1)) / sbr->sample_rate;
> +
> +    sbr->num_patches = 0;
> +
> +    if (goal_sb < sbr->k[4] + sbr->m[1]) {
> +        for (k = 0; sbr->f_master[k] < goal_sb; k++) ;
> +    } else
> +        k = sbr->n_master;

This is what I'd call trivial.  Short of outright obfuscation, I can't
think of anything radically different achieving the same functionality.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list