[FFmpeg-devel] new filter infastructure stuff (Google Summer of Fun)
mmh
mmh
Tue Jun 5 04:38:33 CEST 2007
mark cox writes:
> >
> >
> >
> > On the audio stuff, I like that libaf stuff as it sits right now its
> > not bad its fairly simple however its gpl and not lgpl. It would be
> > nice if there was an acceptable way to include it into ffmpeg before
> > next years SOC.
>
> 2 options:
> A. get the authors from the svn logs and email them to ask if they will
> relicence as lgpl.
> B. ffmpeg does not exclude gpl code. Include the code as is. with a libaf
> configure option.
A is a pain, I guess B is the better option. I'm thinking to put a
small wrapper in ffmpeg to handle option 'B' would be easiest approach. I
don't think I would include dec_audio.c from libmpcodecs but a new
simplified mechanism which just envoked the filter chain itself.
oafd = af_play (audio_filter_chain, iafd);
I guess that would get integrated roughly around here:
ffmpeg.c:1130:
// preprocess audio (volume)
if (ist->st->codec->codec_type == CODEC_TYPE_AUDIO) {
if (audio_filter_chain) {
iafd->audio = samples;
iafd->len = data_size;
...
oafd = af_play (audio_filter_chain, iafd);
if (!oafd)
report error but continue?
else {
...
memcpy (samples, oafd->audio, oafd->len);
...
}
}
if (audio_volume != 256) {
short *volp;
volp = samples;
for(i=0;i<(data_size / sizeof(short));i++) {
int v = ((*volp) * audio_volume + 128) >> 8;
if (v < -32768) v = -32768;
if (v > 32767) v = 32767;
*volp++ = v;
}
}
}
Thoughts?
Thanks
Marc
More information about the ffmpeg-devel
mailing list