Changeset 636
- Timestamp:
- 07/16/07 01:52:41 (3 years ago)
- Location:
- trunk
- Files:
-
- 4 modified
-
FFissionCodec/FFissionCodec.r (modified) (1 diff)
-
FFissionCodec/FFissionDecoder.cpp (modified) (6 diffs)
-
MatroskaCodecIDs.cpp (modified) (2 diffs)
-
ff_MovieImport.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/FFissionCodec/FFissionCodec.r
r628 r636 91 91 #define kComponentInfo "An AudioCodec that decodes True Audio into linear PCM" 92 92 #include "XCAResources.r" 93 94 #define kPrimaryResourceID 144 95 #define kComponentType 'adec' 96 #define kComponentSubtype kAudioFormatDTS 97 #define kComponentName "DTS Coherent Acoustics" 98 #define kComponentInfo "An AudioCodec that decodes DCA Audio into linear PCM" 99 #include "XCAResources.r" -
trunk/FFissionCodec/FFissionDecoder.cpp
r628 r636 47 47 { 0x6d730050, CODEC_ID_MP2 }, 48 48 { kAudioFormatTTA, CODEC_ID_TTA }, 49 { kAudioFormatDTS, CODEC_ID_DTS }, 49 50 { 0, CODEC_ID_NONE } 50 51 }; … … 358 359 AudioStreamPacketDescription* outPacketDescription) 359 360 { 360 UInt32 ans = kAudioCodecProduceOutputPacketSuccess;361 UInt32 ans; 361 362 362 363 if (!avCodec) … … 367 368 368 369 UInt32 written = 0; 369 ioNumberPackets = 0;370 370 Byte *outData = (Byte *) outOutputData; 371 371 … … 395 395 outBufUsed = 0; 396 396 ioOutputDataByteSize = written; 397 ioNumberPackets = ioOutputDataByteSize / (2 * mOutputFormat.NumberChannels()); 397 398 return kAudioCodecProduceOutputPacketFailure; 398 399 } … … 404 405 outBufUsed -= amountToCopy; 405 406 written += amountToCopy; 406 ioNumberPackets++;407 407 408 408 // and save what's left over … … 413 413 if (written < ioOutputDataByteSize) 414 414 ans = kAudioCodecProduceOutputPacketNeedsMoreInputData; 415 else if ( outBufUsed > written ||inputBuffer.GetNumPackets() > 0)416 // we have more left than what we wrote, or an entire other packet415 else if (inputBuffer.GetNumPackets() > 0) 416 // we have an entire packet left to decode 417 417 ans = kAudioCodecProduceOutputPacketSuccessHasMore; 418 else 419 ans = kAudioCodecProduceOutputPacketSuccess; 418 420 419 421 ioOutputDataByteSize = written; 422 ioNumberPackets = ioOutputDataByteSize / (2 * mOutputFormat.NumberChannels()); 420 423 421 424 return ans; -
trunk/MatroskaCodecIDs.cpp
r635 r636 628 628 static const AudioChannelLayout vorbisChannelLayouts[6] = { 629 629 { kAudioChannelLayoutTag_UseChannelBitmap, kAudioChannelBit_Left | kAudioChannelBit_Right | kAudioChannelBit_CenterSurround }, 630 { kAudioChannelLayoutTag_Quadraphonic }, 631 { kAudioChannelLayoutTag_MPEG_5_0_C }, 632 { kAudioChannelLayoutTag_MPEG_5_1_C } 630 { kAudioChannelLayoutTag_Quadraphonic }, // L R Ls Rs 631 { kAudioChannelLayoutTag_MPEG_5_0_C }, // L C R Ls Rs 632 { kAudioChannelLayoutTag_MPEG_5_1_C }, // L C R Ls Rs LFE 633 633 }; 634 634 635 635 // these should be the default for the number of channels; esds can specify other mappings 636 636 static const AudioChannelLayout aacChannelLayouts[6] = { 637 { kAudioChannelLayoutTag_MPEG_3_0_B }, // C L R according to wiki.multimedia.cx638 { kAudioChannelLayoutTag_AAC_4_0 }, 639 { kAudioChannelLayoutTag_AAC_5_0 }, 640 { kAudioChannelLayoutTag_AAC_5_1 }, 641 { kAudioChannelLayoutTag_AAC_6_1 }, 642 { kAudioChannelLayoutTag_AAC_7_1 } 637 { kAudioChannelLayoutTag_MPEG_3_0_B }, // C L R according to wiki.multimedia.cx 638 { kAudioChannelLayoutTag_AAC_4_0 }, // C L R Cs 639 { kAudioChannelLayoutTag_AAC_5_0 }, // C L R Ls Rs 640 { kAudioChannelLayoutTag_AAC_5_1 }, // C L R Ls Rs Lfe 641 { kAudioChannelLayoutTag_AAC_6_1 }, // C L R Ls Rs Cs Lfe 642 { kAudioChannelLayoutTag_AAC_7_1 }, // C Lc Rc L R Ls Rs Lfe 643 643 }; 644 644 645 645 static const AudioChannelLayout ac3ChannelLayouts[6] = { 646 { kAudioChannelLayoutTag_ITU_3_0 }, 647 { kAudioChannelLayoutTag_ITU_3_1 }, 648 { kAudioChannelLayoutTag_ITU_3_2 }, 649 { kAudioChannelLayoutTag_ITU_3_2_1 } 646 { kAudioChannelLayoutTag_ITU_3_0 }, // L R C 647 { kAudioChannelLayoutTag_ITU_3_1 }, // L R C Cs 648 { kAudioChannelLayoutTag_ITU_3_2 }, // L R C Ls Rs 649 { kAudioChannelLayoutTag_ITU_3_2_1 }, // L R C LFE Ls Rs 650 650 }; 651 651 652 652 static const AudioChannelLayout flacChannelLayouts[6] = { 653 { kAudioChannelLayoutTag_ITU_3_0 }, 654 { kAudioChannelLayoutTag_Quadraphonic }, 655 { kAudioChannelLayoutTag_ITU_3_2 }, 656 { kAudioChannelLayoutTag_ITU_3_2_1 }, 657 { kAudioChannelLayoutTag_MPEG_6_1_A }, 658 { kAudioChannelLayoutTag_MPEG_7_1_C } 653 { kAudioChannelLayoutTag_ITU_3_0 }, // L R C 654 { kAudioChannelLayoutTag_Quadraphonic }, // L R Ls Rs 655 { kAudioChannelLayoutTag_ITU_3_2 }, // L R C Ls Rs 656 { kAudioChannelLayoutTag_ITU_3_2_1 }, // L R C LFE Ls Rs 657 { kAudioChannelLayoutTag_MPEG_6_1_A }, // L R C LFE Ls Rs Cs 658 { kAudioChannelLayoutTag_MPEG_7_1_C }, // L R C LFE Ls Rs Rls Rrs 659 }; 660 661 // 5.1 is tested, the others are just guesses 662 static const AudioChannelLayout dtsChannelLayouts[6] = { 663 { kAudioChannelLayoutTag_MPEG_3_0_B }, // C L R 664 { kAudioChannelLayoutTag_MPEG_4_0_B }, // C L R Cs 665 { kAudioChannelLayoutTag_MPEG_5_0_D }, // C L R Ls Rs 666 { kAudioChannelLayoutTag_MPEG_5_1_D }, // C L R Ls Rs Lfe 659 667 }; 660 668 … … 681 689 case kAudioFormatAC3: 682 690 acl = ac3ChannelLayouts[channelIndex]; 691 break; 692 693 case kAudioFormatDTS: 694 acl = dtsChannelLayouts[channelIndex]; 683 695 break; 684 696 } -
trunk/ff_MovieImport.c
r623 r636 91 91 register_avcodec(&mp2_decoder); 92 92 register_avcodec(&tta_decoder); 93 register_avcodec(&dca_decoder); 93 94 94 95 av_log_set_callback(FFMpegCodecprintf);
