summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmeric Grange <emeric.grange@gmail.com>2012-01-19 17:39:42 +0100
committerEmeric Grange <emeric.grange@gmail.com>2012-06-24 16:57:33 +0200
commit879d00937efad11e887f3e5050e3dec4972a28d1 (patch)
tree030dd2c64d57c439a7f45e0a22592237c210415b
parentcd1efcdcdc66aa0fa81f291d4e98e2aaa662da46 (diff)
g3dvl: Move all of the software VP8 decoder into the same folder, unified the onyx*.* into vp8_decoder.*
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
-rw-r--r--src/gallium/auxiliary/Makefile.sources44
-rw-r--r--src/gallium/auxiliary/vl/vl_vp8_decoder.h5
-rw-r--r--src/gallium/auxiliary/vl/vp8/alloccommon.c (renamed from src/gallium/auxiliary/vl/vp8/common/alloccommon.c)5
-rw-r--r--src/gallium/auxiliary/vl/vp8/alloccommon.h (renamed from src/gallium/auxiliary/vl/vp8/common/alloccommon.h)2
-rw-r--r--src/gallium/auxiliary/vl/vp8/blockd.c (renamed from src/gallium/auxiliary/vl/vp8/common/blockd.c)0
-rw-r--r--src/gallium/auxiliary/vl/vp8/blockd.h (renamed from src/gallium/auxiliary/vl/vp8/common/blockd.h)4
-rw-r--r--src/gallium/auxiliary/vl/vp8/coefupdateprobs.h (renamed from src/gallium/auxiliary/vl/vp8/common/coefupdateprobs.h)0
-rw-r--r--src/gallium/auxiliary/vl/vp8/common/onyxd.h43
-rw-r--r--src/gallium/auxiliary/vl/vp8/decodeframe.c (renamed from src/gallium/auxiliary/vl/vp8/decoder/decodeframe.c)23
-rw-r--r--src/gallium/auxiliary/vl/vp8/decodemv.c (renamed from src/gallium/auxiliary/vl/vp8/decoder/decodemv.c)7
-rw-r--r--src/gallium/auxiliary/vl/vp8/decodemv.h (renamed from src/gallium/auxiliary/vl/vp8/decoder/decodemv.h)2
-rw-r--r--src/gallium/auxiliary/vl/vp8/decoder/onyxd_int.h58
-rw-r--r--src/gallium/auxiliary/vl/vp8/defaultcoefcounts.h (renamed from src/gallium/auxiliary/vl/vp8/common/defaultcoefcounts.h)0
-rw-r--r--src/gallium/auxiliary/vl/vp8/dequantize.c (renamed from src/gallium/auxiliary/vl/vp8/decoder/dequantize.c)0
-rw-r--r--src/gallium/auxiliary/vl/vp8/dequantize.h (renamed from src/gallium/auxiliary/vl/vp8/decoder/dequantize.h)2
-rw-r--r--src/gallium/auxiliary/vl/vp8/dequantize_common.c (renamed from src/gallium/auxiliary/vl/vp8/common/quant_common.c)2
-rw-r--r--src/gallium/auxiliary/vl/vp8/dequantize_common.h (renamed from src/gallium/auxiliary/vl/vp8/common/quant_common.h)8
-rw-r--r--src/gallium/auxiliary/vl/vp8/dequantize_dispatch.h (renamed from src/gallium/auxiliary/vl/vp8/decoder/dequantize_dispatch.h)0
-rw-r--r--src/gallium/auxiliary/vl/vp8/detokenize.c (renamed from src/gallium/auxiliary/vl/vp8/decoder/detokenize.c)7
-rw-r--r--src/gallium/auxiliary/vl/vp8/detokenize.h (renamed from src/gallium/auxiliary/vl/vp8/decoder/detokenize.h)2
-rw-r--r--src/gallium/auxiliary/vl/vp8/entropy.c (renamed from src/gallium/auxiliary/vl/vp8/common/entropy.c)7
-rw-r--r--src/gallium/auxiliary/vl/vp8/entropy.h (renamed from src/gallium/auxiliary/vl/vp8/common/entropy.h)2
-rw-r--r--src/gallium/auxiliary/vl/vp8/entropymode.c (renamed from src/gallium/auxiliary/vl/vp8/common/entropymode.c)2
-rw-r--r--src/gallium/auxiliary/vl/vp8/entropymode.h (renamed from src/gallium/auxiliary/vl/vp8/common/entropymode.h)4
-rw-r--r--src/gallium/auxiliary/vl/vp8/entropymv.c (renamed from src/gallium/auxiliary/vl/vp8/common/entropymv.c)0
-rw-r--r--src/gallium/auxiliary/vl/vp8/entropymv.h (renamed from src/gallium/auxiliary/vl/vp8/common/entropymv.h)2
-rw-r--r--src/gallium/auxiliary/vl/vp8/filter.c (renamed from src/gallium/auxiliary/vl/vp8/common/filter.c)2
-rw-r--r--src/gallium/auxiliary/vl/vp8/filter.h (renamed from src/gallium/auxiliary/vl/vp8/common/filter.h)0
-rw-r--r--src/gallium/auxiliary/vl/vp8/filter_dispatch.h (renamed from src/gallium/auxiliary/vl/vp8/common/filter_dispatch.h)0
-rw-r--r--src/gallium/auxiliary/vl/vp8/findnearmv.c (renamed from src/gallium/auxiliary/vl/vp8/common/findnearmv.c)0
-rw-r--r--src/gallium/auxiliary/vl/vp8/findnearmv.h (renamed from src/gallium/auxiliary/vl/vp8/common/findnearmv.h)2
-rw-r--r--src/gallium/auxiliary/vl/vp8/idct.c (renamed from src/gallium/auxiliary/vl/vp8/decoder/idct.c)0
-rw-r--r--src/gallium/auxiliary/vl/vp8/idct.h (renamed from src/gallium/auxiliary/vl/vp8/decoder/idct.h)0
-rw-r--r--src/gallium/auxiliary/vl/vp8/idct_dispatch.h (renamed from src/gallium/auxiliary/vl/vp8/decoder/idct_dispatch.h)0
-rw-r--r--src/gallium/auxiliary/vl/vp8/invtrans.c (renamed from src/gallium/auxiliary/vl/vp8/common/invtrans.c)0
-rw-r--r--src/gallium/auxiliary/vl/vp8/invtrans.h (renamed from src/gallium/auxiliary/vl/vp8/common/invtrans.h)2
-rw-r--r--src/gallium/auxiliary/vl/vp8/modecounts.h (renamed from src/gallium/auxiliary/vl/vp8/common/modecounts.h)0
-rw-r--r--src/gallium/auxiliary/vl/vp8/mv.h (renamed from src/gallium/auxiliary/vl/vp8/common/mv.h)0
-rw-r--r--src/gallium/auxiliary/vl/vp8/recon.c (renamed from src/gallium/auxiliary/vl/vp8/common/recon.c)0
-rw-r--r--src/gallium/auxiliary/vl/vp8/recon.h (renamed from src/gallium/auxiliary/vl/vp8/common/recon.h)0
-rw-r--r--src/gallium/auxiliary/vl/vp8/recon_dispatch.h (renamed from src/gallium/auxiliary/vl/vp8/common/recon_dispatch.h)0
-rw-r--r--src/gallium/auxiliary/vl/vp8/reconinter.c (renamed from src/gallium/auxiliary/vl/vp8/common/reconinter.c)0
-rw-r--r--src/gallium/auxiliary/vl/vp8/reconinter.h (renamed from src/gallium/auxiliary/vl/vp8/common/reconinter.h)0
-rw-r--r--src/gallium/auxiliary/vl/vp8/reconintra.c (renamed from src/gallium/auxiliary/vl/vp8/common/reconintra.c)3
-rw-r--r--src/gallium/auxiliary/vl/vp8/reconintra.h (renamed from src/gallium/auxiliary/vl/vp8/common/reconintra.h)2
-rw-r--r--src/gallium/auxiliary/vl/vp8/reconintra4x4.c (renamed from src/gallium/auxiliary/vl/vp8/common/reconintra4x4.c)2
-rw-r--r--src/gallium/auxiliary/vl/vp8/reconintra4x4.h (renamed from src/gallium/auxiliary/vl/vp8/common/reconintra4x4.h)2
-rw-r--r--src/gallium/auxiliary/vl/vp8/treereader.c (renamed from src/gallium/auxiliary/vl/vp8/decoder/treereader.c)0
-rw-r--r--src/gallium/auxiliary/vl/vp8/treereader.h (renamed from src/gallium/auxiliary/vl/vp8/decoder/treereader.h)4
-rw-r--r--src/gallium/auxiliary/vl/vp8/treereader_common.c (renamed from src/gallium/auxiliary/vl/vp8/common/treecoder.c)2
-rw-r--r--src/gallium/auxiliary/vl/vp8/treereader_common.h (renamed from src/gallium/auxiliary/vl/vp8/common/treecoder.h)6
-rw-r--r--src/gallium/auxiliary/vl/vp8/vp8_decoder.c (renamed from src/gallium/auxiliary/vl/vp8/decoder/onyxd_if.c)12
-rw-r--r--src/gallium/auxiliary/vl/vp8/vp8_decoder.h (renamed from src/gallium/auxiliary/vl/vp8/common/onyxc_int.h)80
-rw-r--r--src/gallium/auxiliary/vl/vp8/yv12utils.c (renamed from src/gallium/auxiliary/vl/vp8/common/yv12utils.c)2
-rw-r--r--src/gallium/auxiliary/vl/vp8/yv12utils.h (renamed from src/gallium/auxiliary/vl/vp8/common/yv12utils.h)0
55 files changed, 160 insertions, 192 deletions
diff --git a/src/gallium/auxiliary/Makefile.sources b/src/gallium/auxiliary/Makefile.sources
index 86e6496d44..bf3acb89ae 100644
--- a/src/gallium/auxiliary/Makefile.sources
+++ b/src/gallium/auxiliary/Makefile.sources
@@ -152,30 +152,30 @@ C_SOURCES := \
vl/vl_video_buffer.c \
vl/vl_vp8_decoder.c \
vl/vl_vp8_bitstream.c \
+ vl/vp8/vp8_decoder.c \
vl/vp8/vp8_debug.c \
vl/vp8/vp8_mem.c \
- vl/vp8/common/alloccommon.c \
- vl/vp8/common/blockd.c \
- vl/vp8/common/entropy.c \
- vl/vp8/common/entropymode.c \
- vl/vp8/common/entropymv.c \
- vl/vp8/common/filter.c \
- vl/vp8/common/findnearmv.c \
- vl/vp8/common/invtrans.c \
- vl/vp8/common/quant_common.c \
- vl/vp8/common/recon.c \
- vl/vp8/common/reconinter.c \
- vl/vp8/common/reconintra.c \
- vl/vp8/common/reconintra4x4.c \
- vl/vp8/common/treecoder.c \
- vl/vp8/common/yv12utils.c \
- vl/vp8/decoder/decodeframe.c \
- vl/vp8/decoder/decodemv.c \
- vl/vp8/decoder/dequantize.c \
- vl/vp8/decoder/detokenize.c \
- vl/vp8/decoder/idct.c \
- vl/vp8/decoder/onyxd_if.c \
- vl/vp8/decoder/treereader.c
+ vl/vp8/alloccommon.c \
+ vl/vp8/blockd.c \
+ vl/vp8/decodeframe.c \
+ vl/vp8/decodemv.c \
+ vl/vp8/dequantize.c \
+ vl/vp8/dequantize_common.c \
+ vl/vp8/detokenize.c \
+ vl/vp8/entropy.c \
+ vl/vp8/entropymode.c \
+ vl/vp8/entropymv.c \
+ vl/vp8/invtrans.c \
+ vl/vp8/idct.c \
+ vl/vp8/filter.c \
+ vl/vp8/findnearmv.c \
+ vl/vp8/recon.c \
+ vl/vp8/reconinter.c \
+ vl/vp8/reconintra.c \
+ vl/vp8/reconintra4x4.c \
+ vl/vp8/treereader.c \
+ vl/vp8/treereader_common.c \
+ vl/vp8/yv12utils.c
GENERATED_SOURCES := \
indices/u_indices_gen.c \
diff --git a/src/gallium/auxiliary/vl/vl_vp8_decoder.h b/src/gallium/auxiliary/vl/vl_vp8_decoder.h
index 6ecc43cd52..8d87ecf53a 100644
--- a/src/gallium/auxiliary/vl/vl_vp8_decoder.h
+++ b/src/gallium/auxiliary/vl/vl_vp8_decoder.h
@@ -36,9 +36,8 @@
#include "vl_vertex_buffers.h"
#include "vl_video_buffer.h"
-#include "vp8/common/onyxd.h"
-#include "vp8/common/yv12utils.h"
-#include "vp8/decoder/onyxd_int.h"
+#include "vp8/vp8_decoder.h"
+#include "vp8/yv12utils.h"
struct pipe_screen;
struct pipe_context;
diff --git a/src/gallium/auxiliary/vl/vp8/common/alloccommon.c b/src/gallium/auxiliary/vl/vp8/alloccommon.c
index 8ea08e670c..4a971adb3d 100644
--- a/src/gallium/auxiliary/vl/vp8/common/alloccommon.c
+++ b/src/gallium/auxiliary/vl/vp8/alloccommon.c
@@ -9,13 +9,14 @@
*/
-#include "../vp8_mem.h"
#include "blockd.h"
#include "alloccommon.h"
-#include "onyxc_int.h"
#include "findnearmv.h"
#include "entropymode.h"
+#include "vp8_decoder.h"
+#include "vp8_mem.h"
+
static void update_mode_info_border(MODE_INFO *mi, int rows, int cols)
{
int i;
diff --git a/src/gallium/auxiliary/vl/vp8/common/alloccommon.h b/src/gallium/auxiliary/vl/vp8/alloccommon.h
index 86c954814f..da96df8602 100644
--- a/src/gallium/auxiliary/vl/vp8/common/alloccommon.h
+++ b/src/gallium/auxiliary/vl/vp8/alloccommon.h
@@ -12,7 +12,7 @@
#ifndef ALLOCCOMMON_H
#define ALLOCCOMMON_H
-#include "onyxc_int.h"
+#include "vp8_decoder.h"
void vp8_create_common(VP8_COMMON *oci);
void vp8_remove_common(VP8_COMMON *oci);
diff --git a/src/gallium/auxiliary/vl/vp8/common/blockd.c b/src/gallium/auxiliary/vl/vp8/blockd.c
index cd93ae3ebc..cd93ae3ebc 100644
--- a/src/gallium/auxiliary/vl/vp8/common/blockd.c
+++ b/src/gallium/auxiliary/vl/vp8/blockd.c
diff --git a/src/gallium/auxiliary/vl/vp8/common/blockd.h b/src/gallium/auxiliary/vl/vp8/blockd.h
index 82225d0ff5..c6daea15bc 100644
--- a/src/gallium/auxiliary/vl/vp8/common/blockd.h
+++ b/src/gallium/auxiliary/vl/vp8/blockd.h
@@ -12,11 +12,11 @@
#ifndef BLOCKD_H
#define BLOCKD_H
-#include "../vp8_mem.h"
+#include "vp8_mem.h"
#include "yv12utils.h"
#include "mv.h"
-#include "treecoder.h"
+#include "treereader_common.h"
#include "filter_dispatch.h"
#define MB_FEATURE_TREE_PROBS 3
diff --git a/src/gallium/auxiliary/vl/vp8/common/coefupdateprobs.h b/src/gallium/auxiliary/vl/vp8/coefupdateprobs.h
index 56c4a78ecb..56c4a78ecb 100644
--- a/src/gallium/auxiliary/vl/vp8/common/coefupdateprobs.h
+++ b/src/gallium/auxiliary/vl/vp8/coefupdateprobs.h
diff --git a/src/gallium/auxiliary/vl/vp8/common/onyxd.h b/src/gallium/auxiliary/vl/vp8/common/onyxd.h
deleted file mode 100644
index 69ee63a58b..0000000000
--- a/src/gallium/auxiliary/vl/vp8/common/onyxd.h
+++ /dev/null
@@ -1,43 +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 VP8D_H
-#define VP8D_H
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-#include <stdint.h>
-
-#include "pipe/p_video_decoder.h"
-#include "../vp8_debug.h"
-#include "yv12utils.h"
-
-typedef void* VP8D_PTR;
-
-VP8D_PTR vp8_decoder_create();
-
-int vp8_decoder_start(VP8D_PTR comp, struct pipe_vp8_picture_desc *frame_header,
- const unsigned char *data, unsigned data_size,
- int64_t timestamp_deadline);
-
-int vp8_decoder_getframe(VP8D_PTR comp, YV12_BUFFER_CONFIG *sd,
- int64_t *timestamp, int64_t *timestamp_end);
-
-void vp8_decoder_remove(VP8D_PTR comp);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* VP8D_H */
diff --git a/src/gallium/auxiliary/vl/vp8/decoder/decodeframe.c b/src/gallium/auxiliary/vl/vp8/decodeframe.c
index 72968fa49c..8c6b1ef91f 100644
--- a/src/gallium/auxiliary/vl/vp8/decoder/decodeframe.c
+++ b/src/gallium/auxiliary/vl/vp8/decodeframe.c
@@ -9,24 +9,23 @@
*/
-#include "onyxd_int.h"
-#include "../common/reconintra.h"
-#include "../common/reconintra4x4.h"
-#include "../common/recon.h"
-#include "../common/reconinter.h"
+#include "reconintra.h"
+#include "reconintra4x4.h"
+#include "recon.h"
+#include "reconinter.h"
#include "dequantize_dispatch.h"
#include "idct_dispatch.h"
#include "detokenize.h"
-#include "../common/invtrans.h"
-#include "../common/alloccommon.h"
-#include "../common/entropymode.h"
-#include "../common/quant_common.h"
-#include "../common/yv12utils.h"
-
+#include "invtrans.h"
+#include "alloccommon.h"
+#include "entropymode.h"
+#include "dequantize_common.h"
+#include "yv12utils.h"
#include "decodemv.h"
#include "treereader.h"
-#include "../vp8_mem.h"
+#include "vp8_decoder.h".h"
+#include "vp8_mem.h"
#include <assert.h>
#include <stdio.h>
diff --git a/src/gallium/auxiliary/vl/vp8/decoder/decodemv.c b/src/gallium/auxiliary/vl/vp8/decodemv.c
index 7db2533a22..93d4efaa94 100644
--- a/src/gallium/auxiliary/vl/vp8/decoder/decodemv.c
+++ b/src/gallium/auxiliary/vl/vp8/decodemv.c
@@ -10,10 +10,9 @@
#include "treereader.h"
-#include "../common/entropymv.h"
-#include "../common/entropymode.h"
-#include "onyxd_int.h"
-#include "../common/findnearmv.h"
+#include "entropymv.h"
+#include "entropymode.h"
+#include "findnearmv.h"
#if ENABLE_DEBUG
#include <assert.h>
diff --git a/src/gallium/auxiliary/vl/vp8/decoder/decodemv.h b/src/gallium/auxiliary/vl/vp8/decodemv.h
index e25c256339..2bd2ce874c 100644
--- a/src/gallium/auxiliary/vl/vp8/decoder/decodemv.h
+++ b/src/gallium/auxiliary/vl/vp8/decodemv.h
@@ -12,7 +12,7 @@
#ifndef DECODEMV_H
#define DECODEMV_H
-#include "onyxd_int.h"
+#include "vp8_decoder.h"
void vp8_decode_mode_mvs(VP8D_COMP *);
diff --git a/src/gallium/auxiliary/vl/vp8/decoder/onyxd_int.h b/src/gallium/auxiliary/vl/vp8/decoder/onyxd_int.h
deleted file mode 100644
index 773146915f..0000000000
--- a/src/gallium/auxiliary/vl/vp8/decoder/onyxd_int.h
+++ /dev/null
@@ -1,58 +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 VP8D_INT_H
-#define VP8D_INT_H
-
-#include "../common/onyxd.h"
-#include "treereader.h"
-#include "../common/onyxc_int.h"
-#include "dequantize.h"
-
-typedef struct
-{
- MACROBLOCKD mbd;
- int mb_row;
- int current_mb_col;
- short *coef_ptr;
-} MB_ROW_DEC;
-
-typedef struct
-{
- int16_t min_val;
- int16_t Length;
- uint8_t Probs[12];
-} TOKENEXTRABITS;
-
-typedef struct
-{
- DECLARE_ALIGNED(16, MACROBLOCKD, mb);
- DECLARE_ALIGNED(16, VP8_COMMON, common);
-
- BOOL_DECODER bd, bd2;
-
- const unsigned char *data;
- unsigned int data_size;
-
- BOOL_DECODER *mbd;
- int64_t last_time_stamp;
- int ready_for_new_data;
-
- vp8_prob prob_intra;
- vp8_prob prob_last;
- vp8_prob prob_gf;
- vp8_prob prob_skip_false;
-
-} VP8D_COMP;
-
-int vp8_frame_decode(VP8D_COMP *cpi, struct pipe_vp8_picture_desc *frame_header);
-
-#endif /* VP8D_INT_H */
diff --git a/src/gallium/auxiliary/vl/vp8/common/defaultcoefcounts.h b/src/gallium/auxiliary/vl/vp8/defaultcoefcounts.h
index dca1aa0b1f..dca1aa0b1f 100644
--- a/src/gallium/auxiliary/vl/vp8/common/defaultcoefcounts.h
+++ b/src/gallium/auxiliary/vl/vp8/defaultcoefcounts.h
diff --git a/src/gallium/auxiliary/vl/vp8/decoder/dequantize.c b/src/gallium/auxiliary/vl/vp8/dequantize.c
index 90a1cd2411..90a1cd2411 100644
--- a/src/gallium/auxiliary/vl/vp8/decoder/dequantize.c
+++ b/src/gallium/auxiliary/vl/vp8/dequantize.c
diff --git a/src/gallium/auxiliary/vl/vp8/decoder/dequantize.h b/src/gallium/auxiliary/vl/vp8/dequantize.h
index 2c03f08565..b08253ca8c 100644
--- a/src/gallium/auxiliary/vl/vp8/decoder/dequantize.h
+++ b/src/gallium/auxiliary/vl/vp8/dequantize.h
@@ -12,7 +12,7 @@
#ifndef DEQUANTIZE_H
#define DEQUANTIZE_H
-#include "../common/blockd.h"
+#include "blockd.h"
void vp8_dequant_b_c(BLOCKD *d);
diff --git a/src/gallium/auxiliary/vl/vp8/common/quant_common.c b/src/gallium/auxiliary/vl/vp8/dequantize_common.c
index f5f252f013..9a63c7210f 100644
--- a/src/gallium/auxiliary/vl/vp8/common/quant_common.c
+++ b/src/gallium/auxiliary/vl/vp8/dequantize_common.c
@@ -9,7 +9,7 @@
*/
-#include "quant_common.h"
+#include "dequantize_common.h"
static const int dc_qlookup[QINDEX_RANGE] =
{
diff --git a/src/gallium/auxiliary/vl/vp8/common/quant_common.h b/src/gallium/auxiliary/vl/vp8/dequantize_common.h
index 47649c32aa..ca575365f5 100644
--- a/src/gallium/auxiliary/vl/vp8/common/quant_common.h
+++ b/src/gallium/auxiliary/vl/vp8/dequantize_common.h
@@ -9,12 +9,12 @@
*/
-#ifndef QUANT_COMMON_H
-#define QUANT_COMMON_H
+#ifndef DEQUANTIZE_COMMON_H
+#define DEQUANTIZE_COMMON_H
#include "blockd.h"
-#include "onyxc_int.h"
+#include "vp8_decoder.h"
void vp8_initialize_dequantizer(VP8_COMMON *pc);
-#endif /* QUANT_COMMON_H */
+#endif /* DEQUANTIZE_COMMON_H */
diff --git a/src/gallium/auxiliary/vl/vp8/decoder/dequantize_dispatch.h b/src/gallium/auxiliary/vl/vp8/dequantize_dispatch.h
index 4cedbc142f..4cedbc142f 100644
--- a/src/gallium/auxiliary/vl/vp8/decoder/dequantize_dispatch.h
+++ b/src/gallium/auxiliary/vl/vp8/dequantize_dispatch.h
diff --git a/src/gallium/auxiliary/vl/vp8/decoder/detokenize.c b/src/gallium/auxiliary/vl/vp8/detokenize.c
index fad43f4ae3..1ce65e0364 100644
--- a/src/gallium/auxiliary/vl/vp8/decoder/detokenize.c
+++ b/src/gallium/auxiliary/vl/vp8/detokenize.c
@@ -11,10 +11,11 @@
#include <stdint.h>
-#include "../vp8_mem.h"
-#include "onyxd_int.h"
+#include "vp8_mem.h"
+#include "vp8_decoder.h"
+
#include "detokenize.h"
-#include "../common/blockd.h"
+#include "blockd.h"
#define OCB_X PREV_COEF_CONTEXTS * ENTROPY_NODES
diff --git a/src/gallium/auxiliary/vl/vp8/decoder/detokenize.h b/src/gallium/auxiliary/vl/vp8/detokenize.h
index 8640bda4c0..06b2e0fc16 100644
--- a/src/gallium/auxiliary/vl/vp8/decoder/detokenize.h
+++ b/src/gallium/auxiliary/vl/vp8/detokenize.h
@@ -12,7 +12,7 @@
#ifndef DETOKENIZE_H
#define DETOKENIZE_H
-#include "onyxd_int.h"
+#include "vp8_decoder.h"
void vp8_reset_mb_tokens_context(MACROBLOCKD *x);
int vp8_decode_mb_tokens(VP8D_COMP *, MACROBLOCKD *);
diff --git a/src/gallium/auxiliary/vl/vp8/common/entropy.c b/src/gallium/auxiliary/vl/vp8/entropy.c
index 0423a5c51e..d6f980c1f7 100644
--- a/src/gallium/auxiliary/vl/vp8/common/entropy.c
+++ b/src/gallium/auxiliary/vl/vp8/entropy.c
@@ -12,12 +12,13 @@
#include <stdio.h>
#include <string.h>
+#include "coefupdateprobs.h"
+#include "defaultcoefcounts.h"
+
#include "entropy.h"
#include "blockd.h"
-#include "onyxc_int.h"
+#include "vp8_decoder.h"
-#include "coefupdateprobs.h"
-#include "defaultcoefcounts.h"
DECLARE_ALIGNED(16, const unsigned char, vp8_norm[256]) =
{
diff --git a/src/gallium/auxiliary/vl/vp8/common/entropy.h b/src/gallium/auxiliary/vl/vp8/entropy.h
index d0c885fcbb..88819ddda7 100644
--- a/src/gallium/auxiliary/vl/vp8/common/entropy.h
+++ b/src/gallium/auxiliary/vl/vp8/entropy.h
@@ -12,7 +12,7 @@
#ifndef ENTROPY_H
#define ENTROPY_H
-#include "treecoder.h"
+#include "treereader_common.h"
#include "blockd.h"
/* Coefficient token alphabet */
diff --git a/src/gallium/auxiliary/vl/vp8/common/entropymode.c b/src/gallium/auxiliary/vl/vp8/entropymode.c
index 6f1f66bfdd..82bd9017bb 100644
--- a/src/gallium/auxiliary/vl/vp8/common/entropymode.c
+++ b/src/gallium/auxiliary/vl/vp8/entropymode.c
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "../vp8_mem.h"
+#include "vp8_mem.h"
#include "entropy.h"
#include "entropymode.h"
diff --git a/src/gallium/auxiliary/vl/vp8/common/entropymode.h b/src/gallium/auxiliary/vl/vp8/entropymode.h
index ceb0eca2dc..316892ad57 100644
--- a/src/gallium/auxiliary/vl/vp8/common/entropymode.h
+++ b/src/gallium/auxiliary/vl/vp8/entropymode.h
@@ -12,8 +12,8 @@
#ifndef ENTROPYMODE_H
#define ENTROPYMODE_H
-#include "onyxc_int.h"
-#include "treecoder.h"
+#include "vp8_decoder.h"
+#include "treereader_common.h"
typedef const int vp8_mbsplit[16];
diff --git a/src/gallium/auxiliary/vl/vp8/common/entropymv.c b/src/gallium/auxiliary/vl/vp8/entropymv.c
index 117e32718e..117e32718e 100644
--- a/src/gallium/auxiliary/vl/vp8/common/entropymv.c
+++ b/src/gallium/auxiliary/vl/vp8/entropymv.c
diff --git a/src/gallium/auxiliary/vl/vp8/common/entropymv.h b/src/gallium/auxiliary/vl/vp8/entropymv.h
index f1e60be7f7..d948c79f47 100644
--- a/src/gallium/auxiliary/vl/vp8/common/entropymv.h
+++ b/src/gallium/auxiliary/vl/vp8/entropymv.h
@@ -12,7 +12,7 @@
#ifndef ENTROPYMV_H
#define ENTROPYMV_H
-#include "treecoder.h"
+#include "treereader_common.h"
enum
{
diff --git a/src/gallium/auxiliary/vl/vp8/common/filter.c b/src/gallium/auxiliary/vl/vp8/filter.c
index f71f2e983a..4c8f3f4599 100644
--- a/src/gallium/auxiliary/vl/vp8/common/filter.c
+++ b/src/gallium/auxiliary/vl/vp8/filter.c
@@ -12,7 +12,7 @@
#include <stdlib.h>
#include "filter.h"
-#include "../vp8_mem.h"
+#include "vp8_mem.h"
#define VP8_FILTER_WEIGHT 128
#define VP8_FILTER_SHIFT 7
diff --git a/src/gallium/auxiliary/vl/vp8/common/filter.h b/src/gallium/auxiliary/vl/vp8/filter.h
index 5ec2b255cf..5ec2b255cf 100644
--- a/src/gallium/auxiliary/vl/vp8/common/filter.h
+++ b/src/gallium/auxiliary/vl/vp8/filter.h
diff --git a/src/gallium/auxiliary/vl/vp8/common/filter_dispatch.h b/src/gallium/auxiliary/vl/vp8/filter_dispatch.h
index 5b1ded79da..5b1ded79da 100644
--- a/src/gallium/auxiliary/vl/vp8/common/filter_dispatch.h
+++ b/src/gallium/auxiliary/vl/vp8/filter_dispatch.h
diff --git a/src/gallium/auxiliary/vl/vp8/common/findnearmv.c b/src/gallium/auxiliary/vl/vp8/findnearmv.c
index 1ec3dfbd9b..1ec3dfbd9b 100644
--- a/src/gallium/auxiliary/vl/vp8/common/findnearmv.c
+++ b/src/gallium/auxiliary/vl/vp8/findnearmv.c
diff --git a/src/gallium/auxiliary/vl/vp8/common/findnearmv.h b/src/gallium/auxiliary/vl/vp8/findnearmv.h
index a866969b27..078ad2ed10 100644
--- a/src/gallium/auxiliary/vl/vp8/common/findnearmv.h
+++ b/src/gallium/auxiliary/vl/vp8/findnearmv.h
@@ -15,7 +15,7 @@
#include "mv.h"
#include "blockd.h"
#include "entropymode.h"
-#include "treecoder.h"
+#include "treereader_common.h"
#define LEFT_TOP_MARGIN (16 << 3)
#define RIGHT_BOTTOM_MARGIN (16 << 3)
diff --git a/src/gallium/auxiliary/vl/vp8/decoder/idct.c b/src/gallium/auxiliary/vl/vp8/idct.c
index 5dc4427263..5dc4427263 100644
--- a/src/gallium/auxiliary/vl/vp8/decoder/idct.c
+++ b/src/gallium/auxiliary/vl/vp8/idct.c
diff --git a/src/gallium/auxiliary/vl/vp8/decoder/idct.h b/src/gallium/auxiliary/vl/vp8/idct.h
index 4a7b4806a6..4a7b4806a6 100644
--- a/src/gallium/auxiliary/vl/vp8/decoder/idct.h
+++ b/src/gallium/auxiliary/vl/vp8/idct.h
diff --git a/src/gallium/auxiliary/vl/vp8/decoder/idct_dispatch.h b/src/gallium/auxiliary/vl/vp8/idct_dispatch.h
index 28a5c92060..28a5c92060 100644
--- a/src/gallium/auxiliary/vl/vp8/decoder/idct_dispatch.h
+++ b/src/gallium/auxiliary/vl/vp8/idct_dispatch.h
diff --git a/src/gallium/auxiliary/vl/vp8/common/invtrans.c b/src/gallium/auxiliary/vl/vp8/invtrans.c
index 8538126945..8538126945 100644
--- a/src/gallium/auxiliary/vl/vp8/common/invtrans.c
+++ b/src/gallium/auxiliary/vl/vp8/invtrans.c
diff --git a/src/gallium/auxiliary/vl/vp8/common/invtrans.h b/src/gallium/auxiliary/vl/vp8/invtrans.h
index 145821418c..1d62b15e15 100644
--- a/src/gallium/auxiliary/vl/vp8/common/invtrans.h
+++ b/src/gallium/auxiliary/vl/vp8/invtrans.h
@@ -12,7 +12,7 @@
#ifndef INVTRANS_H
#define INVTRANS_H
-#include "../decoder/idct_dispatch.h"
+#include "idct_dispatch.h"
#include "blockd.h"
extern void vp8_inverse_transform_b(const vp8_idct_rtcd_vtable_t *rtcd, BLOCKD *b, int pitch);
diff --git a/src/gallium/auxiliary/vl/vp8/common/modecounts.h b/src/gallium/auxiliary/vl/vp8/modecounts.h
index 543de8d164..543de8d164 100644
--- a/src/gallium/auxiliary/vl/vp8/common/modecounts.h
+++ b/src/gallium/auxiliary/vl/vp8/modecounts.h
diff --git a/src/gallium/auxiliary/vl/vp8/common/mv.h b/src/gallium/auxiliary/vl/vp8/mv.h
index 49dcf3472a..49dcf3472a 100644
--- a/src/gallium/auxiliary/vl/vp8/common/mv.h
+++ b/src/gallium/auxiliary/vl/vp8/mv.h
diff --git a/src/gallium/auxiliary/vl/vp8/common/recon.c b/src/gallium/auxiliary/vl/vp8/recon.c
index ac87c9c461..ac87c9c461 100644
--- a/src/gallium/auxiliary/vl/vp8/common/recon.c
+++ b/src/gallium/auxiliary/vl/vp8/recon.c
diff --git a/src/gallium/auxiliary/vl/vp8/common/recon.h b/src/gallium/auxiliary/vl/vp8/recon.h
index 26201e7362..26201e7362 100644
--- a/src/gallium/auxiliary/vl/vp8/common/recon.h
+++ b/src/gallium/auxiliary/vl/vp8/recon.h
diff --git a/src/gallium/auxiliary/vl/vp8/common/recon_dispatch.h b/src/gallium/auxiliary/vl/vp8/recon_dispatch.h
index aee90a284d..aee90a284d 100644
--- a/src/gallium/auxiliary/vl/vp8/common/recon_dispatch.h
+++ b/src/gallium/auxiliary/vl/vp8/recon_dispatch.h
diff --git a/src/gallium/auxiliary/vl/vp8/common/reconinter.c b/src/gallium/auxiliary/vl/vp8/reconinter.c
index 850a4a74a9..850a4a74a9 100644
--- a/src/gallium/auxiliary/vl/vp8/common/reconinter.c
+++ b/src/gallium/auxiliary/vl/vp8/reconinter.c
diff --git a/src/gallium/auxiliary/vl/vp8/common/reconinter.h b/src/gallium/auxiliary/vl/vp8/reconinter.h
index a1ef79bdfb..a1ef79bdfb 100644
--- a/src/gallium/auxiliary/vl/vp8/common/reconinter.h
+++ b/src/gallium/auxiliary/vl/vp8/reconinter.h
diff --git a/src/gallium/auxiliary/vl/vp8/common/reconintra.c b/src/gallium/auxiliary/vl/vp8/reconintra.c
index de846930de..2a7f9652df 100644
--- a/src/gallium/auxiliary/vl/vp8/common/reconintra.c
+++ b/src/gallium/auxiliary/vl/vp8/reconintra.c
@@ -9,9 +9,8 @@
*/
-#include "recon_dispatch.h"
#include "reconintra.h"
-#include "../vp8_mem.h"
+#include "vp8_mem.h"
/**
* Set up frame new frame for intra coded blocks.
diff --git a/src/gallium/auxiliary/vl/vp8/common/reconintra.h b/src/gallium/auxiliary/vl/vp8/reconintra.h
index 6e5b1f7d7e..9beb194943 100644
--- a/src/gallium/auxiliary/vl/vp8/common/reconintra.h
+++ b/src/gallium/auxiliary/vl/vp8/reconintra.h
@@ -12,6 +12,8 @@
#define RECONINTRA_H
#include "yv12utils.h"
+#include "blockd.h"
+#include "recon_dispatch.h"
extern void vp8_setup_intra_recon(YV12_BUFFER_CONFIG *ybf);
diff --git a/src/gallium/auxiliary/vl/vp8/common/reconintra4x4.c b/src/gallium/auxiliary/vl/vp8/reconintra4x4.c
index bfff2d9955..ed7c681a50 100644
--- a/src/gallium/auxiliary/vl/vp8/common/reconintra4x4.c
+++ b/src/gallium/auxiliary/vl/vp8/reconintra4x4.c
@@ -10,7 +10,7 @@
#include "recon_dispatch.h"
-#include "reconintra.h"
+#include "reconintra4x4.h"
void vp8_intra4x4_predict(BLOCKD *x, int b_mode, unsigned char *predictor)
{
diff --git a/src/gallium/auxiliary/vl/vp8/common/reconintra4x4.h b/src/gallium/auxiliary/vl/vp8/reconintra4x4.h
index 37a3f820fb..ca240e3f94 100644
--- a/src/gallium/auxiliary/vl/vp8/common/reconintra4x4.h
+++ b/src/gallium/auxiliary/vl/vp8/reconintra4x4.h
@@ -12,6 +12,8 @@
#ifndef RECONINTRA4x4_H
#define RECONINTRA4x4_H
+#include "blockd.h"
+
extern void vp8_intra_prediction_down_copy(MACROBLOCKD *x);
#endif /* RECONINTRA4x4_H */
diff --git a/src/gallium/auxiliary/vl/vp8/decoder/treereader.c b/src/gallium/auxiliary/vl/vp8/treereader.c
index a017479126..a017479126 100644
--- a/src/gallium/auxiliary/vl/vp8/decoder/treereader.c
+++ b/src/gallium/auxiliary/vl/vp8/treereader.c
diff --git a/src/gallium/auxiliary/vl/vp8/decoder/treereader.h b/src/gallium/auxiliary/vl/vp8/treereader.h
index baf917bf75..065a406285 100644
--- a/src/gallium/auxiliary/vl/vp8/decoder/treereader.h
+++ b/src/gallium/auxiliary/vl/vp8/treereader.h
@@ -12,8 +12,8 @@
#ifndef TREEREADER_H
#define TREEREADER_H
-#include "../common/treecoder.h"
-#include "../vp8_mem.h"
+#include "treereader_common.h"
+#include "vp8_mem.h"
#define vp8_read vp8dx_decode_bool
#define vp8_read_literal vp8_decode_value
diff --git a/src/gallium/auxiliary/vl/vp8/common/treecoder.c b/src/gallium/auxiliary/vl/vp8/treereader_common.c
index 5bec16612e..defdd12b05 100644
--- a/src/gallium/auxiliary/vl/vp8/common/treecoder.c
+++ b/src/gallium/auxiliary/vl/vp8/treereader_common.c
@@ -14,7 +14,7 @@
#endif
#include <stdio.h>
-#include "treecoder.h"
+#include "treereader_common.h"
static void tree2tok(struct vp8_token_struct *const p, vp8_tree t, int i, int v, int L)
{
diff --git a/src/gallium/auxiliary/vl/vp8/common/treecoder.h b/src/gallium/auxiliary/vl/vp8/treereader_common.h
index fb272734e0..6ebdeabc91 100644
--- a/src/gallium/auxiliary/vl/vp8/common/treecoder.h
+++ b/src/gallium/auxiliary/vl/vp8/treereader_common.h
@@ -9,8 +9,8 @@
*/
-#ifndef TREECODER_H
-#define TREECODER_H
+#ifndef TREEREADER_COMMON_H
+#define TREEREADER_COMMON_H
#define vp8_prob_half ((vp8_prob) 128)
@@ -46,4 +46,4 @@ void vp8_tree_probs_from_distribution(int n, /* n = size of alphabet */
unsigned int Pfactor,
int Round);
-#endif /* TREECODER_H */
+#endif /* TREEREADER_COMMON_H */
diff --git a/src/gallium/auxiliary/vl/vp8/decoder/onyxd_if.c b/src/gallium/auxiliary/vl/vp8/vp8_decoder.c
index 5fa37f9785..0ba924ed0f 100644
--- a/src/gallium/auxiliary/vl/vp8/decoder/onyxd_if.c
+++ b/src/gallium/auxiliary/vl/vp8/vp8_decoder.c
@@ -12,15 +12,11 @@
#include <stdio.h>
#include <assert.h>
-#include "../vp8_mem.h"
+#include "vp8_mem.h"
+#include "vp8_decoder.h"
-#include "../common/onyxc_int.h"
-#include "onyxd_int.h"
-#include "../common/onyxd.h"
-#include "../common/alloccommon.h"
-#include "../common/yv12utils.h"
-
-#include "../common/quant_common.h"
+#include "alloccommon.h"
+#include "dequantize_common.h"
#include "detokenize.h"
static int get_free_fb(VP8_COMMON *cm)
diff --git a/src/gallium/auxiliary/vl/vp8/common/onyxc_int.h b/src/gallium/auxiliary/vl/vp8/vp8_decoder.h
index e08d520e67..a04f332762 100644
--- a/src/gallium/auxiliary/vl/vp8/common/onyxc_int.h
+++ b/src/gallium/auxiliary/vl/vp8/vp8_decoder.h
@@ -9,14 +9,26 @@
*/
-#ifndef VP8C_INT_H
-#define VP8C_INT_H
+#ifndef VP8_DECODER_H
+#define VP8_DECODER_H
-#include "../vp8_debug.h"
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#include <stdint.h>
+
+#include "pipe/p_video_decoder.h"
+
+#include "vp8_debug.h"
#include "entropymv.h"
#include "entropy.h"
+#include "yv12utils.h"
+#include "treereader.h"
+#include "dequantize.h"
#include "recon_dispatch.h"
-#include "../decoder/idct_dispatch.h"
+#include "idct_dispatch.h"
#define MINQ 0
#define MAXQ 127
@@ -154,4 +166,62 @@ typedef struct VP8Common
} VP8_COMMON;
-#endif /* VP8C_INT_H */
+
+typedef void* VP8D_PTR;
+
+typedef struct
+{
+ MACROBLOCKD mbd;
+ int mb_row;
+ int current_mb_col;
+ short *coef_ptr;
+} MB_ROW_DEC;
+
+typedef struct
+{
+ int16_t min_val;
+ int16_t Length;
+ uint8_t Probs[12];
+} TOKENEXTRABITS;
+
+typedef struct
+{
+ DECLARE_ALIGNED(16, MACROBLOCKD, mb);
+ DECLARE_ALIGNED(16, VP8_COMMON, common);
+
+ BOOL_DECODER bd, bd2;
+
+ const unsigned char *data;
+ unsigned int data_size;
+
+ BOOL_DECODER *mbd;
+ int64_t last_time_stamp;
+ int ready_for_new_data;
+
+ vp8_prob prob_intra;
+ vp8_prob prob_last;
+ vp8_prob prob_gf;
+ vp8_prob prob_skip_false;
+
+} VP8D_COMP;
+
+/* ************************************************************************** */
+
+VP8D_PTR vp8_decoder_create();
+
+int vp8_decoder_start(VP8D_PTR comp, struct pipe_vp8_picture_desc *frame_header,
+ const unsigned char *data, unsigned data_size,
+ int64_t timestamp_deadline);
+
+int vp8_decoder_getframe(VP8D_PTR comp, YV12_BUFFER_CONFIG *sd,
+ int64_t *timestamp, int64_t *timestamp_end);
+
+void vp8_decoder_remove(VP8D_PTR comp);
+
+int vp8_frame_decode(VP8D_COMP *cpi, struct pipe_vp8_picture_desc *frame_header);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* VP8_DECODER_H */
diff --git a/src/gallium/auxiliary/vl/vp8/common/yv12utils.c b/src/gallium/auxiliary/vl/vp8/yv12utils.c
index ec11560df8..10161adf33 100644
--- a/src/gallium/auxiliary/vl/vp8/common/yv12utils.c
+++ b/src/gallium/auxiliary/vl/vp8/yv12utils.c
@@ -9,7 +9,7 @@
*/
-#include "../vp8_mem.h"
+#include "vp8_mem.h"
#include "yv12utils.h"
int vp8_yv12_de_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf)
diff --git a/src/gallium/auxiliary/vl/vp8/common/yv12utils.h b/src/gallium/auxiliary/vl/vp8/yv12utils.h
index a7a1ef12b8..a7a1ef12b8 100644
--- a/src/gallium/auxiliary/vl/vp8/common/yv12utils.h
+++ b/src/gallium/auxiliary/vl/vp8/yv12utils.h