[FFmpeg-devel] VQA v3 (was: Re: GSoC 2009)

The Deep Explorer thedeepexplorer
Wed Mar 25 08:10:40 CET 2009


> Get the existing FFmpeg code compiled. Download some of the v1 and v2 VQA
> files. Run a command like:
>
> ffmpeg -i file.vqa file.avi
>

I have been trying to understand the code flow ...put some av_logs to
understand...

the following ./ffmpeg -i aagun.vqa file.avi
command gives me the  following


############### avcodec_register_all #########
###############  avdevice_register_all #########
###############  av_register_all #########

[vqavideo @ 0x88c0d90]

####### vqa_decode_init  @@@@#########

[vqavideo @ 0x88c0d90]
nside after avctx->codec->init
Input #0, wsvqa, from 'aagun.vqa':
  Duration: 00:04:58.93, bitrate: 88 kb/s
    Stream #0.0: Video: vqavideo, pal8, 320x156, 15 tbr, 15 tbn, 15 tbc
    Stream #0.1: Audio: adpcm_ima_ws, 22050 Hz, mono, s16, 88 kb/s
File 'file.avi' already exists. Overwrite ? [y/N] y


############### entered av_encode #########
###############  Video Codec CODEC_TYPE #########
###############  Video found the right codec ######### 0
[mpeg4 @ 0x88e6ae0]
inside after avctx->codec->init
[mpeg4 @ 0x88e6ae0]
inside after avctx->codec->init
###############  found the right codec ######### 1
[mp2 @ 0x88e7030]
inside after avctx->codec->init

###############  Video Opening the Decoder with  #########

[vqavideo @ 0x88c0d90]

####### vqa_decode_init  @@@@#########

[vqavideo @ 0x88c0d90]
inside after avctx->codec->init

###############  Video Opening the Decoder with  #########

[adpcm_ima_ws @ 0x88c1340]
inside after avctx->codec->init
Output #0, avi, to 'file.avi':
    Stream #0.0: Video: mpeg4, yuv420p, 320x156, q=2-31, 200 kb/s, 15
tbn, 15 tbc
    Stream #0.1: Audio: mp2, 22050 Hz, mono, s16, 64 kb/s
 Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop encoding
[mpeg4 @ 0x88e6ae0]
 inside avcodec_encode_video
frame=  304 fps=196 q=5.5 Lsize=     819kB time=20.27 bitrate= 331.1kbits/s
video:631kB audio:162kB global headers:0kB muxing overhead 3.316194%

Can someone tell me how does the first vqa_decode_init call takes place ?
The first time what is the code path ?

avcodec_open is getting called inside av_encode ( the function which
controls everything)
I got lost here ret = avctx->codec->init(avctx); in libavcodec/utils.c
it seems that this is the one calling vqa_decode_init
Am I right ?

My understanding is that first it is being decoded using the vqa
decoder and then encoded
into an avi container....and this is done frame by frame...calls take
place at output_packet
from where the decoder is getting called...

What is the best way to output all the debug messages ?

I have not tried to install cscope for ffmpeg, but I am planning to do so...
Any advise is appreciated...

Thanks,
-tde



More information about the ffmpeg-devel mailing list