Mixtion of Debug exe and release exe for encoder and decoder

162 views Asked by At

This is about HEVC encoder and decoder I have

** encoder and decoder in debug mode

** encoder and decoder in release mode

I know release mode optimize something.

  1. Can we use debug encoder and release decoder?(I have not verified this)

  2. How about release encoder and debug decoder? (I try this, it is OK)

I guess both should be OK, but I still want to know why yes or why not in the theoretical level.

2

There are 2 answers

1
Fredrik Pihl On

Not entirely sure what you asking but if you e.g. look at the linux makefile, you'll see this:

debug:
    $(MAKE) -C lib/TLibVideoIO  debug MM32=$(M32)
    $(MAKE) -C lib/TLibCommon   debug MM32=$(M32)
    $(MAKE) -C lib/TLibDecoder  debug MM32=$(M32)
    $(MAKE) -C lib/TLibEncoder  debug MM32=$(M32)
    $(MAKE) -C lib/TAppCommon       debug MM32=$(M32)
    $(MAKE) -C app/TAppDecoder      debug MM32=$(M32)
    $(MAKE) -C app/TAppEncoder      debug MM32=$(M32)
    $(MAKE) -C utils/annexBbytecount       debug MM32=$(M32)
    $(MAKE) -C utils/convert_NtoMbit_YCbCr debug MM32=$(M32)

release:
    $(MAKE) -C lib/TLibVideoIO  release MM32=$(M32)
    $(MAKE) -C lib/TLibCommon   release MM32=$(M32)
    $(MAKE) -C lib/TLibDecoder  release MM32=$(M32)
    $(MAKE) -C lib/TLibEncoder  release MM32=$(M32)
    $(MAKE) -C lib/TAppCommon       release MM32=$(M32)
    $(MAKE) -C app/TAppDecoder      release MM32=$(M32)
    $(MAKE) -C app/TAppEncoder      release MM32=$(M32)
    $(MAKE) -C utils/annexBbytecount       release MM32=$(M32)
    $(MAKE) -C utils/convert_NtoMbit_YCbCr release MM32=$(M32)

And if you follow the makefiles, you eventually end up in makefile.base which contains the following part:

#
# debug cpp flags
DEBUG_CPPFLAGS    = -g  -D_DEBUG
#
# release cpp
RELEASE_CPPFLAGS  =  -O3 -ffloat-store -Wuninitialized

so there you have the differences between debug- and release-mode. The generated and reconstructed bitstreams will be identical regardless of you use the debug-binary or the release-binary.

You are perfectly fine mixing debug and release binaries.

Hope it helps...

0
karsten On

The HEVC bitstream generated by debug and release builds of the encoder should be identical. Also the behavior of the decoder should be the same in both build variants. There are no formal test in the development process, but I have never experienced any problems with that in HM.

If you find a case where this is not true, that would be considered to be a bug and should be reported in the bug tracker.