[FFmpeg-cvslog] h264: put visualization and debug support back

Michael Niedermayer git at videolan.org
Tue Feb 19 03:00:52 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Feb 19 02:47:47 2013 +0100| [d41efc1f267c1b71d83c8c6dff72eab0967c4365] | committer: Michael Niedermayer

h264: put visualization and debug support back

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d41efc1f267c1b71d83c8c6dff72eab0967c4365
---

 libavcodec/h264.c |    6 ++++++
 libavcodec/h264.h |    2 ++
 2 files changed, 8 insertions(+)

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index ba16b2f..fe12846 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1003,6 +1003,9 @@ static void free_tables(H264Context *h, int free_rbsp)
     av_freep(&h->mb2b_xy);
     av_freep(&h->mb2br_xy);
 
+    for (i = 0; i < 3; i++)
+        av_freep(&h->visualization_buffer[i]);
+
     if (free_rbsp) {
         for (i = 0; i < h->picture_count && !h->avctx->internal->is_copy; i++)
             free_picture(h, &h->DPB[i]);
@@ -4781,6 +4784,9 @@ not_extra:
 
     assert(pict->data[0] || !*got_frame);
 
+    ff_print_debug_info2(h->avctx, pict, h->er.mbskip_table, h->visualization_buffer, &h->low_delay,
+                         h->mb_width, h->mb_height, h->mb_stride, 1);
+
     return get_consumed_bytes(buf_index, buf_size);
 }
 
diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index cb69361..0c8c7ad 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -644,6 +644,8 @@ typedef struct H264Context {
     int parse_last_mb;
     uint8_t *edge_emu_buffer;
     int16_t *dc_val_base;
+
+    uint8_t *visualization_buffer[3]; ///< temporary buffer vor MV visualization
 } H264Context;
 
 extern const uint8_t ff_h264_chroma_qp[7][QP_MAX_NUM + 1]; ///< One chroma qp table for each possible bit depth (8-14).



More information about the ffmpeg-cvslog mailing list