Browse Source

avcodec/dsddec: Inline constant

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
tags/n4.4
Andreas Rheinhardt 4 years ago
parent
commit
ee4c129c11
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavcodec/dsddec.c

+ 2
- 2
libavcodec/dsddec.c View File

@@ -27,11 +27,11 @@
*/ */


#include "libavcodec/internal.h" #include "libavcodec/internal.h"
#include "libavcodec/mathops.h"
#include "avcodec.h" #include "avcodec.h"
#include "dsd.h" #include "dsd.h"


#define DSD_SILENCE 0x69 #define DSD_SILENCE 0x69
#define DSD_SILENCE_REVERSED 0x96
/* 0x69 = 01101001 /* 0x69 = 01101001
* This pattern "on repeat" makes a low energy 352.8 kHz tone * This pattern "on repeat" makes a low energy 352.8 kHz tone
* and a high energy 1.0584 MHz tone which should be filtered * and a high energy 1.0584 MHz tone which should be filtered
@@ -53,7 +53,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
if (!s) if (!s)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);


silence = avctx->codec_id == AV_CODEC_ID_DSD_LSBF || avctx->codec_id == AV_CODEC_ID_DSD_LSBF_PLANAR ? ff_reverse[DSD_SILENCE] : DSD_SILENCE;
silence = avctx->codec_id == AV_CODEC_ID_DSD_LSBF || avctx->codec_id == AV_CODEC_ID_DSD_LSBF_PLANAR ? DSD_SILENCE_REVERSED : DSD_SILENCE;
for (i = 0; i < avctx->channels; i++) { for (i = 0; i < avctx->channels; i++) {
s[i].pos = 0; s[i].pos = 0;
memset(s[i].buf, silence, sizeof(s[i].buf)); memset(s[i].buf, silence, sizeof(s[i].buf));


Loading…
Cancel
Save