Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: source/libvpx/vp8/common/alloccommon.c

Issue 7671004: Update libvpx snapshot to v0.9.7-p1 (Cayuga). (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/libvpx/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/libs.mk ('k') | source/libvpx/vp8/common/arm/arm_systemdependent.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/vp8/common/alloccommon.c
===================================================================
--- source/libvpx/vp8/common/alloccommon.c (revision 96967)
+++ source/libvpx/vp8/common/alloccommon.c (working copy)
@@ -27,6 +27,9 @@
for (i = 0; i < rows; i++)
{
+ /* TODO(holmer): Bug? This updates the last element of each row
+ * rather than the border element!
+ */
vpx_memset(&mi[i*cols-1], 0, sizeof(MODE_INFO));
}
}
@@ -43,9 +46,11 @@
vpx_free(oci->above_context);
vpx_free(oci->mip);
+ vpx_free(oci->prev_mip);
oci->above_context = 0;
oci->mip = 0;
+ oci->prev_mip = 0;
}
@@ -65,9 +70,9 @@
for (i = 0; i < NUM_YV12_BUFFERS; i++)
{
- oci->fb_idx_ref_cnt[0] = 0;
-
- if (vp8_yv12_alloc_frame_buffer(&oci->yv12_fb[i], width, height, VP8BORDERINPIXELS) < 0)
+ oci->fb_idx_ref_cnt[i] = 0;
+ oci->yv12_fb[i].flags = 0;
+ if (vp8_yv12_alloc_frame_buffer(&oci->yv12_fb[i], width, height, VP8BORDERINPIXELS) < 0)
{
vp8_de_alloc_frame_buffers(oci);
return 1;
@@ -110,7 +115,22 @@
oci->mi = oci->mip + oci->mode_info_stride + 1;
+ /* allocate memory for last frame MODE_INFO array */
+#if CONFIG_ERROR_CONCEALMENT
+ oci->prev_mip = vpx_calloc((oci->mb_cols + 1) * (oci->mb_rows + 1), sizeof(MODE_INFO));
+ if (!oci->prev_mip)
+ {
+ vp8_de_alloc_frame_buffers(oci);
+ return 1;
+ }
+
+ oci->prev_mi = oci->prev_mip + oci->mode_info_stride + 1;
+#else
+ oci->prev_mip = NULL;
+ oci->prev_mi = NULL;
+#endif
+
oci->above_context = vpx_calloc(sizeof(ENTROPY_CONTEXT_PLANES) * oci->mb_cols, 1);
if (!oci->above_context)
@@ -120,6 +140,9 @@
}
update_mode_info_border(oci->mi, oci->mb_rows, oci->mb_cols);
+#if CONFIG_ERROR_CONCEALMENT
+ update_mode_info_border(oci->prev_mi, oci->mb_rows, oci->mb_cols);
+#endif
return 0;
}
@@ -129,32 +152,32 @@
{
case 0:
cm->no_lpf = 0;
- cm->simpler_lpf = 0;
+ cm->filter_type = NORMAL_LOOPFILTER;
cm->use_bilinear_mc_filter = 0;
cm->full_pixel = 0;
break;
case 1:
cm->no_lpf = 0;
- cm->simpler_lpf = 1;
+ cm->filter_type = SIMPLE_LOOPFILTER;
cm->use_bilinear_mc_filter = 1;
cm->full_pixel = 0;
break;
case 2:
cm->no_lpf = 1;
- cm->simpler_lpf = 0;
+ cm->filter_type = NORMAL_LOOPFILTER;
cm->use_bilinear_mc_filter = 1;
cm->full_pixel = 0;
break;
case 3:
cm->no_lpf = 1;
- cm->simpler_lpf = 1;
+ cm->filter_type = SIMPLE_LOOPFILTER;
cm->use_bilinear_mc_filter = 1;
cm->full_pixel = 1;
break;
default:
/*4,5,6,7 are reserved for future use*/
cm->no_lpf = 0;
- cm->simpler_lpf = 0;
+ cm->filter_type = NORMAL_LOOPFILTER;
cm->use_bilinear_mc_filter = 0;
cm->full_pixel = 0;
break;
@@ -169,7 +192,7 @@
oci->mb_no_coeff_skip = 1;
oci->no_lpf = 0;
- oci->simpler_lpf = 0;
+ oci->filter_type = NORMAL_LOOPFILTER;
oci->use_bilinear_mc_filter = 0;
oci->full_pixel = 0;
oci->multi_token_partition = ONE_PARTITION;
« no previous file with comments | « source/libvpx/libs.mk ('k') | source/libvpx/vp8/common/arm/arm_systemdependent.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698