MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / dca_downmix

Function dca_downmix

libavcodec/dca.c:843–883  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

841 }
842
843static void dca_downmix(float *samples, int srcfmt,
844 int downmix_coef[DCA_PRIM_CHANNELS_MAX][2])
845{
846 int i;
847 float t;
848 float coef[DCA_PRIM_CHANNELS_MAX][2];
849
850 for(i=0; i<DCA_PRIM_CHANNELS_MAX; i++) {
851 coef[i][0] = dca_downmix_coeffs[downmix_coef[i][0]];
852 coef[i][1] = dca_downmix_coeffs[downmix_coef[i][1]];
853 }
854
855 switch (srcfmt) {
856 case DCA_MONO:
857 case DCA_CHANNEL:
858 case DCA_STEREO_TOTAL:
859 case DCA_STEREO_SUMDIFF:
860 case DCA_4F2R:
861 av_log(NULL, 0, "Not implemented!\n");
862 break;
863 case DCA_STEREO:
864 break;
865 case DCA_3F:
866 DOWNMIX_TO_STEREO(MIX_FRONT3(samples, coef),);
867 break;
868 case DCA_2F1R:
869 DOWNMIX_TO_STEREO(MIX_REAR1(samples, i + 512, 2, coef),);
870 break;
871 case DCA_3F1R:
872 DOWNMIX_TO_STEREO(MIX_FRONT3(samples, coef),
873 MIX_REAR1(samples, i + 768, 3, coef));
874 break;
875 case DCA_2F2R:
876 DOWNMIX_TO_STEREO(MIX_REAR2(samples, i + 512, i + 768, 2, coef),);
877 break;
878 case DCA_3F2R:
879 DOWNMIX_TO_STEREO(MIX_FRONT3(samples, coef),
880 MIX_REAR2(samples, i + 768, i + 1024, 3, coef));
881 break;
882 }
883}
884
885
886/* Very compact version of the block code decoder that does not use table

Callers 1

dca_subsubframeFunction · 0.85

Calls 1

av_logFunction · 0.85

Tested by

no test coverage detected