#include "bit_depth_template.c"
static void FUNC(ff_emulated_edge_mc)(uint8_t *buf, const uint8_t *src,
#include "bit_depth_template.c"
static void FUNC(ff_emulated_edge_mc)(uint8_t *buf, const uint8_t *src,
int block_w, int block_h,
int src_x, int src_y, int w, int h)
{
int block_w, int block_h,
int src_x, int src_y, int w, int h)
{
int start_y, start_x, end_y, end_x;
if (src_y >= h) {
int start_y, start_x, end_y, end_x;
if (src_y >= h) {
buf += start_x * sizeof(pixel);
// top
for (y = 0; y < start_y; y++) {
memcpy(buf, src, w * sizeof(pixel));
buf += start_x * sizeof(pixel);
// top
for (y = 0; y < start_y; y++) {
memcpy(buf, src, w * sizeof(pixel));
for (; y < block_h; y++) {
memcpy(buf, src, w * sizeof(pixel));
for (; y < block_h; y++) {
memcpy(buf, src, w * sizeof(pixel));