[FFmpeg-devel] Replacement for AVCodecContext::directpred

Saint Atique unix9n at gmail.com
Sun Jul 14 18:40:30 CEST 2013


Hi,
Inside header file avcodec.h previously there was a declaration of
directpred as a member of structure AVCodecContext like this
    /**
     * direct MV prediction mode - 0 (none), 1 (spatial), 2 (temporal), 3
(auto)
     * - encoding: Set by user.
     * - decoding: unused
     */
    int directpred;

directpred has been removed later from ffmpeg.

I previously used directpred = 3 in my code. Now that I am planning to
upgrade ffmpeg library to the recent release for this windows application I
had to comment this line. However, it is giving slightly different output
for the encode function: avcodec_encode_video. Output video is worse in
quality and seems to be losing some information.

What is the replacement for directpred?

How can I make avcodec_encode_video encode just like before? I haven't
changed other parts of the code of the application except
replacing avcodec_alloc_context() with avcodec_alloc_context3()
and avcodec_open() with avcodec_open2() etc.

Can you please tell me how the member directpred affects the video encode
function and how it has changed over time and has been removed?

Regards.
Atique


More information about the ffmpeg-devel mailing list