Take a Picture instead of AVFrame.
It is needed because some fields from AVFrame printed by this function
will be moved to Picture.
---
libavcodec/h261dec.c | 2 +-
libavcodec/h263dec.c | 3 ++-
libavcodec/mpeg12.c | 4 ++--
libavcodec/mpegvideo.c | 6 ++++--
libavcodec/mpegvideo.h | 2 +-
libavcodec/rv10.c | 3 ++-
libavcodec/rv34.c | 4 ++--
libavcodec/vc1dec.c | 3 ++-
8 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c
index 9935897..d977ab4 100644
--- a/libavcodec/h261dec.c
+++ b/libavcodec/h261dec.c
@@ -626,7 +626,7 @@ assert(s->current_picture.f.pict_type ==
s->current_picture_ptr->f.pict_type);
assert(s->current_picture.f.pict_type == s->pict_type);
*pict = s->current_picture_ptr->f;
- ff_print_debug_info(s, pict);
+ ff_print_debug_info(s, s->current_picture_ptr);
*got_frame = 1;
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index e24603b..4591d36 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -723,13 +723,14 @@ intrax8_decoded:
assert(s->current_picture.f.pict_type == s->pict_type);
if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) {
*pict = s->current_picture_ptr->f;
+ ff_print_debug_info(s, s->current_picture_ptr);
} else if (s->last_picture_ptr != NULL) {
*pict = s->last_picture_ptr->f;
+ ff_print_debug_info(s, s->last_picture_ptr);
}
if(s->last_picture_ptr || s->low_delay){
*got_frame = 1;
- ff_print_debug_info(s, pict);
}
#ifdef PRINT_FRAME_TIME
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 4df51a2..bc71c91 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -1921,7 +1921,7 @@ static int slice_end(AVCodecContext *avctx, AVFrame *pict)
if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) {
*pict = s->current_picture_ptr->f;
- ff_print_debug_info(s, pict);
+ ff_print_debug_info(s, s->current_picture_ptr);
} else {
if (avctx->active_thread_type & FF_THREAD_FRAME)
s->picture_number++;
@@ -1929,7 +1929,7 @@ static int slice_end(AVCodecContext *avctx, AVFrame *pict)
/* XXX: use another variable than picture_number */
if (s->last_picture_ptr != NULL) {
*pict = s->last_picture_ptr->f;
- ff_print_debug_info(s, pict);
+ ff_print_debug_info(s, s->last_picture_ptr);
}
}
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 9ddfa0d..5aa45d7 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1803,10 +1803,12 @@ static void draw_arrow(uint8_t *buf, int sx, int sy,
int ex,
/**
* Print debugging info for the given picture.
*/
-void ff_print_debug_info(MpegEncContext *s, AVFrame *pict)
+void ff_print_debug_info(MpegEncContext *s, Picture *p)
{
- if (s->avctx->hwaccel || !pict || !pict->mb_type)
+ AVFrame *pict;
+ if (s->avctx->hwaccel || !p || !pict->mb_type)
return;
+ pict = &p->f;
if (s->avctx->debug & (FF_DEBUG_SKIP | FF_DEBUG_QP | FF_DEBUG_MB_TYPE)) {
int x,y;
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index fff1e13..e5cc201 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -772,7 +772,7 @@ void ff_draw_horiz_band(AVCodecContext *avctx, DSPContext
*dsp, Picture *cur,
int v_edge_pos, int h_edge_pos);
void ff_mpeg_draw_horiz_band(MpegEncContext *s, int y, int h);
void ff_mpeg_flush(AVCodecContext *avctx);
-void ff_print_debug_info(MpegEncContext *s, AVFrame *pict);
+void ff_print_debug_info(MpegEncContext *s, Picture *p);
void ff_write_quant_matrix(PutBitContext *pb, uint16_t *matrix);
void ff_release_unused_pictures(MpegEncContext *s, int remove_current);
int ff_find_unused_picture(MpegEncContext *s, int shared);
diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c
index 9a9da91..5ae4bfb 100644
--- a/libavcodec/rv10.c
+++ b/libavcodec/rv10.c
@@ -702,13 +702,14 @@ static int rv10_decode_frame(AVCodecContext *avctx,
if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) {
*pict = s->current_picture_ptr->f;
+ ff_print_debug_info(s, s->current_picture_ptr);
} else if (s->last_picture_ptr != NULL) {
*pict = s->last_picture_ptr->f;
+ ff_print_debug_info(s, s->last_picture_ptr);
}
if(s->last_picture_ptr || s->low_delay){
*got_frame = 1;
- ff_print_debug_info(s, pict);
}
s->current_picture_ptr= NULL; // so we can detect if frame_end was not
called (find some nicer solution...)
}
diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c
index 34eeb50..3c3e3e2 100644
--- a/libavcodec/rv34.c
+++ b/libavcodec/rv34.c
@@ -1573,13 +1573,13 @@ static int finish_frame(AVCodecContext *avctx, AVFrame
*pict)
if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) {
*pict = s->current_picture_ptr->f;
+ ff_print_debug_info(s, s->current_picture_ptr);
got_picture = 1;
} else if (s->last_picture_ptr != NULL) {
*pict = s->last_picture_ptr->f;
+ ff_print_debug_info(s, s->last_picture_ptr);
got_picture = 1;
}
- if (got_picture)
- ff_print_debug_info(s, pict);
return got_picture;
}
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 4b37db6..a8baffa 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -5655,12 +5655,13 @@ image:
} else {
if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) {
*pict = s->current_picture_ptr->f;
+ ff_print_debug_info(s, s->current_picture_ptr);
} else if (s->last_picture_ptr != NULL) {
*pict = s->last_picture_ptr->f;
+ ff_print_debug_info(s, s->last_picture_ptr);
}
if (s->last_picture_ptr || s->low_delay) {
*got_frame = 1;
- ff_print_debug_info(s, pict);
}
}
--
1.7.10.4
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel