[FFmpeg-devel] Replacement for AVCodecContext::directpred
Michael Niedermayer
michaelni at gmx.at
Sun Jul 14 20:54:59 CEST 2013
On Sun, Jul 14, 2013 at 10:40:30PM +0600, Saint Atique wrote:
> 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?
direct pred is available as codec specific option:
libavcodec/libx264.c: { "direct-pred", "Direct MV prediction mode", OFFSET(direct_pred), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, VE, "direct-pred" },
also see avcodec_open2()
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130714/edee390f/attachment.asc>
More information about the ffmpeg-devel
mailing list