Commit cf127474 authored by Fritz Koenig's avatar Fritz Koenig

vpxdec : Change --pp-debug-info to be a bit field.

This allows multiple post processor debug levels to be overlayed.
i.e. can show colored reference blocks and visual motion vectors.

Change-Id: Ic4a1df438445b9f5780fe73adb3126e803472e53
parent 36ff6a67
...@@ -618,7 +618,8 @@ int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, int deblock_l ...@@ -618,7 +618,8 @@ int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, int deblock_l
oci->mb_cols, oci->mb_rows); oci->mb_cols, oci->mb_rows);
vp8_blit_text(message, oci->post_proc_buffer.y_buffer, oci->post_proc_buffer.y_stride); vp8_blit_text(message, oci->post_proc_buffer.y_buffer, oci->post_proc_buffer.y_stride);
} }
else if (flags & VP8D_DEBUG_LEVEL2)
if (flags & VP8D_DEBUG_LEVEL2)
{ {
int i, j; int i, j;
unsigned char *y_ptr; unsigned char *y_ptr;
...@@ -649,7 +650,8 @@ int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, int deblock_l ...@@ -649,7 +650,8 @@ int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, int deblock_l
} }
} }
else if (flags & VP8D_DEBUG_LEVEL3)
if (flags & VP8D_DEBUG_LEVEL3)
{ {
int i, j; int i, j;
unsigned char *y_ptr; unsigned char *y_ptr;
...@@ -683,7 +685,8 @@ int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, int deblock_l ...@@ -683,7 +685,8 @@ int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, int deblock_l
} }
} }
else if (flags & VP8D_DEBUG_LEVEL4)
if (flags & VP8D_DEBUG_LEVEL4)
{ {
sprintf(message, "Bitrate: %10.2f frame_rate: %10.2f ", oci->bitrate, oci->framerate); sprintf(message, "Bitrate: %10.2f frame_rate: %10.2f ", oci->bitrate, oci->framerate);
vp8_blit_text(message, oci->post_proc_buffer.y_buffer, oci->post_proc_buffer.y_stride); vp8_blit_text(message, oci->post_proc_buffer.y_buffer, oci->post_proc_buffer.y_stride);
...@@ -719,7 +722,9 @@ int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, int deblock_l ...@@ -719,7 +722,9 @@ int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, int deblock_l
#endif #endif
} }
else if (flags & VP8D_DEBUG_LEVEL5)
// Draw motion vectors
if (flags & VP8D_DEBUG_LEVEL5)
{ {
YV12_BUFFER_CONFIG *post = &oci->post_proc_buffer; YV12_BUFFER_CONFIG *post = &oci->post_proc_buffer;
int width = post->y_width; int width = post->y_width;
...@@ -752,7 +757,7 @@ int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, int deblock_l ...@@ -752,7 +757,7 @@ int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, int deblock_l
} }
// Color in block modes // Color in block modes
else if (flags & VP8D_DEBUG_LEVEL6) if (flags & VP8D_DEBUG_LEVEL6)
{ {
int i, j; int i, j;
YV12_BUFFER_CONFIG *post = &oci->post_proc_buffer; YV12_BUFFER_CONFIG *post = &oci->post_proc_buffer;
...@@ -787,7 +792,7 @@ int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, int deblock_l ...@@ -787,7 +792,7 @@ int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, int deblock_l
} }
// Color in frame reference blocks // Color in frame reference blocks
else if (flags & VP8D_DEBUG_LEVEL7) if (flags & VP8D_DEBUG_LEVEL7)
{ {
int i, j; int i, j;
YV12_BUFFER_CONFIG *post = &oci->post_proc_buffer; YV12_BUFFER_CONFIG *post = &oci->post_proc_buffer;
......
...@@ -783,7 +783,7 @@ int main(int argc, const char **argv_) ...@@ -783,7 +783,7 @@ int main(int argc, const char **argv_)
vp8_pp_cfg.post_proc_flag &= ~0x7; vp8_pp_cfg.post_proc_flag &= ~0x7;
if (level) if (level)
vp8_pp_cfg.post_proc_flag |= 8 << (level - 1); vp8_pp_cfg.post_proc_flag |= level;
} }
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment