| OLD | NEW |
| 1 /* | 1 /* |
| 2 * copyright (c) 2002 Mark Hills <mark@pogo.org.uk> | 2 * copyright (c) 2002 Mark Hills <mark@pogo.org.uk> |
| 3 * | 3 * |
| 4 * This file is part of FFmpeg. | 4 * This file is part of FFmpeg. |
| 5 * | 5 * |
| 6 * FFmpeg is free software; you can redistribute it and/or | 6 * FFmpeg is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Lesser General Public | 7 * modify it under the terms of the GNU Lesser General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2.1 of the License, or (at your option) any later version. | 9 * version 2.1 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 vorbis_comment vc ; | 51 vorbis_comment vc ; |
| 52 ogg_packet op; | 52 ogg_packet op; |
| 53 | 53 |
| 54 double iblock; | 54 double iblock; |
| 55 } OggVorbisContext ; | 55 } OggVorbisContext ; |
| 56 | 56 |
| 57 static const AVOption options[]={ | 57 static const AVOption options[]={ |
| 58 {"iblock", "Sets the impulse block bias", offsetof(OggVorbisContext, iblock), FF
_OPT_TYPE_DOUBLE, 0, -15, 0, AV_OPT_FLAG_ENCODING_PARAM}, | 58 {"iblock", "Sets the impulse block bias", offsetof(OggVorbisContext, iblock), FF
_OPT_TYPE_DOUBLE, 0, -15, 0, AV_OPT_FLAG_ENCODING_PARAM}, |
| 59 {NULL} | 59 {NULL} |
| 60 }; | 60 }; |
| 61 static const AVClass class = { "libvorbis", NULL, options, LIBAVUTIL_VERSION_INT
}; | 61 static const AVClass class = { "libvorbis", av_default_item_name, options, LIBAV
UTIL_VERSION_INT }; |
| 62 | 62 |
| 63 static av_cold int oggvorbis_init_encoder(vorbis_info *vi, AVCodecContext *avcco
ntext) { | 63 static av_cold int oggvorbis_init_encoder(vorbis_info *vi, AVCodecContext *avcco
ntext) { |
| 64 OggVorbisContext *context = avccontext->priv_data ; | 64 OggVorbisContext *context = avccontext->priv_data ; |
| 65 double cfreq; | 65 double cfreq; |
| 66 | 66 |
| 67 if(avccontext->flags & CODEC_FLAG_QSCALE) { | 67 if(avccontext->flags & CODEC_FLAG_QSCALE) { |
| 68 /* variable bitrate */ | 68 /* variable bitrate */ |
| 69 if(vorbis_encode_setup_vbr(vi, avccontext->channels, | 69 if(vorbis_encode_setup_vbr(vi, avccontext->channels, |
| 70 avccontext->sample_rate, | 70 avccontext->sample_rate, |
| 71 avccontext->global_quality / (float)FF_QP2LAMBDA / 10.0)) | 71 avccontext->global_quality / (float)FF_QP2LAMBDA / 10.0)) |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 CODEC_ID_VORBIS, | 249 CODEC_ID_VORBIS, |
| 250 sizeof(OggVorbisContext), | 250 sizeof(OggVorbisContext), |
| 251 oggvorbis_encode_init, | 251 oggvorbis_encode_init, |
| 252 oggvorbis_encode_frame, | 252 oggvorbis_encode_frame, |
| 253 oggvorbis_encode_close, | 253 oggvorbis_encode_close, |
| 254 .capabilities= CODEC_CAP_DELAY, | 254 .capabilities= CODEC_CAP_DELAY, |
| 255 .sample_fmts = (const enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE}, | 255 .sample_fmts = (const enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE}, |
| 256 .long_name= NULL_IF_CONFIG_SMALL("libvorbis Vorbis"), | 256 .long_name= NULL_IF_CONFIG_SMALL("libvorbis Vorbis"), |
| 257 .priv_class= &class, | 257 .priv_class= &class, |
| 258 } ; | 258 } ; |
| OLD | NEW |