/* * Copyright (c) 2016 The WebM project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree.
*/ #include <assert.h> #include <stdlib.h> #include"./vpx_dsp_rtcd.h" #include"vpx/vpx_integer.h"
void vpx_post_proc_down_and_across_mb_row_c(unsignedchar *src, unsignedchar *dst, int src_pitch, int dst_pitch, int cols, unsignedchar *flimits, int size) { unsignedchar *p_src, *p_dst; int row; int col; unsignedchar v; unsignedchar d[4];
assert(size >= 8);
assert(cols >= 8);
for (row = 0; row < size; row++) { /* post_proc_down for one row */
p_src = src;
p_dst = dst;
void vpx_mbpost_proc_across_ip_c(unsignedchar *src, int pitch, int rows, int cols, int flimit) { int r, c, i;
unsignedchar *s = src; unsignedchar d[16];
for (r = 0; r < rows; r++) { int sumsq = 16; int sum = 0;
for (i = -8; i < 0; i++) s[i] = s[0];
/* 17 avoids valgrind warning - we buffer values in c in d * and only write them when we've read 8 ahead...
*/ for (i = 0; i < 17; i++) s[i + cols] = s[cols - 1];
for (i = -8; i <= 6; i++) {
sumsq += s[i] * s[i];
sum += s[i];
d[i + 8] = 0;
}
for (c = 0; c < cols + 8; c++) { int x = s[c + 7] - s[c - 8]; int y = s[c + 7] + s[c - 8];
sum += x;
sumsq += x * y;
d[c & 15] = s[c];
if (sumsq * 15 - sum * sum < flimit) {
d[c & 15] = (8 + sum + s[c]) >> 4;
}
s[c - 8] = d[(c - 8) & 15];
}
s += pitch;
}
}
void vpx_mbpost_proc_down_c(unsignedchar *dst, int pitch, int rows, int cols, int flimit) { int r, c, i;
for (c = 0; c < cols; c++) { unsignedchar *s = &dst[c]; int sumsq = 0; int sum = 0; unsignedchar d[16];
for (i = -8; i < 0; i++) s[i * pitch] = s[0];
/* 17 avoids valgrind warning - we buffer values in c in d * and only write them when we've read 8 ahead...
*/ for (i = 0; i < 17; i++) s[(i + rows) * pitch] = s[(rows - 1) * pitch];
for (i = -8; i <= 6; i++) {
sumsq += s[i * pitch] * s[i * pitch];
sum += s[i * pitch];
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.