Mercurial > libavcodec.hg
comparison utils.c @ 7406:7b2819083061 libavcodec
Add a new -debug option for tracing calls to the default get/release_buffer functions.
author | astrange |
---|---|
date | Sat, 26 Jul 2008 01:57:10 +0000 |
parents | cb07584c262b |
children | 21770337ff2d |
comparison
equal
deleted
inserted
replaced
7405:dfe1d1d104eb | 7406:7b2819083061 |
---|---|
278 pic->data[i]= buf->data[i]; | 278 pic->data[i]= buf->data[i]; |
279 pic->linesize[i]= buf->linesize[i]; | 279 pic->linesize[i]= buf->linesize[i]; |
280 } | 280 } |
281 s->internal_buffer_count++; | 281 s->internal_buffer_count++; |
282 | 282 |
283 if(s->debug&FF_DEBUG_BUFFERS) | |
284 av_log(s, AV_LOG_DEBUG, "default_get_buffer called on pic %p, %d buffers used\n", pic, s->internal_buffer_count); | |
285 | |
283 return 0; | 286 return 0; |
284 } | 287 } |
285 | 288 |
286 void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic){ | 289 void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic){ |
287 int i; | 290 int i; |
305 for(i=0; i<4; i++){ | 308 for(i=0; i<4; i++){ |
306 pic->data[i]=NULL; | 309 pic->data[i]=NULL; |
307 // pic->base[i]=NULL; | 310 // pic->base[i]=NULL; |
308 } | 311 } |
309 //printf("R%X\n", pic->opaque); | 312 //printf("R%X\n", pic->opaque); |
313 | |
314 if(s->debug&FF_DEBUG_BUFFERS) | |
315 av_log(s, AV_LOG_DEBUG, "default_release_buffer called on pic %p, %d buffers used\n", pic, s->internal_buffer_count); | |
310 } | 316 } |
311 | 317 |
312 int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic){ | 318 int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic){ |
313 AVFrame temp_pic; | 319 AVFrame temp_pic; |
314 int i; | 320 int i; |
575 {"er", "error resilience", 0, FF_OPT_TYPE_CONST, FF_DEBUG_ER, INT_MIN, INT_MAX, V|D, "debug"}, | 581 {"er", "error resilience", 0, FF_OPT_TYPE_CONST, FF_DEBUG_ER, INT_MIN, INT_MAX, V|D, "debug"}, |
576 {"mmco", "memory management control operations (H.264)", 0, FF_OPT_TYPE_CONST, FF_DEBUG_MMCO, INT_MIN, INT_MAX, V|D, "debug"}, | 582 {"mmco", "memory management control operations (H.264)", 0, FF_OPT_TYPE_CONST, FF_DEBUG_MMCO, INT_MIN, INT_MAX, V|D, "debug"}, |
577 {"bugs", NULL, 0, FF_OPT_TYPE_CONST, FF_DEBUG_BUGS, INT_MIN, INT_MAX, V|D, "debug"}, | 583 {"bugs", NULL, 0, FF_OPT_TYPE_CONST, FF_DEBUG_BUGS, INT_MIN, INT_MAX, V|D, "debug"}, |
578 {"vis_qp", "visualize quantization parameter (QP), lower QP are tinted greener", 0, FF_OPT_TYPE_CONST, FF_DEBUG_VIS_QP, INT_MIN, INT_MAX, V|D, "debug"}, | 584 {"vis_qp", "visualize quantization parameter (QP), lower QP are tinted greener", 0, FF_OPT_TYPE_CONST, FF_DEBUG_VIS_QP, INT_MIN, INT_MAX, V|D, "debug"}, |
579 {"vis_mb_type", "visualize block types", 0, FF_OPT_TYPE_CONST, FF_DEBUG_VIS_MB_TYPE, INT_MIN, INT_MAX, V|D, "debug"}, | 585 {"vis_mb_type", "visualize block types", 0, FF_OPT_TYPE_CONST, FF_DEBUG_VIS_MB_TYPE, INT_MIN, INT_MAX, V|D, "debug"}, |
586 {"buffers", "picture buffer allocations", 0, FF_OPT_TYPE_CONST, FF_DEBUG_BUFFERS, INT_MIN, INT_MAX, V|D, "debug"}, | |
580 {"vismv", "visualize motion vectors (MVs)", OFFSET(debug_mv), FF_OPT_TYPE_INT, DEFAULT, 0, INT_MAX, V|D, "debug_mv"}, | 587 {"vismv", "visualize motion vectors (MVs)", OFFSET(debug_mv), FF_OPT_TYPE_INT, DEFAULT, 0, INT_MAX, V|D, "debug_mv"}, |
581 {"pf", "forward predicted MVs of P-frames", 0, FF_OPT_TYPE_CONST, FF_DEBUG_VIS_MV_P_FOR, INT_MIN, INT_MAX, V|D, "debug_mv"}, | 588 {"pf", "forward predicted MVs of P-frames", 0, FF_OPT_TYPE_CONST, FF_DEBUG_VIS_MV_P_FOR, INT_MIN, INT_MAX, V|D, "debug_mv"}, |
582 {"bf", "forward predicted MVs of B-frames", 0, FF_OPT_TYPE_CONST, FF_DEBUG_VIS_MV_B_FOR, INT_MIN, INT_MAX, V|D, "debug_mv"}, | 589 {"bf", "forward predicted MVs of B-frames", 0, FF_OPT_TYPE_CONST, FF_DEBUG_VIS_MV_B_FOR, INT_MIN, INT_MAX, V|D, "debug_mv"}, |
583 {"bb", "backward predicted MVs of B-frames", 0, FF_OPT_TYPE_CONST, FF_DEBUG_VIS_MV_B_BACK, INT_MIN, INT_MAX, V|D, "debug_mv"}, | 590 {"bb", "backward predicted MVs of B-frames", 0, FF_OPT_TYPE_CONST, FF_DEBUG_VIS_MV_B_BACK, INT_MIN, INT_MAX, V|D, "debug_mv"}, |
584 {"mb_qmin", "obsolete, use qmin", OFFSET(mb_qmin), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|E}, | 591 {"mb_qmin", "obsolete, use qmin", OFFSET(mb_qmin), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|E}, |