1/*
2 *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3 *
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
6 *  tree. An additional intellectual property rights grant can be found
7 *  in the file PATENTS.  All contributing project authors may
8 *  be found in the AUTHORS file in the root of the source tree.
9 */
10
11
12#ifndef VP8_COMMON_RECONINTRA4X4_H_
13#define VP8_COMMON_RECONINTRA4X4_H_
14#include "vp8/common/blockd.h"
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20static void intra_prediction_down_copy(MACROBLOCKD *xd,
21                                             unsigned char *above_right_src)
22{
23    int dst_stride = xd->dst.y_stride;
24    unsigned char *above_right_dst = xd->dst.y_buffer - dst_stride + 16;
25
26    unsigned int *src_ptr = (unsigned int *)above_right_src;
27    unsigned int *dst_ptr0 = (unsigned int *)(above_right_dst + 4 * dst_stride);
28    unsigned int *dst_ptr1 = (unsigned int *)(above_right_dst + 8 * dst_stride);
29    unsigned int *dst_ptr2 = (unsigned int *)(above_right_dst + 12 * dst_stride);
30
31    *dst_ptr0 = *src_ptr;
32    *dst_ptr1 = *src_ptr;
33    *dst_ptr2 = *src_ptr;
34}
35
36#ifdef __cplusplus
37}  // extern "C"
38#endif
39
40#endif  // VP8_COMMON_RECONINTRA4X4_H_
41