summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2017-08-28 08:13:31 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2017-08-28 08:13:31 +0000
commitae51b03807dffd7904a6b66b84d47209c288d4fc (patch)
tree0554954246ae6dcc32e311b78f278b2985c1ae85
parente5e6926fd15c9541e06e08fc69ff409fd1f67282 (diff)
parentef3f02f5177304b77bb6df089e8b5b3604a30963 (diff)
downloadandroid_external_libavc-ae51b03807dffd7904a6b66b84d47209c288d4fc.tar.gz
android_external_libavc-ae51b03807dffd7904a6b66b84d47209c288d4fc.tar.bz2
android_external_libavc-ae51b03807dffd7904a6b66b84d47209c288d4fc.zip
release-request-2c5efa61-1f02-4e74-bfeb-1ca3cd5028bd-for-git_pi-release-4301718 snap-temp-L56500000097146696
Change-Id: Idabf0acfa511385ed496201f6f24937bbbe66f70
-rw-r--r--decoder/ih264d_defs.h5
-rw-r--r--decoder/ih264d_parse_headers.c4
2 files changed, 6 insertions, 3 deletions
diff --git a/decoder/ih264d_defs.h b/decoder/ih264d_defs.h
index 0682339..3dd5508 100644
--- a/decoder/ih264d_defs.h
+++ b/decoder/ih264d_defs.h
@@ -34,8 +34,9 @@
*
************************************************************************
*/
-#define H264_MAX_FRAME_WIDTH 3840
-#define H264_MAX_FRAME_HEIGHT 2176
+#define H264_MAX_FRAME_WIDTH 4096
+#define H264_MAX_FRAME_HEIGHT 4096
+#define H264_MAX_FRAME_SIZE (4096 * 2048)
#define H264_MIN_FRAME_WIDTH 16
#define H264_MIN_FRAME_HEIGHT 16
diff --git a/decoder/ih264d_parse_headers.c b/decoder/ih264d_parse_headers.c
index c8a7954..4f3136f 100644
--- a/decoder/ih264d_parse_headers.c
+++ b/decoder/ih264d_parse_headers.c
@@ -917,7 +917,9 @@ WORD32 ih264d_parse_sps(dec_struct_t *ps_dec, dec_bit_stream_t *ps_bitstrm)
}
/* Check for unsupported resolutions */
- if((u2_pic_wd > H264_MAX_FRAME_WIDTH) || (u2_pic_ht > H264_MAX_FRAME_HEIGHT))
+ if((u2_pic_wd > H264_MAX_FRAME_WIDTH) || (u2_pic_ht > H264_MAX_FRAME_HEIGHT)
+ || (u2_pic_wd < H264_MIN_FRAME_WIDTH) || (u2_pic_ht < H264_MIN_FRAME_HEIGHT)
+ || (u2_pic_wd * (UWORD32)u2_pic_ht > H264_MAX_FRAME_SIZE))
{
return IVD_STREAM_WIDTH_HEIGHT_NOT_SUPPORTED;
}