summaryrefslogtreecommitdiff
path: root/vp8/decoder
diff options
context:
space:
mode:
Diffstat (limited to 'vp8/decoder')
-rw-r--r--vp8/decoder/decodemv.c2
-rw-r--r--vp8/decoder/decodframe.c25
-rw-r--r--vp8/decoder/onyxd_if.c18
3 files changed, 40 insertions, 5 deletions
diff --git a/vp8/decoder/decodemv.c b/vp8/decoder/decodemv.c
index 68044f4d5..7e3137fd2 100644
--- a/vp8/decoder/decodemv.c
+++ b/vp8/decoder/decodemv.c
@@ -854,4 +854,4 @@ void vp8_decode_mode_mvs(VP8D_COMP *pbi)
#endif
-}
+} \ No newline at end of file
diff --git a/vp8/decoder/decodframe.c b/vp8/decoder/decodframe.c
index 5e8925286..f3da2d0b5 100644
--- a/vp8/decoder/decodframe.c
+++ b/vp8/decoder/decodframe.c
@@ -830,9 +830,16 @@ static void init_frame(VP8D_COMP *pbi)
*/
pc->ref_frame_sign_bias[GOLDEN_FRAME] = 0;
pc->ref_frame_sign_bias[ALTREF_FRAME] = 0;
+
+#if CONFIG_MULCONTEXT
+ vpx_memcpy(&pc->lfc, &pc->fc, sizeof(pc->fc));
+ vpx_memcpy(&pc->lfc_a, &pc->fc, sizeof(pc->fc));
+#endif
+
}
else
{
+
if (!pc->use_bilinear_mc_filter)
pc->mcomp_filter_type = SIXTAP;
else
@@ -1206,6 +1213,13 @@ int vp8_decode_frame(VP8D_COMP *pbi)
pc->refresh_alt_ref_frame = 0;
#endif
+#if CONFIG_MULCONTEXT
+ if(pc->refresh_alt_ref_frame)
+ vpx_memcpy(&pc->fc, &pc->lfc_a, sizeof(pc->fc));
+ else
+ vpx_memcpy(&pc->fc, &pc->lfc, sizeof(pc->fc));
+#endif
+
/* Buffer to buffer copy flags. */
pc->copy_buffer_to_gf = 0;
@@ -1391,12 +1405,21 @@ int vp8_decode_frame(VP8D_COMP *pbi)
{
pc->last_kf_gf_q = pc->base_qindex;
}
-
+#if CONFIG_MULCONTEXT
+ if(pc->refresh_entropy_probs)
+ {
+ if(pc->refresh_alt_ref_frame)
+ vpx_memcpy(&pc->lfc_a, &pc->fc, sizeof(pc->fc));
+ else
+ vpx_memcpy(&pc->lfc, &pc->fc, sizeof(pc->fc));
+ }
+#else
if (pc->refresh_entropy_probs == 0)
{
vpx_memcpy(&pc->fc, &pc->lfc, sizeof(pc->fc));
pbi->independent_partitions = prev_independent_partitions;
}
+#endif
#ifdef PACKET_TESTING
{
diff --git a/vp8/decoder/onyxd_if.c b/vp8/decoder/onyxd_if.c
index a45d692d0..7862cbf90 100644
--- a/vp8/decoder/onyxd_if.c
+++ b/vp8/decoder/onyxd_if.c
@@ -80,6 +80,7 @@ void vp8_recon_write_yuv_frame(char *name, YV12_BUFFER_CONFIG *s)
fclose(yuv_file);
}
#endif
+//#define WRITE_RECON_BUFFER 1
#if WRITE_RECON_BUFFER
void write_dx_frame_to_file(YV12_BUFFER_CONFIG *frame, int this_frame)
{
@@ -93,21 +94,24 @@ void write_dx_frame_to_file(YV12_BUFFER_CONFIG *frame, int this_frame)
yframe = fopen(filename, "wb");
for (i = 0; i < frame->y_height; i++)
- fwrite(frame->y_buffer + i * frame->y_stride, frame->y_width, 1, yframe);
+ fwrite(frame->y_buffer + i * frame->y_stride,
+ frame->y_width, 1, yframe);
fclose(yframe);
sprintf(filename, "dx\\u%04d.raw", this_frame);
yframe = fopen(filename, "wb");
for (i = 0; i < frame->uv_height; i++)
- fwrite(frame->u_buffer + i * frame->uv_stride, frame->uv_width, 1, yframe);
+ fwrite(frame->u_buffer + i * frame->uv_stride,
+ frame->uv_width, 1, yframe);
fclose(yframe);
sprintf(filename, "dx\\v%04d.raw", this_frame);
yframe = fopen(filename, "wb");
for (i = 0; i < frame->uv_height; i++)
- fwrite(frame->v_buffer + i * frame->uv_stride, frame->uv_width, 1, yframe);
+ fwrite(frame->v_buffer + i * frame->uv_stride,
+ frame->uv_width, 1, yframe);
fclose(yframe);
}
@@ -579,9 +583,17 @@ int vp8dx_receive_compressed_data(VP8D_PTR ptr, unsigned long size, const unsign
#if WRITE_RECON_BUFFER
if(cm->show_frame)
+<<<<<<< HEAD
write_dx_frame_to_file(cm->frame_to_show, cm->current_video_frame);
else
write_dx_frame_to_file(cm->frame_to_show, cm->current_video_frame+1000);
+=======
+ write_dx_frame_to_file(cm->frame_to_show,
+ cm->current_video_frame);
+ else
+ write_dx_frame_to_file(cm->frame_to_show,
+ cm->current_video_frame+1000);
+>>>>>>> added separate entropy context for alt_ref
#endif
if(cm->filter_level)