|
|
@ -1057,33 +1057,12 @@ static int mov_read_stco(MOVContext *c, AVIOContext *pb, MOVAtom atom) |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
enum AVCodecID ff_mov_get_lpcm_codec_id(int bps, int flags) |
|
|
|
enum AVCodecID ff_mov_get_lpcm_codec_id(int bps, int flags) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (flags & 1) { // floating point
|
|
|
|
/* lpcm flags:
|
|
|
|
if (flags & 2) { // big endian
|
|
|
|
* 0x1 = float |
|
|
|
if (bps == 32) return AV_CODEC_ID_PCM_F32BE; |
|
|
|
* 0x2 = big-endian |
|
|
|
else if (bps == 64) return AV_CODEC_ID_PCM_F64BE; |
|
|
|
* 0x4 = signed |
|
|
|
} else { |
|
|
|
*/ |
|
|
|
if (bps == 32) return AV_CODEC_ID_PCM_F32LE; |
|
|
|
return ff_get_pcm_codec_id(bps, flags & 1, flags & 2, flags & 4 ? -1 : 0); |
|
|
|
else if (bps == 64) return AV_CODEC_ID_PCM_F64LE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
if (flags & 2) { |
|
|
|
|
|
|
|
if (bps == 8) |
|
|
|
|
|
|
|
// signed integer
|
|
|
|
|
|
|
|
if (flags & 4) return AV_CODEC_ID_PCM_S8; |
|
|
|
|
|
|
|
else return AV_CODEC_ID_PCM_U8; |
|
|
|
|
|
|
|
else if (bps == 16) return AV_CODEC_ID_PCM_S16BE; |
|
|
|
|
|
|
|
else if (bps == 24) return AV_CODEC_ID_PCM_S24BE; |
|
|
|
|
|
|
|
else if (bps == 32) return AV_CODEC_ID_PCM_S32BE; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
if (bps == 8) |
|
|
|
|
|
|
|
if (flags & 4) return AV_CODEC_ID_PCM_S8; |
|
|
|
|
|
|
|
else return AV_CODEC_ID_PCM_U8; |
|
|
|
|
|
|
|
else if (bps == 16) return AV_CODEC_ID_PCM_S16LE; |
|
|
|
|
|
|
|
else if (bps == 24) return AV_CODEC_ID_PCM_S24LE; |
|
|
|
|
|
|
|
else if (bps == 32) return AV_CODEC_ID_PCM_S32LE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return AV_CODEC_ID_NONE; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries) |
|
|
|
int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries) |
|
|
|