mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2025-02-19 04:18:07 +00:00
Replace generic CONFIG_ENCODERS preprocessor conditionals by more specific
CONFIG_FOO_ENCODER conditionals where appropriate. Originally committed as revision 15174 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
bb6c34e55b
commit
f544a5fc84
@ -465,7 +465,7 @@ for(i=0; i<s->avctx->extradata_size; i++){
|
|||||||
return (get_bits_count(&a->gb)+31)/32*4;
|
return (get_bits_count(&a->gb)+31)/32*4;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#if defined(CONFIG_ASV1_ENCODER) || defined(CONFIG_ASV2_ENCODER)
|
||||||
static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
|
static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
|
||||||
ASV1Context * const a = avctx->priv_data;
|
ASV1Context * const a = avctx->priv_data;
|
||||||
AVFrame *pict = data;
|
AVFrame *pict = data;
|
||||||
@ -519,7 +519,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
|
|||||||
|
|
||||||
return size*4;
|
return size*4;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_ENCODERS */
|
#endif /* defined(CONFIG_ASV1_ENCODER) || defined(CONFIG_ASV2_ENCODER) */
|
||||||
|
|
||||||
static av_cold void common_init(AVCodecContext *avctx){
|
static av_cold void common_init(AVCodecContext *avctx){
|
||||||
ASV1Context * const a = avctx->priv_data;
|
ASV1Context * const a = avctx->priv_data;
|
||||||
@ -569,7 +569,7 @@ static av_cold int decode_init(AVCodecContext *avctx){
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#if defined(CONFIG_ASV1_ENCODER) || defined(CONFIG_ASV2_ENCODER)
|
||||||
static av_cold int encode_init(AVCodecContext *avctx){
|
static av_cold int encode_init(AVCodecContext *avctx){
|
||||||
ASV1Context * const a = avctx->priv_data;
|
ASV1Context * const a = avctx->priv_data;
|
||||||
int i;
|
int i;
|
||||||
@ -593,7 +593,7 @@ static av_cold int encode_init(AVCodecContext *avctx){
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* defined(CONFIG_ASV1_ENCODER) || defined(CONFIG_ASV2_ENCODER) */
|
||||||
|
|
||||||
static av_cold int decode_end(AVCodecContext *avctx){
|
static av_cold int decode_end(AVCodecContext *avctx){
|
||||||
ASV1Context * const a = avctx->priv_data;
|
ASV1Context * const a = avctx->priv_data;
|
||||||
@ -631,8 +631,7 @@ AVCodec asv2_decoder = {
|
|||||||
.long_name= NULL_IF_CONFIG_SMALL("ASUS V2"),
|
.long_name= NULL_IF_CONFIG_SMALL("ASUS V2"),
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_ASV1_ENCODER
|
||||||
|
|
||||||
AVCodec asv1_encoder = {
|
AVCodec asv1_encoder = {
|
||||||
"asv1",
|
"asv1",
|
||||||
CODEC_TYPE_VIDEO,
|
CODEC_TYPE_VIDEO,
|
||||||
@ -644,7 +643,9 @@ AVCodec asv1_encoder = {
|
|||||||
.pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE},
|
.pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE},
|
||||||
.long_name= NULL_IF_CONFIG_SMALL("ASUS V1"),
|
.long_name= NULL_IF_CONFIG_SMALL("ASUS V1"),
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_ASV2_ENCODER
|
||||||
AVCodec asv2_encoder = {
|
AVCodec asv2_encoder = {
|
||||||
"asv2",
|
"asv2",
|
||||||
CODEC_TYPE_VIDEO,
|
CODEC_TYPE_VIDEO,
|
||||||
@ -656,5 +657,4 @@ AVCodec asv2_encoder = {
|
|||||||
.pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE},
|
.pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE},
|
||||||
.long_name= NULL_IF_CONFIG_SMALL("ASUS V2"),
|
.long_name= NULL_IF_CONFIG_SMALL("ASUS V2"),
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
#endif //CONFIG_ENCODERS
|
|
||||||
|
@ -143,8 +143,7 @@ AVCodec cljr_decoder = {
|
|||||||
.long_name = NULL_IF_CONFIG_SMALL("Cirrus Logic AccuPak"),
|
.long_name = NULL_IF_CONFIG_SMALL("Cirrus Logic AccuPak"),
|
||||||
};
|
};
|
||||||
#if 0
|
#if 0
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_CLJR_ENCODER
|
||||||
|
|
||||||
AVCodec cljr_encoder = {
|
AVCodec cljr_encoder = {
|
||||||
"cljr",
|
"cljr",
|
||||||
CODEC_TYPE_VIDEO,
|
CODEC_TYPE_VIDEO,
|
||||||
@ -155,6 +154,5 @@ AVCodec cljr_encoder = {
|
|||||||
//encode_end,
|
//encode_end,
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Cirrus Logic AccuPak"),
|
.long_name = NULL_IF_CONFIG_SMALL("Cirrus Logic AccuPak"),
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
#endif //CONFIG_ENCODERS
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -350,7 +350,7 @@ static inline int get_vlc_symbol(GetBitContext *gb, VlcState * const state, int
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_FFV1_ENCODER
|
||||||
static inline int encode_line(FFV1Context *s, int w, int_fast16_t *sample[2], int plane_index, int bits){
|
static inline int encode_line(FFV1Context *s, int w, int_fast16_t *sample[2], int plane_index, int bits){
|
||||||
PlaneContext * const p= &s->plane[plane_index];
|
PlaneContext * const p= &s->plane[plane_index];
|
||||||
RangeCoder * const c= &s->c;
|
RangeCoder * const c= &s->c;
|
||||||
@ -524,7 +524,7 @@ static void write_header(FFV1Context *f){
|
|||||||
for(i=0; i<5; i++)
|
for(i=0; i<5; i++)
|
||||||
write_quant_table(c, f->quant_table[i]);
|
write_quant_table(c, f->quant_table[i]);
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_ENCODERS */
|
#endif /* CONFIG_FFV1_ENCODER */
|
||||||
|
|
||||||
static av_cold int common_init(AVCodecContext *avctx){
|
static av_cold int common_init(AVCodecContext *avctx){
|
||||||
FFV1Context *s = avctx->priv_data;
|
FFV1Context *s = avctx->priv_data;
|
||||||
@ -543,7 +543,7 @@ static av_cold int common_init(AVCodecContext *avctx){
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_FFV1_ENCODER
|
||||||
static av_cold int encode_init(AVCodecContext *avctx)
|
static av_cold int encode_init(AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
FFV1Context *s = avctx->priv_data;
|
FFV1Context *s = avctx->priv_data;
|
||||||
@ -607,7 +607,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_ENCODERS */
|
#endif /* CONFIG_FFV1_ENCODER */
|
||||||
|
|
||||||
|
|
||||||
static void clear_state(FFV1Context *f){
|
static void clear_state(FFV1Context *f){
|
||||||
@ -632,7 +632,7 @@ static void clear_state(FFV1Context *f){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_FFV1_ENCODER
|
||||||
static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
|
static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
|
||||||
FFV1Context *f = avctx->priv_data;
|
FFV1Context *f = avctx->priv_data;
|
||||||
RangeCoder * const c= &f->c;
|
RangeCoder * const c= &f->c;
|
||||||
@ -688,7 +688,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
|
|||||||
return used_count + (put_bits_count(&f->pb)+7)/8;
|
return used_count + (put_bits_count(&f->pb)+7)/8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_ENCODERS */
|
#endif /* CONFIG_FFV1_ENCODER */
|
||||||
|
|
||||||
static av_cold int common_end(AVCodecContext *avctx){
|
static av_cold int common_end(AVCodecContext *avctx){
|
||||||
FFV1Context *s = avctx->priv_data;
|
FFV1Context *s = avctx->priv_data;
|
||||||
@ -1025,7 +1025,7 @@ AVCodec ffv1_decoder = {
|
|||||||
.long_name= NULL_IF_CONFIG_SMALL("FFmpeg codec #1"),
|
.long_name= NULL_IF_CONFIG_SMALL("FFmpeg codec #1"),
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_FFV1_ENCODER
|
||||||
AVCodec ffv1_encoder = {
|
AVCodec ffv1_encoder = {
|
||||||
"ffv1",
|
"ffv1",
|
||||||
CODEC_TYPE_VIDEO,
|
CODEC_TYPE_VIDEO,
|
||||||
|
@ -285,7 +285,7 @@ static av_cold int g726_reset(G726Context* c, int index)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_ADPCM_G726_ENCODER
|
||||||
static int16_t g726_encode(G726Context* c, int16_t sig)
|
static int16_t g726_encode(G726Context* c, int16_t sig)
|
||||||
{
|
{
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
@ -342,7 +342,7 @@ static av_cold int g726_close(AVCodecContext *avctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_ADPCM_G726_ENCODER
|
||||||
static int g726_encode_frame(AVCodecContext *avctx,
|
static int g726_encode_frame(AVCodecContext *avctx,
|
||||||
uint8_t *dst, int buf_size, void *data)
|
uint8_t *dst, int buf_size, void *data)
|
||||||
{
|
{
|
||||||
@ -381,7 +381,7 @@ static int g726_decode_frame(AVCodecContext *avctx,
|
|||||||
return buf_size;
|
return buf_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_ADPCM_G726_ENCODER
|
||||||
AVCodec adpcm_g726_encoder = {
|
AVCodec adpcm_g726_encoder = {
|
||||||
"g726",
|
"g726",
|
||||||
CODEC_TYPE_AUDIO,
|
CODEC_TYPE_AUDIO,
|
||||||
@ -394,7 +394,7 @@ AVCodec adpcm_g726_encoder = {
|
|||||||
.sample_fmts = (enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
|
.sample_fmts = (enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("G.726 ADPCM"),
|
.long_name = NULL_IF_CONFIG_SMALL("G.726 ADPCM"),
|
||||||
};
|
};
|
||||||
#endif //CONFIG_ENCODERS
|
#endif
|
||||||
|
|
||||||
AVCodec adpcm_g726_decoder = {
|
AVCodec adpcm_g726_decoder = {
|
||||||
"g726",
|
"g726",
|
||||||
|
@ -261,7 +261,7 @@ static int generate_bits_table(uint32_t *dst, uint8_t *len_table){
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#if defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER)
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint64_t val;
|
uint64_t val;
|
||||||
int name;
|
int name;
|
||||||
@ -317,7 +317,7 @@ static void generate_len_table(uint8_t *dst, uint64_t *stats, int size){
|
|||||||
if(i==size) break;
|
if(i==size) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_ENCODERS */
|
#endif /* defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER) */
|
||||||
|
|
||||||
static void generate_joint_tables(HYuvContext *s){
|
static void generate_joint_tables(HYuvContext *s){
|
||||||
uint16_t symbols[1<<VLC_BITS];
|
uint16_t symbols[1<<VLC_BITS];
|
||||||
@ -575,7 +575,7 @@ s->bgr32=1;
|
|||||||
}
|
}
|
||||||
#endif /* defined(CONFIG_HUFFYUV_DECODER) || defined(CONFIG_FFVHUFF_DECODER) */
|
#endif /* defined(CONFIG_HUFFYUV_DECODER) || defined(CONFIG_FFVHUFF_DECODER) */
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#if defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER)
|
||||||
static int store_table(HYuvContext *s, uint8_t *len, uint8_t *buf){
|
static int store_table(HYuvContext *s, uint8_t *len, uint8_t *buf){
|
||||||
int i;
|
int i;
|
||||||
int index= 0;
|
int index= 0;
|
||||||
@ -725,7 +725,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_ENCODERS */
|
#endif /* defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER) */
|
||||||
|
|
||||||
/* TODO instead of restarting the read when the code isn't in the first level
|
/* TODO instead of restarting the read when the code isn't in the first level
|
||||||
* of the joint table, jump into the 2nd level of the individual table. */
|
* of the joint table, jump into the 2nd level of the individual table. */
|
||||||
@ -761,7 +761,7 @@ static void decode_gray_bitstream(HYuvContext *s, int count){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#if defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER)
|
||||||
static int encode_422_bitstream(HYuvContext *s, int count){
|
static int encode_422_bitstream(HYuvContext *s, int count){
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -854,7 +854,7 @@ static int encode_gray_bitstream(HYuvContext *s, int count){
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_ENCODERS */
|
#endif /* defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER) */
|
||||||
|
|
||||||
static av_always_inline void decode_bgr_1(HYuvContext *s, int count, int decorrelate, int alpha){
|
static av_always_inline void decode_bgr_1(HYuvContext *s, int count, int decorrelate, int alpha){
|
||||||
int i;
|
int i;
|
||||||
@ -1226,7 +1226,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
|
|||||||
}
|
}
|
||||||
#endif /* defined(CONFIG_HUFFYUV_DECODER) || defined(CONFIG_FFVHUFF_DECODER) */
|
#endif /* defined(CONFIG_HUFFYUV_DECODER) || defined(CONFIG_FFVHUFF_DECODER) */
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#if defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER)
|
||||||
static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
|
static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
|
||||||
HYuvContext *s = avctx->priv_data;
|
HYuvContext *s = avctx->priv_data;
|
||||||
AVFrame *pict = data;
|
AVFrame *pict = data;
|
||||||
@ -1431,7 +1431,7 @@ static av_cold int encode_end(AVCodecContext *avctx)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_ENCODERS */
|
#endif /* defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER) */
|
||||||
|
|
||||||
#ifdef CONFIG_HUFFYUV_DECODER
|
#ifdef CONFIG_HUFFYUV_DECODER
|
||||||
AVCodec huffyuv_decoder = {
|
AVCodec huffyuv_decoder = {
|
||||||
@ -1465,8 +1465,7 @@ AVCodec ffvhuff_decoder = {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_HUFFYUV_ENCODER
|
||||||
|
|
||||||
AVCodec huffyuv_encoder = {
|
AVCodec huffyuv_encoder = {
|
||||||
"huffyuv",
|
"huffyuv",
|
||||||
CODEC_TYPE_VIDEO,
|
CODEC_TYPE_VIDEO,
|
||||||
@ -1478,7 +1477,9 @@ AVCodec huffyuv_encoder = {
|
|||||||
.pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV422P, PIX_FMT_RGB32, PIX_FMT_NONE},
|
.pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV422P, PIX_FMT_RGB32, PIX_FMT_NONE},
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Huffyuv / HuffYUV"),
|
.long_name = NULL_IF_CONFIG_SMALL("Huffyuv / HuffYUV"),
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_FFVHUFF_ENCODER
|
||||||
AVCodec ffvhuff_encoder = {
|
AVCodec ffvhuff_encoder = {
|
||||||
"ffvhuff",
|
"ffvhuff",
|
||||||
CODEC_TYPE_VIDEO,
|
CODEC_TYPE_VIDEO,
|
||||||
@ -1490,5 +1491,4 @@ AVCodec ffvhuff_encoder = {
|
|||||||
.pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_RGB32, PIX_FMT_NONE},
|
.pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_RGB32, PIX_FMT_NONE},
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Huffyuv FFmpeg variant"),
|
.long_name = NULL_IF_CONFIG_SMALL("Huffyuv FFmpeg variant"),
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
#endif //CONFIG_ENCODERS
|
|
||||||
|
@ -229,8 +229,8 @@ int rv_decode_dc(MpegEncContext *s, int n)
|
|||||||
return -code;
|
return -code;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
|
||||||
|
|
||||||
|
#if defined(CONFIG_RV10_ENCODER) || defined(CONFIG_RV20_ENCODER)
|
||||||
/* write RV 1.0 compatible frame header */
|
/* write RV 1.0 compatible frame header */
|
||||||
void rv10_encode_picture_header(MpegEncContext *s, int picture_number)
|
void rv10_encode_picture_header(MpegEncContext *s, int picture_number)
|
||||||
{
|
{
|
||||||
@ -304,7 +304,7 @@ static int get_num(GetBitContext *gb)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif //CONFIG_ENCODERS
|
#endif /* defined(CONFIG_RV10_ENCODER) || defined(CONFIG_RV20_ENCODER) */
|
||||||
|
|
||||||
/* read RV 1.0 compatible frame header */
|
/* read RV 1.0 compatible frame header */
|
||||||
static int rv10_decode_picture_header(MpegEncContext *s)
|
static int rv10_decode_picture_header(MpegEncContext *s)
|
||||||
|
@ -408,7 +408,7 @@ static int predictor_calc_error(int *k, int *state, int order, int error)
|
|||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#if defined(CONFIG_SONIC_ENCODER) || defined(CONFIG_SONIC_LS_ENCODER)
|
||||||
// Heavily modified Levinson-Durbin algorithm which
|
// Heavily modified Levinson-Durbin algorithm which
|
||||||
// copes better with quantization, and calculates the
|
// copes better with quantization, and calculates the
|
||||||
// actual whitened result as it goes.
|
// actual whitened result as it goes.
|
||||||
@ -479,13 +479,12 @@ static void modified_levinson_durbin(int *window, int window_entries,
|
|||||||
|
|
||||||
av_free(state);
|
av_free(state);
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_ENCODERS */
|
#endif /* defined(CONFIG_SONIC_ENCODER) || defined(CONFIG_SONIC_LS_ENCODER) */
|
||||||
|
|
||||||
static const int samplerate_table[] =
|
static const int samplerate_table[] =
|
||||||
{ 44100, 22050, 11025, 96000, 48000, 32000, 24000, 16000, 8000 };
|
{ 44100, 22050, 11025, 96000, 48000, 32000, 24000, 16000, 8000 };
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#if defined(CONFIG_SONIC_ENCODER) || defined(CONFIG_SONIC_LS_ENCODER)
|
||||||
|
|
||||||
static inline int code_samplerate(int samplerate)
|
static inline int code_samplerate(int samplerate)
|
||||||
{
|
{
|
||||||
switch (samplerate)
|
switch (samplerate)
|
||||||
@ -748,7 +747,7 @@ static int sonic_encode_frame(AVCodecContext *avctx,
|
|||||||
flush_put_bits(&pb);
|
flush_put_bits(&pb);
|
||||||
return (put_bits_count(&pb)+7)/8;
|
return (put_bits_count(&pb)+7)/8;
|
||||||
}
|
}
|
||||||
#endif //CONFIG_ENCODERS
|
#endif /* defined(CONFIG_SONIC_ENCODER) || defined(CONFIG_SONIC_LS_ENCODER) */
|
||||||
|
|
||||||
#ifdef CONFIG_SONIC_DECODER
|
#ifdef CONFIG_SONIC_DECODER
|
||||||
static av_cold int sonic_decode_init(AVCodecContext *avctx)
|
static av_cold int sonic_decode_init(AVCodecContext *avctx)
|
||||||
@ -937,7 +936,7 @@ static int sonic_decode_frame(AVCodecContext *avctx,
|
|||||||
}
|
}
|
||||||
#endif /* CONFIG_SONIC_DECODER */
|
#endif /* CONFIG_SONIC_DECODER */
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_SONIC_ENCODER
|
||||||
AVCodec sonic_encoder = {
|
AVCodec sonic_encoder = {
|
||||||
"sonic",
|
"sonic",
|
||||||
CODEC_TYPE_AUDIO,
|
CODEC_TYPE_AUDIO,
|
||||||
@ -949,7 +948,9 @@ AVCodec sonic_encoder = {
|
|||||||
NULL,
|
NULL,
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Sonic"),
|
.long_name = NULL_IF_CONFIG_SMALL("Sonic"),
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_SONIC_LS_ENCODER
|
||||||
AVCodec sonic_ls_encoder = {
|
AVCodec sonic_ls_encoder = {
|
||||||
"sonicls",
|
"sonicls",
|
||||||
CODEC_TYPE_AUDIO,
|
CODEC_TYPE_AUDIO,
|
||||||
|
@ -175,8 +175,7 @@ AVCodec vcr1_decoder = {
|
|||||||
.long_name = NULL_IF_CONFIG_SMALL("ATI VCR1"),
|
.long_name = NULL_IF_CONFIG_SMALL("ATI VCR1"),
|
||||||
};
|
};
|
||||||
#if 0
|
#if 0
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_VCR1_ENCODER
|
||||||
|
|
||||||
AVCodec vcr1_encoder = {
|
AVCodec vcr1_encoder = {
|
||||||
"vcr1",
|
"vcr1",
|
||||||
CODEC_TYPE_VIDEO,
|
CODEC_TYPE_VIDEO,
|
||||||
@ -187,6 +186,5 @@ AVCodec vcr1_encoder = {
|
|||||||
//encode_end,
|
//encode_end,
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("ATI VCR1"),
|
.long_name = NULL_IF_CONFIG_SMALL("ATI VCR1"),
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
#endif //CONFIG_ENCODERS
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user