星期五, 6月 30, 2006

ffmpeg - HIS modification

上一個post是"原版"的ffmpeg 內容,接著看HIS的修改.
原av_encode ( ) 切割為兩個function :
av_encode_open_stream( ) : initialize in/out stream variable
av_encode_video_thread( ) : 真正作encoding的地方.

av_encode_video_thread
read_packet( ) then free_packet - 丟掉第一個packet(why?)

for(;;)
av_read_packet 從inputstream 讀取一個packet到pkt中。

decode input packet (?) why ? 不是bt656嗎?

do_video_out : encode and write out(?)
重要的encoding 動作也是在do_video_out作
計算pts, frame同步

img_convert : convert picture pixel format ?? 一樣用ffmpeg的convert function,沒有用dsp作(why?)

resize : 也沒用dsp

img_resample : 也沒用dsp

avcodec_encode_video : 呼叫 encode( ) 作encode。

av_write_frame : 呼叫 write_packet 把encode好的pkt ......
s->oformat->write_packet
s : ageument of do_video_out : os
os = output_files[ost->file_index];

output_files[] 似乎是在opt_output_file 作initialize。
opt_output_file( )只有在parse_arg_file( )引用。
parse_arg_file( )只有在parse_options( )引用。
parse_options( )在 main 的一開始引用。
parse_arg_file 在 parse cmdline的filename (output filename?)。
用guess_format( )猜測filename 應該使用的格式.

沒有留言:

網誌存檔