Mitochondrial dehydrogenase involved in pathways of fatty acid, branched-chain amino acid and steroid metabolism.Acts as (S)-3-hydroxyacyl-CoA dehydrogenase in mitochondrial fatty acid beta-oxidation, a major degradation pathway of fatty acids. Catalyzes the third step in the beta-oxidation cycle, namely the reversible conversion of (S)-3-hydroxyacyl-CoA to 3-ketoacyl-CoA. Preferentially accepts straight medium- and short-chain acyl-CoA substrates with highest efficiency for (3S)-hydroxybutanoyl-CoA.