mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 12:09:55 +00:00
always use audio spread (instead of "video no spread" for audio ...)
Originally committed as revision 7960 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
dc02fc6a68
commit
1d7d9935b2
@ -196,8 +196,6 @@ static const AVCodecTag codec_asf_bmp_tags[] = {
|
||||
|
||||
static int preroll_time = 3100;
|
||||
|
||||
static const uint8_t error_spread_ADPCM_G726[] = { 0x01, 0x90, 0x01, 0x90, 0x01, 0x01, 0x00, 0x00 };
|
||||
|
||||
static void put_guid(ByteIOContext *s, const GUID *g)
|
||||
{
|
||||
assert(sizeof(*g) == 16);
|
||||
@ -345,8 +343,6 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data
|
||||
/* stream headers */
|
||||
for(n=0;n<s->nb_streams;n++) {
|
||||
int64_t es_pos;
|
||||
const uint8_t *er_spr = NULL;
|
||||
int er_spr_len = 0;
|
||||
// ASFStream *stream = &asf->streams[n];
|
||||
|
||||
enc = s->streams[n]->codec;
|
||||
@ -354,18 +350,11 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data
|
||||
asf->streams[n].seq = 0;
|
||||
|
||||
|
||||
if (enc->codec_type == CODEC_TYPE_AUDIO) {
|
||||
if (enc->codec_id == CODEC_ID_ADPCM_G726) {
|
||||
er_spr = error_spread_ADPCM_G726;
|
||||
er_spr_len = sizeof(error_spread_ADPCM_G726);
|
||||
}
|
||||
}
|
||||
|
||||
switch(enc->codec_type) {
|
||||
case CODEC_TYPE_AUDIO:
|
||||
wav_extra_size = 0;
|
||||
extra_size = 18 + wav_extra_size;
|
||||
extra_size2 = er_spr_len;
|
||||
extra_size2 = 8;
|
||||
break;
|
||||
default:
|
||||
case CODEC_TYPE_VIDEO:
|
||||
@ -378,11 +367,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data
|
||||
hpos = put_header(pb, &stream_header);
|
||||
if (enc->codec_type == CODEC_TYPE_AUDIO) {
|
||||
put_guid(pb, &audio_stream);
|
||||
if ((er_spr != NULL) && (er_spr_len != 0)) {
|
||||
put_guid(pb, &audio_conceal_spread);
|
||||
} else {
|
||||
put_guid(pb, &video_conceal_none);
|
||||
}
|
||||
put_guid(pb, &audio_conceal_spread);
|
||||
} else {
|
||||
put_guid(pb, &video_stream);
|
||||
put_guid(pb, &video_conceal_none);
|
||||
@ -411,8 +396,16 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data
|
||||
url_fseek(pb, cur_pos, SEEK_SET);
|
||||
}
|
||||
/* ERROR Correction */
|
||||
if ((er_spr != NULL) && (er_spr_len != 0))
|
||||
put_buffer(pb, er_spr, er_spr_len);
|
||||
put_byte(pb, 0x01);
|
||||
if(enc->codec_id == CODEC_ID_ADPCM_G726 || !enc->block_align){
|
||||
put_le16(pb, 0x0190);
|
||||
put_le16(pb, 0x0190);
|
||||
}else{
|
||||
put_le16(pb, enc->block_align);
|
||||
put_le16(pb, enc->block_align);
|
||||
}
|
||||
put_le16(pb, 0x01);
|
||||
put_byte(pb, 0x00);
|
||||
} else {
|
||||
put_le32(pb, enc->width);
|
||||
put_le32(pb, enc->height);
|
||||
|
@ -188,11 +188,11 @@ c3382f03ce2efb5d475240d288a33898 *./data/a-flac.flac
|
||||
353368 ./data/a-flac.flac
|
||||
c4228df189aad9567a037727d0e763e4 *./data/out.wav
|
||||
stddev: 33.31 PSNR:65.87 bytes:1040384
|
||||
4c841e72ef8b92dfce0dce756cf16bf1 *./data/a-wmav1.asf
|
||||
99596 ./data/a-wmav1.asf
|
||||
8fc0032faee2785502a506b6d0470833 *./data/a-wmav1.asf
|
||||
99604 ./data/a-wmav1.asf
|
||||
stddev:12251.50 PSNR:14.56 bytes:1056768
|
||||
stddev:2106.00 PSNR:29.85 bytes:1048576
|
||||
e5881f5c778d4907a5d18fd115ad778d *./data/a-wmav2.asf
|
||||
99602 ./data/a-wmav2.asf
|
||||
f249fbe66d28027cf5f63d85d49844a7 *./data/a-wmav2.asf
|
||||
99610 ./data/a-wmav2.asf
|
||||
stddev:12255.92 PSNR:14.55 bytes:1056768
|
||||
stddev:2099.31 PSNR:29.88 bytes:1048576
|
||||
|
@ -2,8 +2,8 @@ ffmpeg regression test
|
||||
8a0536ccfe36f4fff408b3327d33e1dd *./data/b-libav.avi
|
||||
340344 ./data/b-libav.avi
|
||||
./data/b-libav.avi CRC=0x400c29e9
|
||||
c672d780cdf5c0ab11524011fab58760 *./data/b-libav.asf
|
||||
339767 ./data/b-libav.asf
|
||||
fc0716844f196fc791722b4c830a1155 *./data/b-libav.asf
|
||||
339775 ./data/b-libav.asf
|
||||
./data/b-libav.asf CRC=0x74113749
|
||||
1ad618e9fd318eb3483270cf9b9b3f43 *./data/b-libav.rm
|
||||
355405 ./data/b-libav.rm
|
||||
|
@ -188,11 +188,11 @@ c3382f03ce2efb5d475240d288a33898 *./data/a-flac.flac
|
||||
353368 ./data/a-flac.flac
|
||||
c4228df189aad9567a037727d0e763e4 *./data/out.wav
|
||||
stddev: 33.31 PSNR:65.87 bytes:1040384
|
||||
4c841e72ef8b92dfce0dce756cf16bf1 *./data/a-wmav1.asf
|
||||
99596 ./data/a-wmav1.asf
|
||||
8fc0032faee2785502a506b6d0470833 *./data/a-wmav1.asf
|
||||
99604 ./data/a-wmav1.asf
|
||||
stddev:12251.50 PSNR:14.56 bytes:1056768
|
||||
stddev:2106.00 PSNR:29.85 bytes:1048576
|
||||
e5881f5c778d4907a5d18fd115ad778d *./data/a-wmav2.asf
|
||||
99602 ./data/a-wmav2.asf
|
||||
f249fbe66d28027cf5f63d85d49844a7 *./data/a-wmav2.asf
|
||||
99610 ./data/a-wmav2.asf
|
||||
stddev:12255.92 PSNR:14.55 bytes:1056768
|
||||
stddev:2099.31 PSNR:29.88 bytes:1048576
|
||||
|
Loading…
Reference in New Issue
Block a user