summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsjambekar <sjambekar@nvidia.com>2021-10-28 12:38:39 +0530
committersjambekar <sjambekar@nvidia.com>2021-10-28 12:38:39 +0530
commitce934e17792f92ddd82ae7e9e1fc62976be8604f (patch)
tree7b8f44ba56f92ccfee42dae7cf86d783ea211cc7
parent98d74e8b47852acb00ba3557eafc9a5801812e04 (diff)
Addition of comma and removing the extra braces
The function dump_picture_info() has extra braces in the profiles HEVC_MAIN_444 and VP9. Because of this, the additoinal braces are added in the trace file generated by the applications like ffmpeg, mplayer and so on. The client of this generated trace file, like the python scripts that read this trace file, run into into the problem of wrongly reading the picture info or incomplete reading of picture info. Also, there was a comma missing in the VP9 profile in the dump_picture_info(). This again creates the problem of generating a trace file without a comma, which again leads to wrongly reading the picture info. To avoid this problem of wrongly reading or incomplete reading of picture info, extra braces have been removed and an additional comma is introduced in the dump_picture_info().
-rw-r--r--trace/vdpau_trace.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/trace/vdpau_trace.cpp b/trace/vdpau_trace.cpp
index c399801..1940aa5 100644
--- a/trace/vdpau_trace.cpp
+++ b/trace/vdpau_trace.cpp
@@ -956,7 +956,7 @@ static void _vdp_cap_dump_picture_info(
(uint32_t)picture_info_hevc->RefPicSetLtCurr[i]
);
}
- fputs("}}", _vdp_cap_data.fp);
+ fputs("}}, ", _vdp_cap_data.fp);
fprintf(
_vdp_cap_data.fp,
"%u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, {",
@@ -980,7 +980,6 @@ static void _vdp_cap_dump_picture_info(
(uint32_t)picture_info_hevc_rxt->log2SaoOffsetScaleLuma,
(uint32_t)picture_info_hevc_rxt->log2SaoOffsetScaleChroma
);
- fputs("}, {", _vdp_cap_data.fp);
for (uint32_t i = 0; i < _VDP_TRACE_ARSIZE(picture_info_hevc_rxt->cb_qp_adjustment); ++i) {
fprintf(
_vdp_cap_data.fp,
@@ -1011,7 +1010,7 @@ static void _vdp_cap_dump_picture_info(
fprintf(
_vdp_cap_data.fp,
- "{%u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u {",
+ "{%u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, {",
(uint32_t)picture_info_vp9->width,
(uint32_t)picture_info_vp9->height,
picture_info_vp9->lastReference,
@@ -1148,7 +1147,7 @@ static void _vdp_cap_dump_picture_info(
fputs("}, ", _vdp_cap_data.fp);
fprintf(
_vdp_cap_data.fp,
- "%u, %u, {",
+ "%u, %u",
(uint32_t)picture_info_vp9->uncompressedHeaderSize,
(uint32_t)picture_info_vp9->compressedHeaderSize
);