improve codec trace