[FFmpeg-devel] avformat/nut: add DSDs support

Submitted by Takayuki 'January June' Suwa on May 2, 2017, 3:33 a.m.

Details

Message ID 1493696014-5481-1-git-send-email-jjsuwa.sys3175@gmail.com
State New
Headers show

Commit Message

Takayuki 'January June' Suwa May 2, 2017, 3:33 a.m.
codec tags for DSDs are similar to PCMs: 'D'<type><interleaving><bits>, where
 'D' means DSD, or pulse-Density-modulation,
 <type> is 'L' for LSB-first, 'M' for MSB-first
 <interleaving> is 'D' for default, 'P' for planar
 <bits> is always binary one :)

---
 libavformat/nut.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Michael Niedermayer May 2, 2017, 1:48 p.m.
On Tue, May 02, 2017 at 12:33:34PM +0900, Takayuki 'January June' Suwa wrote:
> codec tags for DSDs are similar to PCMs: 'D'<type><interleaving><bits>, where
>  'D' means DSD, or pulse-Density-modulation,
>  <type> is 'L' for LSB-first, 'M' for MSB-first
>  <interleaving> is 'D' for default, 'P' for planar
>  <bits> is always binary one :)

please send a patch to nut-devel first that updates
nut4cc.txt

[...]

Patch hide | download patch | download mbox

diff --git a/libavformat/nut.c b/libavformat/nut.c
index 592fe4d..a886cb6 100644
--- a/libavformat/nut.c
+++ b/libavformat/nut.c
@@ -204,6 +204,10 @@  const AVCodecTag ff_nut_audio_extra_tags[] = {
     { AV_CODEC_ID_MP3,              MKTAG('M', 'P', '3', ' ') },
     { AV_CODEC_ID_OPUS,             MKTAG('O', 'p', 'u', 's') },
     { AV_CODEC_ID_WAVPACK,          MKTAG('w', 'v', 'p', 'k') },
+    { AV_CODEC_ID_DSD_LSBF,         MKTAG('D', 'L', 'D', 1  ) },
+    { AV_CODEC_ID_DSD_MSBF,         MKTAG('D', 'M', 'D', 1  ) },
+    { AV_CODEC_ID_DSD_LSBF_PLANAR,  MKTAG('D', 'L', 'P', 1  ) },
+    { AV_CODEC_ID_DSD_MSBF_PLANAR,  MKTAG('D', 'M', 'P', 1  ) },
     { AV_CODEC_ID_NONE,             0                         }
 };