/* * Copyright (c) 2010 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.
*/
staticvoid extend_plane(uint8_t *const src, int src_stride, int width, int height, int extend_top, int extend_left, int extend_bottom, int extend_right) { int i; constint linesize = extend_left + extend_right + width;
/* copy the left and right most columns out */
uint8_t *src_ptr1 = src;
uint8_t *src_ptr2 = src + width - 1;
uint8_t *dst_ptr1 = src - extend_left;
uint8_t *dst_ptr2 = src + width;
for (i = 0; i < height; ++i) {
memset(dst_ptr1, src_ptr1[0], extend_left);
memset(dst_ptr2, src_ptr2[0], extend_right);
src_ptr1 += src_stride;
src_ptr2 += src_stride;
dst_ptr1 += src_stride;
dst_ptr2 += src_stride;
}
/* Now copy the top and bottom lines into each line of the respective * borders
*/
src_ptr1 = src - extend_left;
src_ptr2 = src + src_stride * (height - 1) - extend_left;
dst_ptr1 = src + src_stride * -extend_top - extend_left;
dst_ptr2 = src + src_stride * height - extend_left;
for (i = 0; i < extend_top; ++i) {
memcpy(dst_ptr1, src_ptr1, linesize);
dst_ptr1 += src_stride;
}
for (i = 0; i < extend_bottom; ++i) {
memcpy(dst_ptr2, src_ptr2, linesize);
dst_ptr2 += src_stride;
}
}
#if CONFIG_VP9_HIGHBITDEPTH staticvoid extend_plane_high(uint8_t *const src8, int src_stride, int width, int height, int extend_top, int extend_left, int extend_bottom, int extend_right) { int i; constint linesize = extend_left + extend_right + width;
uint16_t *src = CONVERT_TO_SHORTPTR(src8);
/* copy the left and right most columns out */
uint16_t *src_ptr1 = src;
uint16_t *src_ptr2 = src + width - 1;
uint16_t *dst_ptr1 = src - extend_left;
uint16_t *dst_ptr2 = src + width;
for (i = 0; i < height; ++i) {
vpx_memset16(dst_ptr1, src_ptr1[0], extend_left);
vpx_memset16(dst_ptr2, src_ptr2[0], extend_right);
src_ptr1 += src_stride;
src_ptr2 += src_stride;
dst_ptr1 += src_stride;
dst_ptr2 += src_stride;
}
/* Now copy the top and bottom lines into each line of the respective * borders
*/
src_ptr1 = src - extend_left;
src_ptr2 = src + src_stride * (height - 1) - extend_left;
dst_ptr1 = src + src_stride * -extend_top - extend_left;
dst_ptr2 = src + src_stride * height - extend_left;
for (i = 0; i < extend_top; ++i) {
memcpy(dst_ptr1, src_ptr1, linesize * sizeof(uint16_t));
dst_ptr1 += src_stride;
}
for (i = 0; i < extend_bottom; ++i) {
memcpy(dst_ptr2, src_ptr2, linesize * sizeof(uint16_t));
dst_ptr2 += src_stride;
}
} #endif
// Copies the source image into the destination image and updates the // destination's UMV borders. // Note: The frames are assumed to be identical in size.
#if 0 /* These assertions are valid in the codec, but the libvpx-tester uses * this code slightly differently.
*/
assert(src_ybc->y_width == dst_ybc->y_width);
assert(src_ybc->y_height == dst_ybc->y_height); #endif
#if 0 /* These assertions are valid in the codec, but the libvpx-tester uses * this code slightly differently.
*/
assert(src_ybc->y_width == dst_ybc->y_width);
assert(src_ybc->y_height == dst_ybc->y_height); #endif
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.