remove non portable get/put_be64_double()
Originally committed as revision 4461 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
a254c5745b
commit
7cb8f314db
@ -104,7 +104,6 @@ void put_le16(ByteIOContext *s, unsigned int val);
|
||||
void put_be16(ByteIOContext *s, unsigned int val);
|
||||
void put_tag(ByteIOContext *s, const char *tag);
|
||||
|
||||
void put_be64_double(ByteIOContext *s, double val);
|
||||
void put_strz(ByteIOContext *s, const char *buf);
|
||||
|
||||
offset_t url_fseek(ByteIOContext *s, offset_t offset, int whence);
|
||||
@ -132,7 +131,6 @@ unsigned int get_le32(ByteIOContext *s);
|
||||
uint64_t get_le64(ByteIOContext *s);
|
||||
unsigned int get_le16(ByteIOContext *s);
|
||||
|
||||
double get_be64_double(ByteIOContext *s);
|
||||
char *get_strz(ByteIOContext *s, char *buf, int maxlen);
|
||||
unsigned int get_be16(ByteIOContext *s);
|
||||
unsigned int get_be24(ByteIOContext *s);
|
||||
|
@ -210,17 +210,6 @@ void put_be32(ByteIOContext *s, unsigned int val)
|
||||
put_byte(s, val);
|
||||
}
|
||||
|
||||
/* IEEE format is assumed */
|
||||
void put_be64_double(ByteIOContext *s, double val)
|
||||
{
|
||||
union {
|
||||
double d;
|
||||
uint64_t ull;
|
||||
} u;
|
||||
u.d = val;
|
||||
put_be64(s, u.ull);
|
||||
}
|
||||
|
||||
void put_strz(ByteIOContext *s, const char *str)
|
||||
{
|
||||
if (str)
|
||||
@ -449,17 +438,6 @@ unsigned int get_be32(ByteIOContext *s)
|
||||
return val;
|
||||
}
|
||||
|
||||
double get_be64_double(ByteIOContext *s)
|
||||
{
|
||||
union {
|
||||
double d;
|
||||
uint64_t ull;
|
||||
} u;
|
||||
|
||||
u.ull = get_be64(s);
|
||||
return u.d;
|
||||
}
|
||||
|
||||
char *get_strz(ByteIOContext *s, char *buf, int maxlen)
|
||||
{
|
||||
int i = 0;
|
||||
|
@ -182,10 +182,10 @@ static int ffm_write_header(AVFormatContext *s)
|
||||
put_be32(pb, codec->rc_max_rate);
|
||||
put_be32(pb, codec->rc_min_rate);
|
||||
put_be32(pb, codec->rc_buffer_size);
|
||||
put_be64_double(pb, codec->i_quant_factor);
|
||||
put_be64_double(pb, codec->b_quant_factor);
|
||||
put_be64_double(pb, codec->i_quant_offset);
|
||||
put_be64_double(pb, codec->b_quant_offset);
|
||||
put_be64(pb, av_dbl2int(codec->i_quant_factor));
|
||||
put_be64(pb, av_dbl2int(codec->b_quant_factor));
|
||||
put_be64(pb, av_dbl2int(codec->i_quant_offset));
|
||||
put_be64(pb, av_dbl2int(codec->b_quant_offset));
|
||||
put_be32(pb, codec->dct_algo);
|
||||
put_be32(pb, codec->strict_std_compliance);
|
||||
put_be32(pb, codec->max_b_frames);
|
||||
@ -197,7 +197,7 @@ static int ffm_write_header(AVFormatContext *s)
|
||||
put_be32(pb, codec->mb_decision);
|
||||
put_be32(pb, codec->nsse_weight);
|
||||
put_be32(pb, codec->frame_skip_cmp);
|
||||
put_be64_double(pb, codec->rc_buffer_aggressivity);
|
||||
put_be64(pb, av_dbl2int(codec->rc_buffer_aggressivity));
|
||||
break;
|
||||
case CODEC_TYPE_AUDIO:
|
||||
put_be32(pb, codec->sample_rate);
|
||||
@ -513,10 +513,10 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap)
|
||||
codec->rc_max_rate = get_be32(pb);
|
||||
codec->rc_min_rate = get_be32(pb);
|
||||
codec->rc_buffer_size = get_be32(pb);
|
||||
codec->i_quant_factor = get_be64_double(pb);
|
||||
codec->b_quant_factor = get_be64_double(pb);
|
||||
codec->i_quant_offset = get_be64_double(pb);
|
||||
codec->b_quant_offset = get_be64_double(pb);
|
||||
codec->i_quant_factor = av_int2dbl(get_be64(pb));
|
||||
codec->b_quant_factor = av_int2dbl(get_be64(pb));
|
||||
codec->i_quant_offset = av_int2dbl(get_be64(pb));
|
||||
codec->b_quant_offset = av_int2dbl(get_be64(pb));
|
||||
codec->dct_algo = get_be32(pb);
|
||||
codec->strict_std_compliance = get_be32(pb);
|
||||
codec->max_b_frames = get_be32(pb);
|
||||
@ -528,7 +528,7 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap)
|
||||
codec->mb_decision = get_be32(pb);
|
||||
codec->nsse_weight = get_be32(pb);
|
||||
codec->frame_skip_cmp = get_be32(pb);
|
||||
codec->rc_buffer_aggressivity = get_be64_double(pb);
|
||||
codec->rc_buffer_aggressivity = av_int2dbl(get_be64(pb));
|
||||
break;
|
||||
case CODEC_TYPE_AUDIO:
|
||||
codec->sample_rate = get_be32(pb);
|
||||
|
Loading…
Reference in New Issue
Block a user