From 2f73e19ff1e3ba1881b65761753699b65c8bf195 Mon Sep 17 00:00:00 2001 From: "Alfred E. Heggestad" <114750+alfredh@users.noreply.github.com> Date: Tue, 30 Jul 2024 12:23:17 +0200 Subject: [PATCH] dd: remove debugging --- src/dd/dd.c | 9 --------- src/dd/dd_enc.c | 13 ------------- test/dd.c | 8 -------- 3 files changed, 30 deletions(-) diff --git a/src/dd/dd.c b/src/dd/dd.c index 67a07e0b2..db708c09c 100644 --- a/src/dd/dd.c +++ b/src/dd/dd.c @@ -136,8 +136,6 @@ static int template_dtis(struct dd *dd, struct getbit *gb) static int template_fdiffs(struct dd *dd, struct getbit *gb) { - re_printf("template_fdiffs\n"); - for (uint8_t templateIndex = 0; templateIndex < dd->template_cnt; templateIndex++) { @@ -265,8 +263,6 @@ static int template_dependency_structure(struct dd *dd, struct getbit *gb) static int extended_descriptor_fields(struct dd *dd, struct getbit *gb) { - re_printf("extended_descriptor_fields\n"); - if (getbit_get_left(gb) < 5) return EBADMSG; @@ -328,11 +324,6 @@ int dd_decode(struct dd *dd, const uint8_t *buf, size_t sz) no_extended_descriptor_fields(dd); } -#if 0 - frame_dependency_definition(); - zero_padding = f(sz * 8 - TotalConsumedBits); -#endif - return 0; } diff --git a/src/dd/dd_enc.c b/src/dd/dd_enc.c index 404001689..d56a035bc 100644 --- a/src/dd/dd_enc.c +++ b/src/dd/dd_enc.c @@ -74,8 +74,6 @@ static int template_layers(struct putbit *pb, const struct dd *dd) static int template_dtis(struct putbit *pb, const struct dd *dd) { - re_printf("template_dtis\n"); - for (uint8_t templateIndex = 0; templateIndex < dd->template_cnt; templateIndex++) { @@ -100,8 +98,6 @@ static int template_fdiffs(struct putbit *pb, const struct dd *dd) { int err; - re_printf("template_fdiffs (encode) bit_pos=%zu\n", pb->bit_pos); - for (uint8_t templateIndex = 0; templateIndex < dd->template_cnt; templateIndex++) { @@ -136,8 +132,6 @@ static int template_fdiffs(struct putbit *pb, const struct dd *dd) static int template_chains(struct putbit *pb, const struct dd *dd) { - re_printf("template_chains\n"); - int err = putbit_write_ns(pb, dd->dt_cnt + 1, dd->chain_cnt); if (err) return err; @@ -193,8 +187,6 @@ static int template_dependency_structure(struct putbit *pb, { int err; - re_printf("template_dependency_structure\n"); - uint8_t dt_cnt_minus_one = dd->dt_cnt - 1; err = putbit_write(pb, 6, dd->template_id_offset); @@ -218,9 +210,6 @@ static int template_dependency_structure(struct putbit *pb, if (err) return err; - re_printf("resolutions_present_flag: %d\n", - dd->resolutions_present_flag); - err = putbit_one(pb, dd->resolutions_present_flag); if (err) return err; @@ -239,8 +228,6 @@ static int extended_descriptor_fields(struct putbit *pb, const struct dd *dd) { int err = 0; - re_printf("extended_descriptor_fields\n"); - err |= putbit_one(pb, dd->template_dependency_structure_present_flag); err |= putbit_one(pb, dd->active_decode_targets_present_flag); err |= putbit_one(pb, dd->custom_dtis_flag); diff --git a/test/dd.c b/test/dd.c index 36efd2d96..a2fae38a5 100644 --- a/test/dd.c +++ b/test/dd.c @@ -233,8 +233,6 @@ static int test_dd_decode(void) ASSERT_EQ(1, dd.chain_cnt); - printf("encode.\n"); - err = dd_encode(mb, &dd); TEST_ERR(err); @@ -256,8 +254,6 @@ static int test_dd_chrome(void) uint8_t buf[12]; int err; - printf("chrome\n"); - if (!mb) return ENOMEM; @@ -306,14 +302,10 @@ static int test_dd_chrome(void) ASSERT_EQ(0, dd.chain_cnt); -#if 1 - printf("chrome encode.\n"); - err = dd_encode(mb, &dd); TEST_ERR(err); TEST_MEMCMP(buf, sizeof(buf), mb->buf, mb->end); -#endif out: mem_deref(mb);