[FFmpeg-devel] AVfilter with changing pixel format

Marton Balint cus at passwd.hu
Tue Jun 5 02:53:02 CEST 2012


Hi,

I'm trying to fix ffplay to be able to use avfilter with changing input 
pixel format. I'm a bit confused how it should be done.

The way I see it I'm going to get a new pixel format in input_get_buffer 
callback of the codec, where I should allocate the necessary space for the 
frame by calling avfilter_get_video_buffer.

But I cannot give a custom pixel format to avfilter_get_video_buffer, it 
is always using the link pixel format. Wouldn't it make sense to be able 
to pass the pixel format as parameter to
  - avfilter_get_video_buffer
  - ff/avfilter_null_get_video_buffer
  - avfilter_default_get_video_buffer
  - get_video_buffer callback of AVFilterPad

Can this be done while not breaking the API? Is there another way?

I just did a quick replace of the above calls with the pixelformat enabled 
versions, and pixel format changing started working like a charm.

I am not too familiar with the filter api, so any pointers to what should 
be done and how would be greatly appreciated.

Thanks,
Marton


More information about the ffmpeg-devel mailing list