MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / add_mb

Function add_mb

libavcodec/mpegutils.c:35–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33#include "mpegutils.h"
34
35static int add_mb(AVMotionVector *mb, uint32_t mb_type,
36 int dst_x, int dst_y,
37 int motion_x, int motion_y, int motion_scale,
38 int direction)
39{
40 mb->w = IS_8X8(mb_type) || IS_8X16(mb_type) ? 8 : 16;
41 mb->h = IS_8X8(mb_type) || IS_16X8(mb_type) ? 8 : 16;
42 mb->motion_x = motion_x;
43 mb->motion_y = motion_y;
44 mb->motion_scale = motion_scale;
45 mb->dst_x = dst_x;
46 mb->dst_y = dst_y;
47 mb->src_x = dst_x + motion_x / motion_scale;
48 mb->src_y = dst_y + motion_y / motion_scale;
49 mb->source = direction ? 1 : -1;
50 mb->flags = 0; // XXX: does mb_type contain extra information that could be exported here?
51 return 1;
52}
53
54void ff_draw_horiz_band(AVCodecContext *avctx,
55 const AVFrame *cur, const AVFrame *last,

Callers 1

ff_print_debug_info2Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected