summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Kovalev <dkovalev@google.com>2013-04-02 13:34:20 -0700
committerDmitry Kovalev <dkovalev@google.com>2013-04-02 13:34:20 -0700
commit626635c271219b20a9d70f6a1a1dbc6ff9005bc1 (patch)
tree2747d56e4615458fe60752b45e159ddc8149a034
parent49bc402a9479636d6b75693e421473161de98db4 (diff)
downloadlibvpx-626635c271219b20a9d70f6a1a1dbc6ff9005bc1.tar
libvpx-626635c271219b20a9d70f6a1a1dbc6ff9005bc1.tar.gz
libvpx-626635c271219b20a9d70f6a1a1dbc6ff9005bc1.tar.bz2
libvpx-626635c271219b20a9d70f6a1a1dbc6ff9005bc1.zip
Lower case names for struct members.
Lower case member names inside VP9D_CONFIG and VP9D_COMP structs. Change-Id: I75af9ad2d929a35c357207a3fd9ebedddabf79c3
-rw-r--r--vp9/common/vp9_loopfilter.c9
-rw-r--r--vp9/decoder/vp9_decodframe.c10
-rw-r--r--vp9/decoder/vp9_onyxd.h84
-rw-r--r--vp9/decoder/vp9_onyxd_if.c31
-rw-r--r--vp9/decoder/vp9_onyxd_int.h9
-rw-r--r--vp9/vp9_dx_iface.c6
6 files changed, 73 insertions, 76 deletions
diff --git a/vp9/common/vp9_loopfilter.c b/vp9/common/vp9_loopfilter.c
index cbdb273b0..8bff2d069 100644
--- a/vp9/common/vp9_loopfilter.c
+++ b/vp9/common/vp9_loopfilter.c
@@ -86,17 +86,16 @@ void vp9_loop_filter_init(VP9_COMMON *cm) {
loop_filter_info_n *lfi = &cm->lf_info;
int i;
- /* init limits for given sharpness*/
+ // init limits for given sharpness
vp9_loop_filter_update_sharpness(lfi, cm->sharpness_level);
cm->last_sharpness_level = cm->sharpness_level;
- /* init LUT for lvl and hev thr picking */
+ // init LUT for lvl and hev thr picking
lf_init_lut(lfi);
- /* init hev threshold const vectors */
- for (i = 0; i < 4; i++) {
+ // init hev threshold const vectors
+ for (i = 0; i < 4; i++)
vpx_memset(lfi->hev_thr[i], i, SIMD_WIDTH);
- }
}
void vp9_loop_filter_frame_init(VP9_COMMON *cm,
diff --git a/vp9/decoder/vp9_decodframe.c b/vp9/decoder/vp9_decodframe.c
index 10c97c0bc..00f245ef6 100644
--- a/vp9/decoder/vp9_decodframe.c
+++ b/vp9/decoder/vp9_decodframe.c
@@ -100,7 +100,7 @@ void vp9_init_de_quantizer(VP9D_COMP *pbi) {
/* all the ac values =; */
for (i = 1; i < 16; i++) {
- int rc = vp9_default_zig_zag1d_4x4[i];
+ const int rc = vp9_default_zig_zag1d_4x4[i];
pc->Y1dequant[q][rc] = (int16_t)vp9_ac_yquant(q);
pc->UVdequant[q][rc] = (int16_t)vp9_ac_uv_quant(q, pc->uvac_delta_q);
@@ -1099,8 +1099,8 @@ static void setup_token_decoder(VP9D_COMP *pbi,
const unsigned char *cx_data,
BOOL_DECODER* const bool_decoder) {
VP9_COMMON *pc = &pbi->common;
- const unsigned char *user_data_end = pbi->Source + pbi->source_sz;
- const unsigned char *partition = cx_data;
+ const uint8_t *user_data_end = pbi->source + pbi->source_sz;
+ const uint8_t *partition = cx_data;
ptrdiff_t bytes_left = user_data_end - partition;
ptrdiff_t partition_size = bytes_left;
@@ -1644,11 +1644,11 @@ static void decode_tiles(VP9D_COMP *pbi,
}
}
-int vp9_decode_frame(VP9D_COMP *pbi, const unsigned char **p_data_end) {
+int vp9_decode_frame(VP9D_COMP *pbi, const uint8_t **p_data_end) {
BOOL_DECODER header_bc, residual_bc;
VP9_COMMON *const pc = &pbi->common;
MACROBLOCKD *const xd = &pbi->mb;
- const uint8_t *data = (const uint8_t *)pbi->Source;
+ const uint8_t *data = pbi->source;
const uint8_t *data_end = data + pbi->source_sz;
ptrdiff_t first_partition_length_in_bytes = 0;
int i, corrupt_tokens = 0;
diff --git a/vp9/decoder/vp9_onyxd.h b/vp9/decoder/vp9_onyxd.h
index cd71166e4..cd5b7508f 100644
--- a/vp9/decoder/vp9_onyxd.h
+++ b/vp9/decoder/vp9_onyxd.h
@@ -11,54 +11,56 @@
#ifndef VP9_COMMON_VP9_ONYXD_H_
#define VP9_COMMON_VP9_ONYXD_H_
-/* Create/destroy static data structures. */
#ifdef __cplusplus
extern "C" {
#endif
+
#include "vpx_scale/yv12config.h"
#include "vp9/common/vp9_ppflags.h"
-#include "vpx_ports/mem.h"
#include "vpx/vpx_codec.h"
- typedef void *VP9D_PTR;
- typedef struct {
- int Width;
- int Height;
- int Version;
- int postprocess;
- int max_threads;
- int inv_tile_order;
- int input_partition;
- } VP9D_CONFIG;
- typedef enum {
- VP9_LAST_FLAG = 1,
- VP9_GOLD_FLAG = 2,
- VP9_ALT_FLAG = 4
- } VP9_REFFRAME;
-
- void vp9_initialize_dec(void);
-
- int vp9_receive_compressed_data(VP9D_PTR comp, unsigned long size,
- const unsigned char **dest,
- int64_t time_stamp);
-
- int vp9_get_raw_frame(VP9D_PTR comp, YV12_BUFFER_CONFIG *sd,
- int64_t *time_stamp, int64_t *time_end_stamp,
- vp9_ppflags_t *flags);
-
- vpx_codec_err_t vp9_copy_reference_dec(VP9D_PTR comp,
- VP9_REFFRAME ref_frame_flag,
- YV12_BUFFER_CONFIG *sd);
-
- vpx_codec_err_t vp9_set_reference_dec(VP9D_PTR comp,
- VP9_REFFRAME ref_frame_flag,
- YV12_BUFFER_CONFIG *sd);
-
- int vp9_get_reference_dec(VP9D_PTR ptr, int index, YV12_BUFFER_CONFIG **fb);
-
- VP9D_PTR vp9_create_decompressor(VP9D_CONFIG *oxcf);
-
- void vp9_remove_decompressor(VP9D_PTR comp);
+typedef void *VP9D_PTR;
+
+typedef struct {
+ int width;
+ int height;
+ int version;
+ int postprocess;
+ int max_threads;
+ int inv_tile_order;
+ int input_partition;
+} VP9D_CONFIG;
+
+typedef enum {
+ VP9_LAST_FLAG = 1,
+ VP9_GOLD_FLAG = 2,
+ VP9_ALT_FLAG = 4
+} VP9_REFFRAME;
+
+void vp9_initialize_dec();
+
+int vp9_receive_compressed_data(VP9D_PTR comp,
+ uint64_t size, const uint8_t **dest,
+ int64_t time_stamp);
+
+int vp9_get_raw_frame(VP9D_PTR comp, YV12_BUFFER_CONFIG *sd,
+ int64_t *time_stamp, int64_t *time_end_stamp,
+ vp9_ppflags_t *flags);
+
+vpx_codec_err_t vp9_copy_reference_dec(VP9D_PTR comp,
+ VP9_REFFRAME ref_frame_flag,
+ YV12_BUFFER_CONFIG *sd);
+
+vpx_codec_err_t vp9_set_reference_dec(VP9D_PTR comp,
+ VP9_REFFRAME ref_frame_flag,
+ YV12_BUFFER_CONFIG *sd);
+
+int vp9_get_reference_dec(VP9D_PTR ptr, int index, YV12_BUFFER_CONFIG **fb);
+
+
+VP9D_PTR vp9_create_decompressor(VP9D_CONFIG *oxcf);
+
+void vp9_remove_decompressor(VP9D_PTR comp);
#ifdef __cplusplus
}
diff --git a/vp9/decoder/vp9_onyxd_if.c b/vp9/decoder/vp9_onyxd_if.c
index 2b61f0aff..3c7ac0fcd 100644
--- a/vp9/decoder/vp9_onyxd_if.c
+++ b/vp9/decoder/vp9_onyxd_if.c
@@ -111,7 +111,7 @@ void vp9_initialize_dec() {
}
VP9D_PTR vp9_create_decompressor(VP9D_CONFIG *oxcf) {
- VP9D_COMP *pbi = vpx_memalign(32, sizeof(VP9D_COMP));
+ VP9D_COMP *const pbi = vpx_memalign(32, sizeof(VP9D_COMP));
if (!pbi)
return NULL;
@@ -121,40 +121,37 @@ VP9D_PTR vp9_create_decompressor(VP9D_CONFIG *oxcf) {
if (setjmp(pbi->common.error.jmp)) {
pbi->common.error.setjmp = 0;
vp9_remove_decompressor(pbi);
- return 0;
+ return NULL;
}
pbi->common.error.setjmp = 1;
vp9_initialize_dec();
vp9_create_common(&pbi->common);
- pbi->oxcf = *oxcf;
+ pbi->oxcf = *oxcf;
pbi->common.current_video_frame = 0;
pbi->ready_for_new_data = 1;
- /* vp9_init_de_quantizer() is first called here. Add check in
- * frame_init_dequantizer() to avoid unnecessary calling of
- * vp9_init_de_quantizer() for every frame.
- */
+ // vp9_init_de_quantizer() is first called here. Add check in
+ // frame_init_dequantizer() to avoid unnecessary calling of
+ // vp9_init_de_quantizer() for every frame.
vp9_init_de_quantizer(pbi);
vp9_loop_filter_init(&pbi->common);
pbi->common.error.setjmp = 0;
-
pbi->decoded_key_frame = 0;
- return (VP9D_PTR) pbi;
+ return pbi;
}
void vp9_remove_decompressor(VP9D_PTR ptr) {
- VP9D_COMP *pbi = (VP9D_COMP *) ptr;
+ VP9D_COMP *const pbi = (VP9D_COMP *)ptr;
if (!pbi)
return;
- // Delete segmentation map
if (pbi->common.last_frame_seg_map)
vpx_free(pbi->common.last_frame_seg_map);
@@ -273,24 +270,23 @@ static void swap_frame_buffers(VP9D_COMP *pbi) {
pbi->common.active_ref_idx[ref_index] = INT_MAX;
}
-int vp9_receive_compressed_data(VP9D_PTR ptr, unsigned long size,
- const unsigned char **psource,
+int vp9_receive_compressed_data(VP9D_PTR ptr,
+ uint64_t size, const uint8_t **psource,
int64_t time_stamp) {
VP9D_COMP *pbi = (VP9D_COMP *) ptr;
VP9_COMMON *cm = &pbi->common;
- const unsigned char *source = *psource;
+ const uint8_t *source = *psource;
int retcode = 0;
/*if(pbi->ready_for_new_data == 0)
return -1;*/
- if (ptr == 0) {
+ if (ptr == 0)
return -1;
- }
pbi->common.error.error_code = VPX_CODEC_OK;
- pbi->Source = source;
+ pbi->source = source;
pbi->source_sz = size;
if (pbi->source_sz == 0) {
@@ -325,6 +321,7 @@ int vp9_receive_compressed_data(VP9D_PTR ptr, unsigned long size,
if (cm->fb_idx_ref_cnt[cm->new_fb_idx] > 0)
cm->fb_idx_ref_cnt[cm->new_fb_idx]--;
+
return -1;
}
diff --git a/vp9/decoder/vp9_onyxd_int.h b/vp9/decoder/vp9_onyxd_int.h
index 0e6d059af..da40bd1cb 100644
--- a/vp9/decoder/vp9_onyxd_int.h
+++ b/vp9/decoder/vp9_onyxd_int.h
@@ -25,13 +25,12 @@ typedef struct VP9Decompressor {
VP9D_CONFIG oxcf;
-
- const unsigned char *Source;
- unsigned int source_sz;
+ const uint8_t *source;
+ uint32_t source_sz;
vp9_reader *mbc;
int64_t last_time_stamp;
- int ready_for_new_data;
+ int ready_for_new_data;
int refresh_frame_flags;
vp9_prob prob_skip_false;
@@ -42,7 +41,7 @@ typedef struct VP9Decompressor {
int initial_height;
} VP9D_COMP;
-int vp9_decode_frame(VP9D_COMP *cpi, const unsigned char **p_data_end);
+int vp9_decode_frame(VP9D_COMP *cpi, const uint8_t **p_data_end);
#if CONFIG_DEBUG
diff --git a/vp9/vp9_dx_iface.c b/vp9/vp9_dx_iface.c
index d0c23f07a..2426f2175 100644
--- a/vp9/vp9_dx_iface.c
+++ b/vp9/vp9_dx_iface.c
@@ -329,9 +329,9 @@ static vpx_codec_err_t decode_one(vpx_codec_alg_priv_t *ctx,
vp9_initialize_dec();
- oxcf.Width = ctx->si.w;
- oxcf.Height = ctx->si.h;
- oxcf.Version = 9;
+ oxcf.width = ctx->si.w;
+ oxcf.height = ctx->si.h;
+ oxcf.version = 9;
oxcf.postprocess = 0;
oxcf.max_threads = ctx->cfg.threads;
oxcf.inv_tile_order = ctx->invert_tile_order;