summaryrefslogtreecommitdiff
path: root/vp8/encoder/onyx_if.c
diff options
context:
space:
mode:
authorJohn Koleszar <jkoleszar@google.com>2011-07-08 00:05:04 -0400
committerJohn Koleszar <jkoleszar@google.com>2011-07-08 00:05:05 -0400
commit2c3c54f7475021e2fbc62998b042e54efa9f142c (patch)
treeb2024a04de45b06773af772c3ca2ec2d02ba5640 /vp8/encoder/onyx_if.c
parent61d9d595d5d42790cdead1332d87aaf663a57acf (diff)
parent973a9c075d2db817e489f5ba050fc49963bf2c71 (diff)
downloadlibvpx-2c3c54f7475021e2fbc62998b042e54efa9f142c.tar
libvpx-2c3c54f7475021e2fbc62998b042e54efa9f142c.tar.gz
libvpx-2c3c54f7475021e2fbc62998b042e54efa9f142c.tar.bz2
libvpx-2c3c54f7475021e2fbc62998b042e54efa9f142c.zip
Merge remote branch 'origin/master' into experimental
Change-Id: I9cead934ebea85d81aceaaec4674efc74367f984
Diffstat (limited to 'vp8/encoder/onyx_if.c')
-rw-r--r--vp8/encoder/onyx_if.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c
index 4ec4788e7..282f07d54 100644
--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -4681,6 +4681,20 @@ int vp8_receive_raw_frame(VP8_PTR ptr, unsigned int frame_flags, YV12_BUFFER_CON
}
+static int frame_is_reference(const VP8_COMP *cpi)
+{
+ const VP8_COMMON *cm = &cpi->common;
+ const MACROBLOCKD *xd = &cpi->mb.e_mbd;
+
+ return cm->frame_type == KEY_FRAME || cm->refresh_last_frame
+ || cm->refresh_golden_frame || cm->refresh_alt_ref_frame
+ || cm->copy_buffer_to_gf || cm->copy_buffer_to_arf
+ || cm->refresh_entropy_probs
+ || xd->mode_ref_lf_delta_update
+ || xd->update_mb_segmentation_map || xd->update_mb_segmentation_data;
+}
+
+
int vp8_get_compressed_data(VP8_PTR ptr, unsigned int *frame_flags, unsigned long *size, unsigned char *dest, INT64 *time_stamp, INT64 *time_end, int flush)
{
#if HAVE_ARMV7
@@ -4937,6 +4951,7 @@ int vp8_get_compressed_data(VP8_PTR ptr, unsigned int *frame_flags, unsigned lon
// if its a dropped frame honor the requests on subsequent frames
if (*size > 0)
{
+ cpi->droppable = !frame_is_reference(cpi);
// return to normal state
cm->refresh_entropy_probs = 1;