aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-02-12 23:32:55 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-02-12 23:32:55 +0000
commit1d7d9935b27c41215174d73dbb97a4a125c2ed8c (patch)
tree54055a8df3fa65ac35427f8a01515fcec66f3a15
parentdc02fc6a68ca6def23faf2bd3d222876e3945e7f (diff)
downloadffmpeg-1d7d9935b27c41215174d73dbb97a4a125c2ed8c.tar.gz
always use audio spread (instead of "video no spread" for audio ...)
Originally committed as revision 7960 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/asf-enc.c31
-rw-r--r--tests/ffmpeg.regression.ref8
-rw-r--r--tests/libav.regression.ref4
-rw-r--r--tests/rotozoom.regression.ref8
4 files changed, 22 insertions, 29 deletions
diff --git a/libavformat/asf-enc.c b/libavformat/asf-enc.c
index ffa41e63cf..2a87591e93 100644
--- a/libavformat/asf-enc.c
+++ b/libavformat/asf-enc.c
@@ -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);
diff --git a/tests/ffmpeg.regression.ref b/tests/ffmpeg.regression.ref
index 98e1510801..27e9e0bdfe 100644
--- a/tests/ffmpeg.regression.ref
+++ b/tests/ffmpeg.regression.ref
@@ -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
diff --git a/tests/libav.regression.ref b/tests/libav.regression.ref
index 894ecf864e..a9584c5dd8 100644
--- a/tests/libav.regression.ref
+++ b/tests/libav.regression.ref
@@ -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
diff --git a/tests/rotozoom.regression.ref b/tests/rotozoom.regression.ref
index a196bd5412..bbb3f1d622 100644
--- a/tests/rotozoom.regression.ref
+++ b/tests/rotozoom.regression.ref
@@ -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