ref: cf9366e5041fcdcd4f7166fb1a49e58af501ac02
parent: 26a9afc32c5b8fcad8fe3674b34f7c4d12692030
author: Yaowu Xu <[email protected]>
date: Thu Aug 13 10:43:55 EDT 2015
VP9Decoder -> VP10Decoder Change-Id: I427b56e92aa2d1381192cb394ac1bb95becb32a1
--- a/vp10/decoder/decodeframe.c
+++ b/vp10/decoder/decodeframe.c
@@ -551,7 +551,7 @@
}
#endif // CONFIG_VP9_HIGHBITDEPTH
-static void dec_build_inter_predictors(VP9Decoder *const pbi, MACROBLOCKD *xd,
+static void dec_build_inter_predictors(VP10Decoder *const pbi, MACROBLOCKD *xd,
int plane, int bw, int bh, int x,
int y, int w, int h, int mi_x, int mi_y,
const InterpKernel *kernel,
@@ -703,7 +703,7 @@
#endif // CONFIG_VP9_HIGHBITDEPTH
}
-static void dec_build_inter_predictors_sb(VP9Decoder *const pbi,
+static void dec_build_inter_predictors_sb(VP10Decoder *const pbi,
MACROBLOCKD *xd,
int mi_row, int mi_col) {
int plane;
@@ -811,7 +811,7 @@
return &xd->mi[0]->mbmi;
}
-static void decode_block(VP9Decoder *const pbi, MACROBLOCKD *const xd,
+static void decode_block(VP10Decoder *const pbi, MACROBLOCKD *const xd,
int mi_row, int mi_col,
vpx_reader *r, BLOCK_SIZE bsize,
int bwl, int bhl) {
@@ -947,7 +947,7 @@
}
// TODO(slavarnway): eliminate bsize and subsize in future commits
-static void decode_partition(VP9Decoder *const pbi, MACROBLOCKD *const xd,
+static void decode_partition(VP10Decoder *const pbi, MACROBLOCKD *const xd,
int mi_row, int mi_col,
vpx_reader* r, BLOCK_SIZE bsize, int n4x4_l2) {
VP10_COMMON *const cm = &pbi->common;
@@ -1402,7 +1402,7 @@
*data += size;
}
-static void get_tile_buffers(VP9Decoder *pbi,
+static void get_tile_buffers(VP10Decoder *pbi,
const uint8_t *data, const uint8_t *data_end,
int tile_cols, int tile_rows,
TileBuffer (*tile_buffers)[1 << 6]) {
@@ -1419,7 +1419,7 @@
}
}
-static const uint8_t *decode_tiles(VP9Decoder *pbi,
+static const uint8_t *decode_tiles(VP10Decoder *pbi,
const uint8_t *data,
const uint8_t *data_end) {
VP10_COMMON *const cm = &pbi->common;
@@ -1595,7 +1595,7 @@
return (int)(buf2->size - buf1->size);
}
-static const uint8_t *decode_tiles_mt(VP9Decoder *pbi,
+static const uint8_t *decode_tiles_mt(VP10Decoder *pbi,
const uint8_t *data,
const uint8_t *data_end) {
VP10_COMMON *const cm = &pbi->common;
@@ -1802,7 +1802,7 @@
}
}
-static size_t read_uncompressed_header(VP9Decoder *pbi,
+static size_t read_uncompressed_header(VP10Decoder *pbi,
struct vpx_read_bit_buffer *rb) {
VP10_COMMON *const cm = &pbi->common;
BufferPool *const pool = cm->buffer_pool;
@@ -2004,7 +2004,7 @@
return sz;
}
-static int read_compressed_header(VP9Decoder *pbi, const uint8_t *data,
+static int read_compressed_header(VP10Decoder *pbi, const uint8_t *data,
size_t partition_size) {
VP10_COMMON *const cm = &pbi->common;
MACROBLOCKD *const xd = &pbi->mb;
@@ -2094,7 +2094,7 @@
#endif // NDEBUG
static struct vpx_read_bit_buffer *init_read_bit_buffer(
- VP9Decoder *pbi,
+ VP10Decoder *pbi,
struct vpx_read_bit_buffer *rb,
const uint8_t *data,
const uint8_t *data_end,
@@ -2136,7 +2136,7 @@
return (BITSTREAM_PROFILE) profile;
}
-void vp10_decode_frame(VP9Decoder *pbi,
+void vp10_decode_frame(VP10Decoder *pbi,
const uint8_t *data, const uint8_t *data_end,
const uint8_t **p_data_end) {
VP10_COMMON *const cm = &pbi->common;
--- a/vp10/decoder/decodeframe.h
+++ b/vp10/decoder/decodeframe.h
@@ -16,7 +16,7 @@
extern "C" {
#endif
-struct VP9Decoder;
+struct VP10Decoder;
struct vpx_read_bit_buffer;
int vp10_read_sync_code(struct vpx_read_bit_buffer *const rb);
@@ -24,7 +24,7 @@
int *width, int *height);
BITSTREAM_PROFILE vp10_read_profile(struct vpx_read_bit_buffer *rb);
-void vp10_decode_frame(struct VP9Decoder *pbi,
+void vp10_decode_frame(struct VP10Decoder *pbi,
const uint8_t *data, const uint8_t *data_end,
const uint8_t **p_data_end);
--- a/vp10/decoder/decodemv.c
+++ b/vp10/decoder/decodemv.c
@@ -475,12 +475,12 @@
}
static void fpm_sync(void *const data, int mi_row) {
- VP9Decoder *const pbi = (VP9Decoder *)data;
+ VP10Decoder *const pbi = (VP10Decoder *)data;
vp10_frameworker_wait(pbi->frame_worker_owner, pbi->common.prev_frame,
mi_row << MI_BLOCK_SIZE_LOG2);
}
-static void read_inter_block_mode_info(VP9Decoder *const pbi,
+static void read_inter_block_mode_info(VP10Decoder *const pbi,
MACROBLOCKD *const xd,
MODE_INFO *const mi,
int mi_row, int mi_col, vpx_reader *r) {
@@ -583,7 +583,7 @@
}
}
-static void read_inter_frame_mode_info(VP9Decoder *const pbi,
+static void read_inter_frame_mode_info(VP10Decoder *const pbi,
MACROBLOCKD *const xd,
int mi_row, int mi_col, vpx_reader *r) {
VP10_COMMON *const cm = &pbi->common;
@@ -604,7 +604,7 @@
read_intra_block_mode_info(cm, xd, mi, r);
}
-void vp10_read_mode_info(VP9Decoder *const pbi, MACROBLOCKD *xd,
+void vp10_read_mode_info(VP10Decoder *const pbi, MACROBLOCKD *xd,
int mi_row, int mi_col, vpx_reader *r,
int x_mis, int y_mis) {
VP10_COMMON *const cm = &pbi->common;
--- a/vp10/decoder/decodemv.h
+++ b/vp10/decoder/decodemv.h
@@ -19,7 +19,7 @@
extern "C" {
#endif
-void vp10_read_mode_info(VP9Decoder *const pbi, MACROBLOCKD *xd,
+void vp10_read_mode_info(VP10Decoder *const pbi, MACROBLOCKD *xd,
int mi_row, int mi_col, vpx_reader *r,
int x_mis, int y_mis);
--- a/vp10/decoder/decoder.c
+++ b/vp10/decoder/decoder.c
@@ -73,8 +73,8 @@
cm->mi_grid_base = NULL;
}
-VP9Decoder *vp10_decoder_create(BufferPool *const pool) {
- VP9Decoder *volatile const pbi = vpx_memalign(32, sizeof(*pbi));
+VP10Decoder *vp10_decoder_create(BufferPool *const pool) {
+ VP10Decoder *volatile const pbi = vpx_memalign(32, sizeof(*pbi));
VP10_COMMON *volatile const cm = pbi ? &pbi->common : NULL;
if (!cm)
@@ -123,7 +123,7 @@
return pbi;
}
-void vp10_decoder_remove(VP9Decoder *pbi) {
+void vp10_decoder_remove(VP10Decoder *pbi) {
int i;
vpx_get_worker_interface()->end(&pbi->lf_worker);
@@ -150,7 +150,7 @@
a->uv_height == b->uv_height && a->uv_width == b->uv_width;
}
-vpx_codec_err_t vp10_copy_reference_dec(VP9Decoder *pbi,
+vpx_codec_err_t vp10_copy_reference_dec(VP10Decoder *pbi,
VP9_REFFRAME ref_frame_flag,
YV12_BUFFER_CONFIG *sd) {
VP10_COMMON *cm = &pbi->common;
@@ -228,7 +228,7 @@
}
/* If any buffer updating is signaled it should be done here. */
-static void swap_frame_buffers(VP9Decoder *pbi) {
+static void swap_frame_buffers(VP10Decoder *pbi) {
int ref_index = 0, mask;
VP10_COMMON *const cm = &pbi->common;
BufferPool *const pool = cm->buffer_pool;
@@ -269,7 +269,7 @@
cm->frame_refs[ref_index].idx = -1;
}
-int vp10_receive_compressed_data(VP9Decoder *pbi,
+int vp10_receive_compressed_data(VP10Decoder *pbi,
size_t size, const uint8_t **psource) {
VP10_COMMON *volatile const cm = &pbi->common;
BufferPool *volatile const pool = cm->buffer_pool;
@@ -410,7 +410,7 @@
return retcode;
}
-int vp10_get_raw_frame(VP9Decoder *pbi, YV12_BUFFER_CONFIG *sd,
+int vp10_get_raw_frame(VP10Decoder *pbi, YV12_BUFFER_CONFIG *sd,
vp10_ppflags_t *flags) {
VP10_COMMON *const cm = &pbi->common;
int ret = -1;
--- a/vp10/decoder/decoder.h
+++ b/vp10/decoder/decoder.h
@@ -37,7 +37,7 @@
} TileData;
typedef struct TileWorkerData {
- struct VP9Decoder *pbi;
+ struct VP10Decoder *pbi;
vpx_reader bit_reader;
FRAME_COUNTS counts;
DECLARE_ALIGNED(16, MACROBLOCKD, xd);
@@ -46,7 +46,7 @@
struct vpx_internal_error_info error_info;
} TileWorkerData;
-typedef struct VP9Decoder {
+typedef struct VP10Decoder {
DECLARE_ALIGNED(16, MACROBLOCKD, mb);
DECLARE_ALIGNED(16, VP10_COMMON, common);
@@ -80,15 +80,15 @@
int inv_tile_order;
int need_resync; // wait for key/intra-only frame.
int hold_ref_buf; // hold the reference buffer.
-} VP9Decoder;
+} VP10Decoder;
-int vp10_receive_compressed_data(struct VP9Decoder *pbi,
+int vp10_receive_compressed_data(struct VP10Decoder *pbi,
size_t size, const uint8_t **dest);
-int vp10_get_raw_frame(struct VP9Decoder *pbi, YV12_BUFFER_CONFIG *sd,
+int vp10_get_raw_frame(struct VP10Decoder *pbi, YV12_BUFFER_CONFIG *sd,
vp10_ppflags_t *flags);
-vpx_codec_err_t vp10_copy_reference_dec(struct VP9Decoder *pbi,
+vpx_codec_err_t vp10_copy_reference_dec(struct VP10Decoder *pbi,
VP9_REFFRAME ref_frame_flag,
YV12_BUFFER_CONFIG *sd);
@@ -115,9 +115,9 @@
vpx_decrypt_cb decrypt_cb,
void *decrypt_state);
-struct VP9Decoder *vp10_decoder_create(BufferPool *const pool);
+struct VP10Decoder *vp10_decoder_create(BufferPool *const pool);
-void vp10_decoder_remove(struct VP9Decoder *pbi);
+void vp10_decoder_remove(struct VP10Decoder *pbi);
static INLINE void decrease_ref_count(int idx, RefCntBuffer *const frame_bufs,
BufferPool *const pool) {
--- a/vp10/decoder/dthread.c
+++ b/vp10/decoder/dthread.c
@@ -77,7 +77,7 @@
VPxWorker *const ref_worker = ref_buf->frame_worker_owner;
FrameWorkerData *const ref_worker_data =
(FrameWorkerData *)ref_worker->data1;
- const VP9Decoder *const pbi = ref_worker_data->pbi;
+ const VP10Decoder *const pbi = ref_worker_data->pbi;
#ifdef DEBUG_THREAD
{
--- a/vp10/decoder/dthread.h
+++ b/vp10/decoder/dthread.h
@@ -16,12 +16,12 @@
#include "vpx/internal/vpx_codec_internal.h"
struct VP9Common;
-struct VP9Decoder;
+struct VP10Decoder;
// WorkerData for the FrameWorker thread. It contains all the information of
// the worker and decode structures for decoding a frame.
typedef struct FrameWorkerData {
- struct VP9Decoder *pbi;
+ struct VP10Decoder *pbi;
const uint8_t *data;
const uint8_t *data_end;
size_t data_size;
--- a/vp10/vp10_dx_iface.c
+++ b/vp10/vp10_dx_iface.c
@@ -454,7 +454,7 @@
}
static INLINE void check_resync(vpx_codec_alg_priv_t *const ctx,
- const VP9Decoder *const pbi) {
+ const VP10Decoder *const pbi) {
// Clear resync flag if worker got a key frame or intra only frame.
if (ctx->need_resync == 1 && pbi->need_resync == 0 &&
(pbi->common.intra_only || pbi->common.frame_type == KEY_FRAME))