1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-10 06:10:52 +02:00

avcodec/vvc/dec: print thread debug logs only if DEBUG is defined

Makes the output of a normal decoding process with loglevel debug a lot less
verbose.

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer
2025-01-08 11:43:47 -03:00
parent c0fbb6d5b7
commit d7180a3f92

View File

@@ -601,8 +601,6 @@ static int run_alf(VVCContext *s, VVCLocalContext *lc, VVCTask *t)
return 0; return 0;
} }
#define VVC_THREAD_DEBUG
#ifdef VVC_THREAD_DEBUG
const static char* task_name[] = { const static char* task_name[] = {
"INIT", "INIT",
"P", "P",
@@ -615,7 +613,6 @@ const static char* task_name[] = {
"S", "S",
"A" "A"
}; };
#endif
typedef int (*run_func)(VVCContext *s, VVCLocalContext *lc, VVCTask *t); typedef int (*run_func)(VVCContext *s, VVCLocalContext *lc, VVCTask *t);
@@ -638,9 +635,7 @@ static void task_run_stage(VVCTask *t, VVCContext *s, VVCLocalContext *lc)
run_alf, run_alf,
}; };
#ifdef VVC_THREAD_DEBUG ff_dlog(s->avctx, "frame %5d, %s(%3d, %3d)\r\n", (int)t->fc->decode_order, task_name[stage], t->rx, t->ry);
av_log(s->avctx, AV_LOG_DEBUG, "frame %5d, %s(%3d, %3d)\r\n", (int)t->fc->decode_order, task_name[stage], t->rx, t->ry);
#endif
lc->sc = t->sc; lc->sc = t->sc;
@@ -846,8 +841,6 @@ int ff_vvc_frame_wait(VVCContext *s, VVCFrameContext *fc)
ff_mutex_unlock(&ft->lock); ff_mutex_unlock(&ft->lock);
ff_vvc_report_frame_finished(fc->ref); ff_vvc_report_frame_finished(fc->ref);
#ifdef VVC_THREAD_DEBUG ff_dlog(s->avctx, "frame %5d done\r\n", (int)fc->decode_order);
av_log(s->avctx, AV_LOG_DEBUG, "frame %5d done\r\n", (int)fc->decode_order);
#endif
return ft->ret; return ft->ret;
} }