Commit 013212c9 authored by Yaowu Xu's avatar Yaowu Xu
Browse files

misc-fix: make render_size referencable

This commit merges the fix of making render size referencable in
coding.

Related tracking issue:
https://bugs.chromium.org/p/webm/issues/detail?id=1079
Original libvpx commit:
ce378025

Change-Id: I24f1d2f019ad41985905608e2847b06221c19338
parent a20943c5
...@@ -1040,10 +1040,8 @@ static void setup_frame_size_with_refs(AV1_COMMON *cm, ...@@ -1040,10 +1040,8 @@ static void setup_frame_size_with_refs(AV1_COMMON *cm,
YV12_BUFFER_CONFIG *const buf = cm->frame_refs[i].buf; YV12_BUFFER_CONFIG *const buf = cm->frame_refs[i].buf;
width = buf->y_crop_width; width = buf->y_crop_width;
height = buf->y_crop_height; height = buf->y_crop_height;
#if CONFIG_MISC_FIXES
cm->render_width = buf->render_width; cm->render_width = buf->render_width;
cm->render_height = buf->render_height; cm->render_height = buf->render_height;
#endif
found = 1; found = 1;
break; break;
} }
...@@ -1051,9 +1049,7 @@ static void setup_frame_size_with_refs(AV1_COMMON *cm, ...@@ -1051,9 +1049,7 @@ static void setup_frame_size_with_refs(AV1_COMMON *cm,
if (!found) { if (!found) {
av1_read_frame_size(rb, &width, &height); av1_read_frame_size(rb, &width, &height);
#if CONFIG_MISC_FIXES
setup_render_size(cm, rb); setup_render_size(cm, rb);
#endif
} }
if (width <= 0 || height <= 0) if (width <= 0 || height <= 0)
...@@ -1082,10 +1078,6 @@ static void setup_frame_size_with_refs(AV1_COMMON *cm, ...@@ -1082,10 +1078,6 @@ static void setup_frame_size_with_refs(AV1_COMMON *cm,
} }
resize_context_buffers(cm, width, height); resize_context_buffers(cm, width, height);
#if !CONFIG_MISC_FIXES
setup_render_size(cm, rb);
#endif
lock_buffer_pool(pool); lock_buffer_pool(pool);
if (aom_realloc_frame_buffer( if (aom_realloc_frame_buffer(
get_frame_new_buffer(cm), cm->width, cm->height, cm->subsampling_x, get_frame_new_buffer(cm), cm->width, cm->height, cm->subsampling_x,
......
...@@ -1934,10 +1934,8 @@ static void write_frame_size_with_refs(AV1_COMP *cpi, ...@@ -1934,10 +1934,8 @@ static void write_frame_size_with_refs(AV1_COMP *cpi,
if (cfg != NULL) { if (cfg != NULL) {
found = found =
cm->width == cfg->y_crop_width && cm->height == cfg->y_crop_height; cm->width == cfg->y_crop_width && cm->height == cfg->y_crop_height;
#if CONFIG_MISC_FIXES
found &= cm->render_width == cfg->render_width && found &= cm->render_width == cfg->render_width &&
cm->render_height == cfg->render_height; cm->render_height == cfg->render_height;
#endif
} }
aom_wb_write_bit(wb, found); aom_wb_write_bit(wb, found);
if (found) { if (found) {
...@@ -1948,15 +1946,8 @@ static void write_frame_size_with_refs(AV1_COMP *cpi, ...@@ -1948,15 +1946,8 @@ static void write_frame_size_with_refs(AV1_COMP *cpi,
if (!found) { if (!found) {
aom_wb_write_literal(wb, cm->width - 1, 16); aom_wb_write_literal(wb, cm->width - 1, 16);
aom_wb_write_literal(wb, cm->height - 1, 16); aom_wb_write_literal(wb, cm->height - 1, 16);
#if CONFIG_MISC_FIXES
write_render_size(cm, wb); write_render_size(cm, wb);
#endif
} }
#if !CONFIG_MISC_FIXES
write_render_size(cm, wb);
#endif
} }
static void write_sync_code(struct aom_write_bit_buffer *wb) { static void write_sync_code(struct aom_write_bit_buffer *wb) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment