Content-type: text/html
cc [ flag... ] file... -lmlib [ library... ] #include <mlib.h> mlib_status mlib_VideoH263OverlappedMC_S16_U8(mlib_s16 mc_block[64], const mlib_u8 *ref_frame, mlib_s32 mch, mlib_s32 mcv, mlib_s32 mah, mlib_s32 mav, mlib_s32 mbh, mlib_s32 mbv, mlib_s32 mlh, mlib_s32 mlv, mlib_s32 mrh, mlib_s32 mrv, mlib_s32 ref_stride);
The mlib_VideoH263OverlappedMC_S16_U8() function generates an 8x8 luminance prediction block (motion-compensated block) in the Advanced Prediction Mode for H.263 codec. The reference frame in this function is an interpolated frame. The output of this function must be added to the IDCT output in order to reconstruct the block in the current frame.
The following equation is used:
for x = 0, 1, 2, 3; y = 0, 1, 2, 3
mc(x, y) = (ref(2x + mch, 2y + mcv)*H0(x, y) + ref(2x + mah, 2y + mav)*H1(x, y) + ref(2x + mlh, 2y + mlv)*H2(x, y)) / 8;
for x = 4, 5, 6, 7; y = 0, 1, 2, 3
mc(x, y) = (ref(2x + mch, 2y + mcv)*H0(x, y) + ref(2x + mah, 2y + mav)*H1(x, y) + ref(2x + mrh, 2y + mrv)*H2(x, y)) / 8;
for x = 0, 1, 2, 3; y = 4, 5, 6, 7
mc(x, y) = (ref(2x + mch, 2y + mcv)*H0(x, y) + ref(2x + mbh, 2y + mbv)*H1(x, y) + ref(2x + mlh, 2y + mlv)*H2(x, y)) / 8;
for x = 4, 5, 6, 7; y = 4, 5, 6, 7
mc(x, y) = (ref(2x + mch, 2y + mcv)*H0(x, y) + ref(2x + mbh, 2y + mbv)*H1(x, y) + ref(2x + mrh, 2y + mrv)*H2(x, y)) / 8;
where
[ 4 5 5 5 5 5 5 4 ] | 5 5 5 5 5 5 5 5 | | 5 5 6 6 6 6 5 5 | H0 = | 5 5 6 6 6 6 5 5 | | 5 5 6 6 6 6 5 5 | | 5 5 6 6 6 6 5 5 | | 5 5 5 5 5 5 5 5 | [ 4 5 5 5 5 5 5 4 ] [ 2 2 2 2 2 2 2 2 ] | 1 1 2 2 2 2 1 1 | | 1 1 1 1 1 1 1 1 | H1 = | 1 1 1 1 1 1 1 1 | | 1 1 1 1 1 1 1 1 | | 1 1 1 1 1 1 1 1 | | 1 1 2 2 2 2 1 1 | [ 2 2 2 2 2 2 2 2 ] [ 2 1 1 1 1 1 1 2 ] | 2 2 1 1 1 1 2 2 | | 2 2 1 1 1 1 2 2 | H2 = | 2 2 1 1 1 1 2 2 | | 2 2 1 1 1 1 2 2 | | 2 2 1 1 1 1 2 2 | | 2 2 1 1 1 1 2 2 | [ 2 1 1 1 1 1 1 2 ]
The function takes the following arguments:
mc_block
ref_frame
mch
mcv
mah
mav
mbh
mbv
mlh
mlv
mrh
mrv
ref_stride
The function returns MLIB_SUCCESS if successful. Otherwise it returns MLIB_FAILURE.
See attributes(5) for descriptions of the following attributes:
|
mlib_VideoAddBlock_U8_S16(3MLIB), mlib_VideoCopyRef_S16_U8(3MLIB), mlib_VideoCopyRef_S16_U8_16x16(3MLIB), mlib_VideoCopyRef_U8_U8_16x16(3MLIB), mlib_VideoCopyRefAve_U8_U8_16x16(3MLIB), mlib_VideoH263OverlappedMC_U8_U8(3MLIB), mlib_VideoInterpAveX_U8_U8(3MLIB), mlib_VideoInterpAveX_U8_U8_16x16(3MLIB), mlib_VideoInterpAveXY_U8_U8(3MLIB), mlib_VideoInterpAveXY_U8_U8_16x16(3MLIB), mlib_VideoInterpAveY_U8_U8(3MLIB), mlib_VideoInterpAveY_U8_U8_16x16(3MLIB), mlib_VideoInterpX_S16_U8(3MLIB), mlib_VideoInterpX_S16_U8_16x16(3MLIB), mlib_VideoInterpX_U8_U8(3MLIB), mlib_VideoInterpXY_S16_U8(3MLIB), mlib_VideoInterpXY_S16_U8_16x16(3MLIB), mlib_VideoInterpXY_U8_U8(3MLIB), mlib_VideoInterpXY_U8_U8_16x16(3MLIB), mlib_VideoInterpY_S16_U8(3MLIB), mlib_VideoInterpY_S16_U8_16x16(3MLIB), mlib_VideoInterpY_U8_U8(3MLIB), mlib_VideoInterpY_U8_U8_16x16(3MLIB), mlib_VideoP64Decimate_U8_U8(3MLIB), mlib_VideoP64Loop_S16_U8(3MLIB), mlib_VideoP64Loop_U8_U8(3MLIB), attributes(5)