| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 | 11 |
| 12 /**************************************************************************** | 12 /**************************************************************************** |
| 13 * | 13 * |
| 14 * Module Title : scale.c | 14 * Module Title : scale.c |
| 15 * | 15 * |
| 16 * Description : Image scaling functions. | 16 * Description : Image scaling functions. |
| 17 * | 17 * |
| 18 ***************************************************************************/ | 18 ***************************************************************************/ |
| 19 | 19 |
| 20 /**************************************************************************** | 20 /**************************************************************************** |
| 21 * Header Files | 21 * Header Files |
| 22 ****************************************************************************/ | 22 ****************************************************************************/ |
| 23 #include "./vpx_scale_rtcd.h" | 23 #include "./vpx_scale_rtcd.h" |
| 24 #include "vpx_mem/vpx_mem.h" | 24 #include "vpx_mem/vpx_mem.h" |
| 25 #include "vpx_scale/vpx_scale.h" |
| 25 #include "vpx_scale/yv12config.h" | 26 #include "vpx_scale/yv12config.h" |
| 26 | 27 |
| 27 typedef struct { | 28 typedef struct { |
| 28 int expanded_frame_width; | 29 int expanded_frame_width; |
| 29 int expanded_frame_height; | 30 int expanded_frame_height; |
| 30 | 31 |
| 31 int HScale; | 32 int HScale; |
| 32 int HRatio; | 33 int HRatio; |
| 33 int VScale; | 34 int VScale; |
| 34 int VRatio; | 35 int VRatio; |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 temp_area, temp_height, hscale, hratio, vscale, vratio, interlaced); | 522 temp_area, temp_height, hscale, hratio, vscale, vratio, interlaced); |
| 522 | 523 |
| 523 if (dw / 2 < (int)dst->uv_width) | 524 if (dw / 2 < (int)dst->uv_width) |
| 524 for (i = 0; i < dst->uv_height; i++) | 525 for (i = 0; i < dst->uv_height; i++) |
| 525 memset(dst->v_buffer + i * dst->uv_stride + dw / 2 - 1, dst->v_buffer[i *
dst->uv_stride + dw / 2 - 2], dst->uv_width - dw / 2 + 1); | 526 memset(dst->v_buffer + i * dst->uv_stride + dw / 2 - 1, dst->v_buffer[i *
dst->uv_stride + dw / 2 - 2], dst->uv_width - dw / 2 + 1); |
| 526 | 527 |
| 527 if (dh / 2 < (int) dst->uv_height) | 528 if (dh / 2 < (int) dst->uv_height) |
| 528 for (i = dh / 2 - 1; i < (int)dst->y_height / 2; i++) | 529 for (i = dh / 2 - 1; i < (int)dst->y_height / 2; i++) |
| 529 memcpy(dst->v_buffer + i * dst->uv_stride, dst->v_buffer + (dh / 2 - 2)*ds
t->uv_stride, dst->uv_width); | 530 memcpy(dst->v_buffer + i * dst->uv_stride, dst->v_buffer + (dh / 2 - 2)*ds
t->uv_stride, dst->uv_width); |
| 530 } | 531 } |
| OLD | NEW |