summaryrefslogtreecommitdiff
path: root/vp8
diff options
context:
space:
mode:
Diffstat (limited to 'vp8')
-rw-r--r--vp8/common/arm/arm_systemdependent.c13
-rw-r--r--vp8/decoder/arm/arm_dsystemdependent.c13
-rw-r--r--vp8/encoder/arm/arm_csystemdependent.c15
-rw-r--r--vp8/encoder/onyx_if.c15
-rw-r--r--vp8/encoder/onyx_int.h1
-rw-r--r--vp8/vp8_cx_iface.c3
6 files changed, 44 insertions, 16 deletions
diff --git a/vp8/common/arm/arm_systemdependent.c b/vp8/common/arm/arm_systemdependent.c
index bd5c0759d..8aab0ff03 100644
--- a/vp8/common/arm/arm_systemdependent.c
+++ b/vp8/common/arm/arm_systemdependent.c
@@ -24,14 +24,17 @@ void vp8_arch_arm_common_init(VP8_COMMON *ctx)
#if CONFIG_RUNTIME_CPU_DETECT
VP8_COMMON_RTCD *rtcd = &ctx->rtcd;
int flags = arm_cpu_caps();
- int has_edsp = flags & HAS_EDSP;
- int has_media = flags & HAS_MEDIA;
- int has_neon = flags & HAS_NEON;
rtcd->flags = flags;
/* Override default functions with fastest ones for this CPU. */
+#if HAVE_ARMV5TE
+ if (flags & HAS_EDSP)
+ {
+ }
+#endif
+
#if HAVE_ARMV6
- if (has_media)
+ if (flags & HAS_MEDIA)
{
rtcd->subpix.sixtap16x16 = vp8_sixtap_predict16x16_armv6;
rtcd->subpix.sixtap8x8 = vp8_sixtap_predict8x8_armv6;
@@ -66,7 +69,7 @@ void vp8_arch_arm_common_init(VP8_COMMON *ctx)
#endif
#if HAVE_ARMV7
- if (has_neon)
+ if (flags & HAS_NEON)
{
rtcd->subpix.sixtap16x16 = vp8_sixtap_predict16x16_neon;
rtcd->subpix.sixtap8x8 = vp8_sixtap_predict8x8_neon;
diff --git a/vp8/decoder/arm/arm_dsystemdependent.c b/vp8/decoder/arm/arm_dsystemdependent.c
index 51e901d79..79e2e1ba9 100644
--- a/vp8/decoder/arm/arm_dsystemdependent.c
+++ b/vp8/decoder/arm/arm_dsystemdependent.c
@@ -21,12 +21,15 @@ void vp8_arch_arm_decode_init(VP8D_COMP *pbi)
{
#if CONFIG_RUNTIME_CPU_DETECT
int flags = pbi->common.rtcd.flags;
- int has_edsp = flags & HAS_EDSP;
- int has_media = flags & HAS_MEDIA;
- int has_neon = flags & HAS_NEON;
+
+#if HAVE_ARMV5TE
+ if (flags & HAS_EDSP)
+ {
+ }
+#endif
#if HAVE_ARMV6
- if (has_media)
+ if (flags & HAS_MEDIA)
{
pbi->dequant.block = vp8_dequantize_b_v6;
pbi->dequant.idct_add = vp8_dequant_idct_add_v6;
@@ -38,7 +41,7 @@ void vp8_arch_arm_decode_init(VP8D_COMP *pbi)
#endif
#if HAVE_ARMV7
- if (has_neon)
+ if (flags & HAS_NEON)
{
pbi->dequant.block = vp8_dequantize_b_neon;
pbi->dequant.idct_add = vp8_dequant_idct_add_neon;
diff --git a/vp8/encoder/arm/arm_csystemdependent.c b/vp8/encoder/arm/arm_csystemdependent.c
index 56c858c71..89f8136fe 100644
--- a/vp8/encoder/arm/arm_csystemdependent.c
+++ b/vp8/encoder/arm/arm_csystemdependent.c
@@ -22,12 +22,15 @@ void vp8_arch_arm_encoder_init(VP8_COMP *cpi)
{
#if CONFIG_RUNTIME_CPU_DETECT
int flags = cpi->common.rtcd.flags;
- int has_edsp = flags & HAS_EDSP;
- int has_media = flags & HAS_MEDIA;
- int has_neon = flags & HAS_NEON;
+
+#if HAVE_ARMV5TE
+ if (flags & HAS_EDSP)
+ {
+ }
+#endif
#if HAVE_ARMV6
- if (has_media)
+ if (flags & HAS_MEDIA)
{
cpi->rtcd.variance.sad16x16 = vp8_sad16x16_armv6;
/*cpi->rtcd.variance.sad16x8 = vp8_sad16x8_c;
@@ -74,7 +77,7 @@ void vp8_arch_arm_encoder_init(VP8_COMP *cpi)
#endif
#if HAVE_ARMV7
- if (has_neon)
+ if (flags & HAS_NEON)
{
cpi->rtcd.variance.sad16x16 = vp8_sad16x16_neon;
cpi->rtcd.variance.sad16x8 = vp8_sad16x8_neon;
@@ -124,7 +127,7 @@ void vp8_arch_arm_encoder_init(VP8_COMP *cpi)
#if HAVE_ARMV7
#if CONFIG_RUNTIME_CPU_DETECT
- if (has_neon)
+ if (flags & HAS_NEON)
#endif
{
vp8_yv12_copy_partial_frame_ptr = vpxyv12_copy_partial_frame_neon;
diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c
index 80f7ae67c..73b4c7dcd 100644
--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -4590,6 +4590,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
@@ -4846,6 +4860,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;
diff --git a/vp8/encoder/onyx_int.h b/vp8/encoder/onyx_int.h
index ce401fd19..107a681be 100644
--- a/vp8/encoder/onyx_int.h
+++ b/vp8/encoder/onyx_int.h
@@ -615,6 +615,7 @@ typedef struct VP8_COMP
#if CONFIG_REALTIME_ONLY
int force_next_frame_intra; /* force next frame to intra when kf_auto says so */
#endif
+ int droppable;
} VP8_COMP;
void control_data_rate(VP8_COMP *cpi);
diff --git a/vp8/vp8_cx_iface.c b/vp8/vp8_cx_iface.c
index 5e1278a4c..966355da1 100644
--- a/vp8/vp8_cx_iface.c
+++ b/vp8/vp8_cx_iface.c
@@ -798,6 +798,9 @@ static vpx_codec_err_t vp8e_encode(vpx_codec_alg_priv_t *ctx,
pkt.data.frame.duration = 0;
}
+ if (cpi->droppable)
+ pkt.data.frame.flags |= VPX_FRAME_IS_DROPPABLE;
+
if (cpi->output_partition)
{
int i;