Mercurial > libavcodec.hg
comparison faac.c @ 4891:8cd8fd35b6aa libavcodec
add the possibility to choose aac profile
patch by Nicolas George nicolas george chez normalesup org
original thread: [Ffmpeg-devel] [PATCH] FAAC profile selection
date: 04/27/2007 08:11 PM
author | benoit |
---|---|
date | Wed, 02 May 2007 13:49:08 +0000 |
parents | d77c5a6824e4 |
children | 160536e80ee6 |
comparison
equal
deleted
inserted
replaced
4890:7f2863536c79 | 4891:8cd8fd35b6aa |
---|---|
52 faacEncClose(s->faac_handle); | 52 faacEncClose(s->faac_handle); |
53 return -1; | 53 return -1; |
54 } | 54 } |
55 | 55 |
56 /* put the options in the configuration struct */ | 56 /* put the options in the configuration struct */ |
57 faac_cfg->aacObjectType = LOW; | 57 switch(avctx->profile) { |
58 case FF_PROFILE_AAC_MAIN: | |
59 faac_cfg->aacObjectType = MAIN; | |
60 break; | |
61 case FF_PROFILE_UNKNOWN: | |
62 case FF_PROFILE_AAC_LOW: | |
63 faac_cfg->aacObjectType = LOW; | |
64 break; | |
65 case FF_PROFILE_AAC_SSR: | |
66 faac_cfg->aacObjectType = SSR; | |
67 break; | |
68 case FF_PROFILE_AAC_LTP: | |
69 faac_cfg->aacObjectType = LTP; | |
70 break; | |
71 default: | |
72 av_log(avctx, AV_LOG_ERROR, "invalid AAC profile\n"); | |
73 faacEncClose(s->faac_handle); | |
74 return -1; | |
75 } | |
58 faac_cfg->mpegVersion = MPEG4; | 76 faac_cfg->mpegVersion = MPEG4; |
59 faac_cfg->useTns = 0; | 77 faac_cfg->useTns = 0; |
60 faac_cfg->allowMidside = 1; | 78 faac_cfg->allowMidside = 1; |
61 faac_cfg->bitRate = avctx->bit_rate / avctx->channels; | 79 faac_cfg->bitRate = avctx->bit_rate / avctx->channels; |
62 faac_cfg->bandWidth = avctx->cutoff; | 80 faac_cfg->bandWidth = avctx->cutoff; |