summaryrefslogtreecommitdiff
path: root/vp8/common/alloccommon.c
diff options
context:
space:
mode:
authorDeb Mukherjee <debargha@google.com>2012-03-22 09:13:18 -0700
committerDeb Mukherjee <debargha@google.com>2012-03-22 09:55:07 -0700
commit66ba79f5fb8ec3f729903f8a5edcfef93a663ce6 (patch)
tree7c7a3672eee120533d7de77ae8d704fbba5bae83 /vp8/common/alloccommon.c
parentfd9df44a054260aef0aaf3d8acda61d35e3b001b (diff)
downloadlibvpx-66ba79f5fb8ec3f729903f8a5edcfef93a663ce6.tar
libvpx-66ba79f5fb8ec3f729903f8a5edcfef93a663ce6.tar.gz
libvpx-66ba79f5fb8ec3f729903f8a5edcfef93a663ce6.tar.bz2
libvpx-66ba79f5fb8ec3f729903f8a5edcfef93a663ce6.zip
Miscellaneous changes in mfqe and postproc modules
Adds logic to disable mfqe for the first frame after a configuration change such as change in resolution. Also adds some missing if CONFIG_POSTPROC macro checks. Change-Id: If29053dad50b676bd29189ab7f9fe250eb5d30b3
Diffstat (limited to 'vp8/common/alloccommon.c')
-rw-r--r--vp8/common/alloccommon.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/vp8/common/alloccommon.c b/vp8/common/alloccommon.c
index b32d8a939..a6ccfd272 100644
--- a/vp8/common/alloccommon.c
+++ b/vp8/common/alloccommon.c
@@ -41,9 +41,11 @@ void vp8_de_alloc_frame_buffers(VP8_COMMON *oci)
vp8_yv12_de_alloc_frame_buffer(&oci->yv12_fb[i]);
vp8_yv12_de_alloc_frame_buffer(&oci->temp_scale_frame);
+#if CONFIG_POSTPROC
vp8_yv12_de_alloc_frame_buffer(&oci->post_proc_buffer);
if (oci->post_proc_buffer_int_used)
vp8_yv12_de_alloc_frame_buffer(&oci->post_proc_buffer_int);
+#endif
vpx_free(oci->above_context);
vpx_free(oci->mip);
@@ -96,6 +98,7 @@ int vp8_alloc_frame_buffers(VP8_COMMON *oci, int width, int height)
return 1;
}
+#if CONFIG_POSTPROC
if (vp8_yv12_alloc_frame_buffer(&oci->post_proc_buffer, width, height, VP8BORDERINPIXELS) < 0)
{
vp8_de_alloc_frame_buffers(oci);
@@ -104,6 +107,9 @@ int vp8_alloc_frame_buffers(VP8_COMMON *oci, int width, int height)
oci->post_proc_buffer_int_used = 0;
+ vpx_memset(&oci->postproc_state, 0, sizeof(oci->postproc_state));
+#endif
+
oci->mb_rows = height >> 4;
oci->mb_cols = width >> 4;
oci->MBs = oci->mb_rows * oci->mb_cols;