From 36ffe64498d784757b0dacf5f359ac4e403f14da Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Fri, 25 Sep 2015 21:34:29 -0400 Subject: Rename display_{size,width,height} to render_*. The name "display_*" (or "d_*") is used for non-compatible information (that is, the cropped frame dimensions in pixels, as opposed to the intended screen rendering surface size). Therefore, continuing to use display_* would be confusing to end users. Instead, rename the field to render_*, so that struct vpx_image can include it. Change-Id: Iab8d2eae96492b71c4ea60c4bce8121cb2a1fe2d --- vp9/common/vp9_onyxc_int.h | 4 ++-- vp9/decoder/vp9_decodeframe.c | 12 ++++++------ vp9/encoder/vp9_bitstream.c | 16 ++++++++-------- vp9/encoder/vp9_encoder.c | 4 ++-- vp9/vp9_dx_iface.c | 14 +++++++------- 5 files changed, 25 insertions(+), 25 deletions(-) (limited to 'vp9') diff --git a/vp9/common/vp9_onyxc_int.h b/vp9/common/vp9_onyxc_int.h index 61e731a1d..6fb8dca22 100644 --- a/vp9/common/vp9_onyxc_int.h +++ b/vp9/common/vp9_onyxc_int.h @@ -115,8 +115,8 @@ typedef struct VP9Common { int color_range; int width; int height; - int display_width; - int display_height; + int render_width; + int render_height; int last_width; int last_height; diff --git a/vp9/decoder/vp9_decodeframe.c b/vp9/decoder/vp9_decodeframe.c index ba8c8ddc4..0cd1648a7 100644 --- a/vp9/decoder/vp9_decodeframe.c +++ b/vp9/decoder/vp9_decodeframe.c @@ -1181,11 +1181,11 @@ static INTERP_FILTER read_interp_filter(struct vpx_read_bit_buffer *rb) { : literal_to_filter[vpx_rb_read_literal(rb, 2)]; } -static void setup_display_size(VP9_COMMON *cm, struct vpx_read_bit_buffer *rb) { - cm->display_width = cm->width; - cm->display_height = cm->height; +static void setup_render_size(VP9_COMMON *cm, struct vpx_read_bit_buffer *rb) { + cm->render_width = cm->width; + cm->render_height = cm->height; if (vpx_rb_read_bit(rb)) - vp9_read_frame_size(rb, &cm->display_width, &cm->display_height); + vp9_read_frame_size(rb, &cm->render_width, &cm->render_height); } static void resize_mv_buffer(VP9_COMMON *cm) { @@ -1233,7 +1233,7 @@ static void setup_frame_size(VP9_COMMON *cm, struct vpx_read_bit_buffer *rb) { BufferPool *const pool = cm->buffer_pool; vp9_read_frame_size(rb, &width, &height); resize_context_buffers(cm, width, height); - setup_display_size(cm, rb); + setup_render_size(cm, rb); lock_buffer_pool(pool); if (vpx_realloc_frame_buffer( @@ -1315,7 +1315,7 @@ static void setup_frame_size_with_refs(VP9_COMMON *cm, } resize_context_buffers(cm, width, height); - setup_display_size(cm, rb); + setup_render_size(cm, rb); lock_buffer_pool(pool); if (vpx_realloc_frame_buffer( diff --git a/vp9/encoder/vp9_bitstream.c b/vp9/encoder/vp9_bitstream.c index 01cced001..f3c8579b3 100644 --- a/vp9/encoder/vp9_bitstream.c +++ b/vp9/encoder/vp9_bitstream.c @@ -969,14 +969,14 @@ static size_t encode_tiles(VP9_COMP *cpi, uint8_t *data_ptr) { return total_size; } -static void write_display_size(const VP9_COMMON *cm, - struct vpx_write_bit_buffer *wb) { - const int scaling_active = cm->width != cm->display_width || - cm->height != cm->display_height; +static void write_render_size(const VP9_COMMON *cm, + struct vpx_write_bit_buffer *wb) { + const int scaling_active = cm->width != cm->render_width || + cm->height != cm->render_height; vpx_wb_write_bit(wb, scaling_active); if (scaling_active) { - vpx_wb_write_literal(wb, cm->display_width - 1, 16); - vpx_wb_write_literal(wb, cm->display_height - 1, 16); + vpx_wb_write_literal(wb, cm->render_width - 1, 16); + vpx_wb_write_literal(wb, cm->render_height - 1, 16); } } @@ -985,7 +985,7 @@ static void write_frame_size(const VP9_COMMON *cm, vpx_wb_write_literal(wb, cm->width - 1, 16); vpx_wb_write_literal(wb, cm->height - 1, 16); - write_display_size(cm, wb); + write_render_size(cm, wb); } static void write_frame_size_with_refs(VP9_COMP *cpi, @@ -1023,7 +1023,7 @@ static void write_frame_size_with_refs(VP9_COMP *cpi, vpx_wb_write_literal(wb, cm->height - 1, 16); } - write_display_size(cm, wb); + write_render_size(cm, wb); } static void write_sync_code(struct vpx_write_bit_buffer *wb) { diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c index eb0d3608f..060c25f1a 100644 --- a/vp9/encoder/vp9_encoder.c +++ b/vp9/encoder/vp9_encoder.c @@ -1509,8 +1509,8 @@ void vp9_change_config(struct VP9_COMP *cpi, const VP9EncoderConfig *oxcf) { cm->interp_filter = cpi->sf.default_interp_filter; - cm->display_width = cpi->oxcf.width; - cm->display_height = cpi->oxcf.height; + cm->render_width = cpi->oxcf.width; + cm->render_height = cpi->oxcf.height; if (last_w != cpi->oxcf.width || last_h != cpi->oxcf.height) { cm->width = cpi->oxcf.width; cm->height = cpi->oxcf.height; diff --git a/vp9/vp9_dx_iface.c b/vp9/vp9_dx_iface.c index eb2371e2c..c6b1ba95f 100644 --- a/vp9/vp9_dx_iface.c +++ b/vp9/vp9_dx_iface.c @@ -979,9 +979,9 @@ static vpx_codec_err_t ctrl_get_frame_size(vpx_codec_alg_priv_t *ctx, return VPX_CODEC_INVALID_PARAM; } -static vpx_codec_err_t ctrl_get_display_size(vpx_codec_alg_priv_t *ctx, - va_list args) { - int *const display_size = va_arg(args, int *); +static vpx_codec_err_t ctrl_get_render_size(vpx_codec_alg_priv_t *ctx, + va_list args) { + int *const render_size = va_arg(args, int *); // Only support this function in serial decode. if (ctx->frame_parallel_decode) { @@ -989,14 +989,14 @@ static vpx_codec_err_t ctrl_get_display_size(vpx_codec_alg_priv_t *ctx, return VPX_CODEC_INCAPABLE; } - if (display_size) { + if (render_size) { if (ctx->frame_workers) { VPxWorker *const worker = ctx->frame_workers; FrameWorkerData *const frame_worker_data = (FrameWorkerData *)worker->data1; const VP9_COMMON *const cm = &frame_worker_data->pbi->common; - display_size[0] = cm->display_width; - display_size[1] = cm->display_height; + render_size[0] = cm->render_width; + render_size[1] = cm->render_height; return VPX_CODEC_OK; } else { return VPX_CODEC_ERROR; @@ -1095,7 +1095,7 @@ static vpx_codec_ctrl_fn_map_t decoder_ctrl_maps[] = { {VP8D_GET_LAST_REF_UPDATES, ctrl_get_last_ref_updates}, {VP8D_GET_FRAME_CORRUPTED, ctrl_get_frame_corrupted}, {VP9_GET_REFERENCE, ctrl_get_reference}, - {VP9D_GET_DISPLAY_SIZE, ctrl_get_display_size}, + {VP9D_GET_DISPLAY_SIZE, ctrl_get_render_size}, {VP9D_GET_BIT_DEPTH, ctrl_get_bit_depth}, {VP9D_GET_FRAME_SIZE, ctrl_get_frame_size}, -- cgit v1.2.3