From 3406b5035f29d53d4871293f2b513e613855a23b Mon Sep 17 00:00:00 2001 From: Emeric Grange Date: Mon, 14 Nov 2011 16:28:05 +0100 Subject: g3dvl: Merge extend.c and decodeframe.c Signed-off-by: Emeric Grange --- src/gallium/auxiliary/Makefile.sources | 1 - src/gallium/auxiliary/vl/vp8/common/extend.c | 41 ---------------------- src/gallium/auxiliary/vl/vp8/common/extend.h | 19 ---------- src/gallium/auxiliary/vl/vp8/decoder/decodeframe.c | 32 ++++++++++++++++- 4 files changed, 31 insertions(+), 62 deletions(-) delete mode 100644 src/gallium/auxiliary/vl/vp8/common/extend.c delete mode 100644 src/gallium/auxiliary/vl/vp8/common/extend.h diff --git a/src/gallium/auxiliary/Makefile.sources b/src/gallium/auxiliary/Makefile.sources index 3bcf232e7f..36ca41694b 100644 --- a/src/gallium/auxiliary/Makefile.sources +++ b/src/gallium/auxiliary/Makefile.sources @@ -160,7 +160,6 @@ C_SOURCES := \ vl/vp8/common/entropy.c \ vl/vp8/common/entropymode.c \ vl/vp8/common/entropymv.c \ - vl/vp8/common/extend.c \ vl/vp8/common/filter.c \ vl/vp8/common/findnearmv.c \ vl/vp8/common/idctllm.c \ diff --git a/src/gallium/auxiliary/vl/vp8/common/extend.c b/src/gallium/auxiliary/vl/vp8/common/extend.c deleted file mode 100644 index 5ce1c8cc7f..0000000000 --- a/src/gallium/auxiliary/vl/vp8/common/extend.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. - */ - - -#include "../vp8_mem.h" -#include "extend.h" - -/* note the extension is only for the last row, for intra prediction purpose */ -void vp8_extend_mb_row(YV12_BUFFER_CONFIG *ybf, unsigned char *YPtr, unsigned char *UPtr, unsigned char *VPtr) -{ - int i; - - YPtr += ybf->y_stride * 14; - UPtr += ybf->uv_stride * 6; - VPtr += ybf->uv_stride * 6; - - for (i = 0; i < 4; i++) - { - YPtr[i] = YPtr[-1]; - UPtr[i] = UPtr[-1]; - VPtr[i] = VPtr[-1]; - } - - YPtr += ybf->y_stride; - UPtr += ybf->uv_stride; - VPtr += ybf->uv_stride; - - for (i = 0; i < 4; i++) - { - YPtr[i] = YPtr[-1]; - UPtr[i] = UPtr[-1]; - VPtr[i] = VPtr[-1]; - } -} diff --git a/src/gallium/auxiliary/vl/vp8/common/extend.h b/src/gallium/auxiliary/vl/vp8/common/extend.h deleted file mode 100644 index 4584dee51d..0000000000 --- a/src/gallium/auxiliary/vl/vp8/common/extend.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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. - */ - - -#ifndef EXTEND_H -#define EXTEND_H - -#include "yv12utils.h" - -void vp8_extend_mb_row(YV12_BUFFER_CONFIG *ybf, unsigned char *YPtr, unsigned char *UPtr, unsigned char *VPtr); - -#endif /* EXTEND_H */ diff --git a/src/gallium/auxiliary/vl/vp8/decoder/decodeframe.c b/src/gallium/auxiliary/vl/vp8/decoder/decodeframe.c index 7efdfe559e..747f233329 100644 --- a/src/gallium/auxiliary/vl/vp8/decoder/decodeframe.c +++ b/src/gallium/auxiliary/vl/vp8/decoder/decodeframe.c @@ -24,7 +24,6 @@ #include "../common/setupintrarecon.h" #include "decodemv.h" -#include "../common/extend.h" #include "../vp8_mem.h" #include "../common/idct.h" #include "dboolhuff.h" @@ -161,6 +160,37 @@ static int get_delta_q(vp8_reader *bc, int prev, int *q_update) return ret_val; } +/* note the extension is only for the last row, for intra prediction purpose */ +static void vp8_extend_mb_row(YV12_BUFFER_CONFIG *ybf, + unsigned char *YPtr, + unsigned char *UPtr, + unsigned char *VPtr) +{ + int i; + + YPtr += ybf->y_stride * 14; + UPtr += ybf->uv_stride * 6; + VPtr += ybf->uv_stride * 6; + + for (i = 0; i < 4; i++) + { + YPtr[i] = YPtr[-1]; + UPtr[i] = UPtr[-1]; + VPtr[i] = VPtr[-1]; + } + + YPtr += ybf->y_stride; + UPtr += ybf->uv_stride; + VPtr += ybf->uv_stride; + + for (i = 0; i < 4; i++) + { + YPtr[i] = YPtr[-1]; + UPtr[i] = UPtr[-1]; + VPtr[i] = VPtr[-1]; + } +} + static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd, unsigned int mb_idx) { int eobtotal = 0; -- cgit v1.2.3