* qatar/master:
avcodec: add a cook parser to get subpacket duration
FATE: allow lavf tests to alter input parameters
FATE: replace the acodec-pcm_s24daud test with an enc_dec_pcm checksum test
FATE: replace the acodec-g726 test with 4 new encode/decode tests
FATE: replace current g722 encoding tests with an encode/decode test
FATE: add a pattern rule for generating asynth wav files
FATE: optionally write a WAVE header in audiogen
avutil: add audio fifo buffer
Conflicts:
doc/APIchanges
libavcodec/version.h
libavutil/avutil.h
tests/Makefile
tests/codec-regression.sh
tests/fate/voice.mak
tests/lavf-regression.sh
tests/ref/acodec/g722
tests/ref/acodec/g726
tests/ref/acodec/pcm_s24daud
tests/ref/lavf/dv_fmt
tests/ref/lavf/gxf
tests/ref/lavf/mxf
tests/ref/lavf/mxf_d10
tests/ref/seek/lavf_dv
Merged-by: Michael Niedermayer <michaelni@gmx.at>
| ... | ... |
@@ -22,6 +22,18 @@ API changes, most recent first: |
| 22 | 22 |
2012-03-26 - a67d9cf - lavfi 2.66.100 |
| 23 | 23 |
Add avfilter_fill_frame_from_{audio_,}buffer_ref() functions.
|
| 24 | 24 |
|
| 25 |
+2012-xx-xx - xxxxxxx - lavu 51.28.0 - audio_fifo.h |
|
| 26 |
+ Add audio FIFO functions: |
|
| 27 |
+ av_audio_fifo_free() |
|
| 28 |
+ av_audio_fifo_alloc() |
|
| 29 |
+ av_audio_fifo_realloc() |
|
| 30 |
+ av_audio_fifo_write() |
|
| 31 |
+ av_audio_fifo_read() |
|
| 32 |
+ av_audio_fifo_drain() |
|
| 33 |
+ av_audio_fifo_reset() |
|
| 34 |
+ av_audio_fifo_size() |
|
| 35 |
+ av_audio_fifo_space() |
|
| 36 |
+ |
|
| 25 | 37 |
2012-xx-xx - xxxxxxx - lavfi 2.16.0 - avfiltergraph.h |
| 26 | 38 |
Add avfilter_graph_parse2() |
| 27 | 39 |
|
| ... | ... |
@@ -679,6 +679,7 @@ OBJS-$(CONFIG_AC3_PARSER) += ac3_parser.o ac3tab.o \ |
| 679 | 679 |
aac_ac3_parser.o |
| 680 | 680 |
OBJS-$(CONFIG_ADX_PARSER) += adx_parser.o adx.o |
| 681 | 681 |
OBJS-$(CONFIG_CAVSVIDEO_PARSER) += cavs_parser.o |
| 682 |
+OBJS-$(CONFIG_COOK_PARSER) += cook_parser.o |
|
| 682 | 683 |
OBJS-$(CONFIG_DCA_PARSER) += dca_parser.o |
| 683 | 684 |
OBJS-$(CONFIG_DIRAC_PARSER) += dirac_parser.o |
| 684 | 685 |
OBJS-$(CONFIG_DNXHD_PARSER) += dnxhd_parser.o |
| ... | ... |
@@ -437,6 +437,7 @@ void avcodec_register_all(void) |
| 437 | 437 |
REGISTER_PARSER (AC3, ac3); |
| 438 | 438 |
REGISTER_PARSER (ADX, adx); |
| 439 | 439 |
REGISTER_PARSER (CAVSVIDEO, cavsvideo); |
| 440 |
+ REGISTER_PARSER (COOK, cook); |
|
| 440 | 441 |
REGISTER_PARSER (DCA, dca); |
| 441 | 442 |
REGISTER_PARSER (DIRAC, dirac); |
| 442 | 443 |
REGISTER_PARSER (DNXHD, dnxhd); |
| 443 | 444 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,59 @@ |
| 0 |
+/* |
|
| 1 |
+ * Copyright (c) 2012 Justin Ruggles <justin.ruggles@gmail.com> |
|
| 2 |
+ * |
|
| 3 |
+ * This file is part of Libav. |
|
| 4 |
+ * |
|
| 5 |
+ * Libav is free software; you can redistribute it and/or |
|
| 6 |
+ * modify it under the terms of the GNU Lesser General Public |
|
| 7 |
+ * License as published by the Free Software Foundation; either |
|
| 8 |
+ * version 2.1 of the License, or (at your option) any later version. |
|
| 9 |
+ * |
|
| 10 |
+ * Libav is distributed in the hope that it will be useful, |
|
| 11 |
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 12 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
| 13 |
+ * Lesser General Public License for more details. |
|
| 14 |
+ * |
|
| 15 |
+ * You should have received a copy of the GNU Lesser General Public |
|
| 16 |
+ * License along with Libav; if not, write to the Free Software |
|
| 17 |
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|
| 18 |
+ */ |
|
| 19 |
+ |
|
| 20 |
+/** |
|
| 21 |
+ * @file |
|
| 22 |
+ * Cook audio parser |
|
| 23 |
+ * |
|
| 24 |
+ * Determines subpacket duration from extradata. |
|
| 25 |
+ */ |
|
| 26 |
+ |
|
| 27 |
+#include <stdint.h> |
|
| 28 |
+ |
|
| 29 |
+#include "libavutil/intreadwrite.h" |
|
| 30 |
+#include "parser.h" |
|
| 31 |
+ |
|
| 32 |
+typedef struct CookParseContext {
|
|
| 33 |
+ int duration; |
|
| 34 |
+} CookParseContext; |
|
| 35 |
+ |
|
| 36 |
+static int cook_parse(AVCodecParserContext *s1, AVCodecContext *avctx, |
|
| 37 |
+ const uint8_t **poutbuf, int *poutbuf_size, |
|
| 38 |
+ const uint8_t *buf, int buf_size) |
|
| 39 |
+{
|
|
| 40 |
+ CookParseContext *s = s1->priv_data; |
|
| 41 |
+ |
|
| 42 |
+ if (s->duration) |
|
| 43 |
+ s1->duration = s->duration; |
|
| 44 |
+ else if (avctx->extradata && avctx->extradata_size >= 8 && avctx->channels) |
|
| 45 |
+ s->duration = AV_RB16(avctx->extradata + 4) / avctx->channels; |
|
| 46 |
+ |
|
| 47 |
+ /* always return the full packet. this parser isn't doing any splitting or |
|
| 48 |
+ combining, only setting packet duration */ |
|
| 49 |
+ *poutbuf = buf; |
|
| 50 |
+ *poutbuf_size = buf_size; |
|
| 51 |
+ return buf_size; |
|
| 52 |
+} |
|
| 53 |
+ |
|
| 54 |
+AVCodecParser ff_cook_parser = {
|
|
| 55 |
+ .codec_ids = { CODEC_ID_COOK },
|
|
| 56 |
+ .priv_data_size = sizeof(CookParseContext), |
|
| 57 |
+ .parser_parse = cook_parse, |
|
| 58 |
+}; |
| ... | ... |
@@ -27,8 +27,8 @@ |
| 27 | 27 |
*/ |
| 28 | 28 |
|
| 29 | 29 |
#define LIBAVCODEC_VERSION_MAJOR 54 |
| 30 |
-#define LIBAVCODEC_VERSION_MINOR 14 |
|
| 31 |
-#define LIBAVCODEC_VERSION_MICRO 101 |
|
| 30 |
+#define LIBAVCODEC_VERSION_MINOR 15 |
|
| 31 |
+#define LIBAVCODEC_VERSION_MICRO 100 |
|
| 32 | 32 |
|
| 33 | 33 |
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ |
| 34 | 34 |
LIBAVCODEC_VERSION_MINOR, \ |
| ... | ... |
@@ -205,6 +205,7 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb, |
| 205 | 205 |
st->codec->block_align = coded_framesize; |
| 206 | 206 |
break; |
| 207 | 207 |
case CODEC_ID_COOK: |
| 208 |
+ st->need_parsing = AVSTREAM_PARSE_HEADERS; |
|
| 208 | 209 |
case CODEC_ID_ATRAC3: |
| 209 | 210 |
case CODEC_ID_SIPR: |
| 210 | 211 |
avio_rb16(pb); avio_r8(pb); |
| ... | ... |
@@ -5,6 +5,7 @@ NAME = avutil |
| 5 | 5 |
HEADERS = adler32.h \ |
| 6 | 6 |
aes.h \ |
| 7 | 7 |
attributes.h \ |
| 8 |
+ audio_fifo.h \ |
|
| 8 | 9 |
audioconvert.h \ |
| 9 | 10 |
avassert.h \ |
| 10 | 11 |
avstring.h \ |
| ... | ... |
@@ -45,6 +46,7 @@ BUILT_HEADERS = avconfig.h |
| 45 | 45 |
|
| 46 | 46 |
OBJS = adler32.o \ |
| 47 | 47 |
aes.o \ |
| 48 |
+ audio_fifo.o \ |
|
| 48 | 49 |
audioconvert.o \ |
| 49 | 50 |
avstring.o \ |
| 50 | 51 |
base64.o \ |
| 51 | 52 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,193 @@ |
| 0 |
+/* |
|
| 1 |
+ * Audio FIFO |
|
| 2 |
+ * Copyright (c) 2012 Justin Ruggles <justin.ruggles@gmail.com> |
|
| 3 |
+ * |
|
| 4 |
+ * This file is part of Libav. |
|
| 5 |
+ * |
|
| 6 |
+ * Libav is free software; you can redistribute it and/or |
|
| 7 |
+ * modify it under the terms of the GNU Lesser General Public |
|
| 8 |
+ * License as published by the Free Software Foundation; either |
|
| 9 |
+ * version 2.1 of the License, or (at your option) any later version. |
|
| 10 |
+ * |
|
| 11 |
+ * Libav is distributed in the hope that it will be useful, |
|
| 12 |
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 13 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
| 14 |
+ * Lesser General Public License for more details. |
|
| 15 |
+ * |
|
| 16 |
+ * You should have received a copy of the GNU Lesser General Public |
|
| 17 |
+ * License along with Libav; if not, write to the Free Software |
|
| 18 |
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|
| 19 |
+ */ |
|
| 20 |
+ |
|
| 21 |
+/** |
|
| 22 |
+ * @file |
|
| 23 |
+ * Audio FIFO |
|
| 24 |
+ */ |
|
| 25 |
+ |
|
| 26 |
+#include "avutil.h" |
|
| 27 |
+#include "audio_fifo.h" |
|
| 28 |
+#include "fifo.h" |
|
| 29 |
+#include "mem.h" |
|
| 30 |
+#include "samplefmt.h" |
|
| 31 |
+ |
|
| 32 |
+struct AVAudioFifo {
|
|
| 33 |
+ AVFifoBuffer **buf; /**< single buffer for interleaved, per-channel buffers for planar */ |
|
| 34 |
+ int nb_buffers; /**< number of buffers */ |
|
| 35 |
+ int nb_samples; /**< number of samples currently in the FIFO */ |
|
| 36 |
+ int allocated_samples; /**< current allocated size, in samples */ |
|
| 37 |
+ |
|
| 38 |
+ int channels; /**< number of channels */ |
|
| 39 |
+ enum AVSampleFormat sample_fmt; /**< sample format */ |
|
| 40 |
+ int sample_size; /**< size, in bytes, of one sample in a buffer */ |
|
| 41 |
+}; |
|
| 42 |
+ |
|
| 43 |
+void av_audio_fifo_free(AVAudioFifo *af) |
|
| 44 |
+{
|
|
| 45 |
+ if (af) {
|
|
| 46 |
+ if (af->buf) {
|
|
| 47 |
+ int i; |
|
| 48 |
+ for (i = 0; i < af->nb_buffers; i++) {
|
|
| 49 |
+ if (af->buf[i]) |
|
| 50 |
+ av_fifo_free(af->buf[i]); |
|
| 51 |
+ } |
|
| 52 |
+ av_free(af->buf); |
|
| 53 |
+ } |
|
| 54 |
+ av_free(af); |
|
| 55 |
+ } |
|
| 56 |
+} |
|
| 57 |
+ |
|
| 58 |
+AVAudioFifo *av_audio_fifo_alloc(enum AVSampleFormat sample_fmt, int channels, |
|
| 59 |
+ int nb_samples) |
|
| 60 |
+{
|
|
| 61 |
+ AVAudioFifo *af; |
|
| 62 |
+ int buf_size, i; |
|
| 63 |
+ |
|
| 64 |
+ /* get channel buffer size (also validates parameters) */ |
|
| 65 |
+ if (av_samples_get_buffer_size(&buf_size, channels, nb_samples, sample_fmt, 1) < 0) |
|
| 66 |
+ return NULL; |
|
| 67 |
+ |
|
| 68 |
+ af = av_mallocz(sizeof(*af)); |
|
| 69 |
+ if (!af) |
|
| 70 |
+ return NULL; |
|
| 71 |
+ |
|
| 72 |
+ af->channels = channels; |
|
| 73 |
+ af->sample_fmt = sample_fmt; |
|
| 74 |
+ af->sample_size = buf_size / nb_samples; |
|
| 75 |
+ af->nb_buffers = av_sample_fmt_is_planar(sample_fmt) ? channels : 1; |
|
| 76 |
+ |
|
| 77 |
+ af->buf = av_mallocz(af->nb_buffers * sizeof(*af->buf)); |
|
| 78 |
+ if (!af->buf) |
|
| 79 |
+ goto error; |
|
| 80 |
+ |
|
| 81 |
+ for (i = 0; i < af->nb_buffers; i++) {
|
|
| 82 |
+ af->buf[i] = av_fifo_alloc(buf_size); |
|
| 83 |
+ if (!af->buf[i]) |
|
| 84 |
+ goto error; |
|
| 85 |
+ } |
|
| 86 |
+ af->allocated_samples = nb_samples; |
|
| 87 |
+ |
|
| 88 |
+ return af; |
|
| 89 |
+ |
|
| 90 |
+error: |
|
| 91 |
+ av_audio_fifo_free(af); |
|
| 92 |
+ return NULL; |
|
| 93 |
+} |
|
| 94 |
+ |
|
| 95 |
+int av_audio_fifo_realloc(AVAudioFifo *af, int nb_samples) |
|
| 96 |
+{
|
|
| 97 |
+ int i, ret, buf_size; |
|
| 98 |
+ |
|
| 99 |
+ if ((ret = av_samples_get_buffer_size(&buf_size, af->channels, nb_samples, |
|
| 100 |
+ af->sample_fmt, 1)) < 0) |
|
| 101 |
+ return ret; |
|
| 102 |
+ |
|
| 103 |
+ for (i = 0; i < af->nb_buffers; i++) {
|
|
| 104 |
+ if ((ret = av_fifo_realloc2(af->buf[i], buf_size)) < 0) |
|
| 105 |
+ return ret; |
|
| 106 |
+ } |
|
| 107 |
+ af->allocated_samples = nb_samples; |
|
| 108 |
+ return 0; |
|
| 109 |
+} |
|
| 110 |
+ |
|
| 111 |
+int av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples) |
|
| 112 |
+{
|
|
| 113 |
+ int i, ret, size; |
|
| 114 |
+ |
|
| 115 |
+ /* automatically reallocate buffers if needed */ |
|
| 116 |
+ if (av_audio_fifo_space(af) < nb_samples) {
|
|
| 117 |
+ int current_size = av_audio_fifo_size(af); |
|
| 118 |
+ /* check for integer overflow in new size calculation */ |
|
| 119 |
+ if (INT_MAX / 2 - current_size < nb_samples) |
|
| 120 |
+ return AVERROR(EINVAL); |
|
| 121 |
+ /* reallocate buffers */ |
|
| 122 |
+ if ((ret = av_audio_fifo_realloc(af, 2 * (current_size + nb_samples))) < 0) |
|
| 123 |
+ return ret; |
|
| 124 |
+ } |
|
| 125 |
+ |
|
| 126 |
+ size = nb_samples * af->sample_size; |
|
| 127 |
+ for (i = 0; i < af->nb_buffers; i++) {
|
|
| 128 |
+ ret = av_fifo_generic_write(af->buf[i], data[i], size, NULL); |
|
| 129 |
+ if (ret != size) |
|
| 130 |
+ return AVERROR_BUG; |
|
| 131 |
+ } |
|
| 132 |
+ af->nb_samples += nb_samples; |
|
| 133 |
+ |
|
| 134 |
+ return nb_samples; |
|
| 135 |
+} |
|
| 136 |
+ |
|
| 137 |
+int av_audio_fifo_read(AVAudioFifo *af, void **data, int nb_samples) |
|
| 138 |
+{
|
|
| 139 |
+ int i, ret, size; |
|
| 140 |
+ |
|
| 141 |
+ if (nb_samples < 0) |
|
| 142 |
+ return AVERROR(EINVAL); |
|
| 143 |
+ nb_samples = FFMIN(nb_samples, af->nb_samples); |
|
| 144 |
+ if (!nb_samples) |
|
| 145 |
+ return 0; |
|
| 146 |
+ |
|
| 147 |
+ size = nb_samples * af->sample_size; |
|
| 148 |
+ for (i = 0; i < af->nb_buffers; i++) {
|
|
| 149 |
+ if ((ret = av_fifo_generic_read(af->buf[i], data[i], size, NULL)) < 0) |
|
| 150 |
+ return AVERROR_BUG; |
|
| 151 |
+ } |
|
| 152 |
+ af->nb_samples -= nb_samples; |
|
| 153 |
+ |
|
| 154 |
+ return nb_samples; |
|
| 155 |
+} |
|
| 156 |
+ |
|
| 157 |
+int av_audio_fifo_drain(AVAudioFifo *af, int nb_samples) |
|
| 158 |
+{
|
|
| 159 |
+ int i, size; |
|
| 160 |
+ |
|
| 161 |
+ if (nb_samples < 0) |
|
| 162 |
+ return AVERROR(EINVAL); |
|
| 163 |
+ nb_samples = FFMIN(nb_samples, af->nb_samples); |
|
| 164 |
+ |
|
| 165 |
+ if (nb_samples) {
|
|
| 166 |
+ size = nb_samples * af->sample_size; |
|
| 167 |
+ for (i = 0; i < af->nb_buffers; i++) |
|
| 168 |
+ av_fifo_drain(af->buf[i], size); |
|
| 169 |
+ af->nb_samples -= nb_samples; |
|
| 170 |
+ } |
|
| 171 |
+ return 0; |
|
| 172 |
+} |
|
| 173 |
+ |
|
| 174 |
+void av_audio_fifo_reset(AVAudioFifo *af) |
|
| 175 |
+{
|
|
| 176 |
+ int i; |
|
| 177 |
+ |
|
| 178 |
+ for (i = 0; i < af->nb_buffers; i++) |
|
| 179 |
+ av_fifo_reset(af->buf[i]); |
|
| 180 |
+ |
|
| 181 |
+ af->nb_samples = 0; |
|
| 182 |
+} |
|
| 183 |
+ |
|
| 184 |
+int av_audio_fifo_size(AVAudioFifo *af) |
|
| 185 |
+{
|
|
| 186 |
+ return af->nb_samples; |
|
| 187 |
+} |
|
| 188 |
+ |
|
| 189 |
+int av_audio_fifo_space(AVAudioFifo *af) |
|
| 190 |
+{
|
|
| 191 |
+ return af->allocated_samples - af->nb_samples; |
|
| 192 |
+} |
| 0 | 193 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,146 @@ |
| 0 |
+/* |
|
| 1 |
+ * Audio FIFO |
|
| 2 |
+ * Copyright (c) 2012 Justin Ruggles <justin.ruggles@gmail.com> |
|
| 3 |
+ * |
|
| 4 |
+ * This file is part of Libav. |
|
| 5 |
+ * |
|
| 6 |
+ * Libav is free software; you can redistribute it and/or |
|
| 7 |
+ * modify it under the terms of the GNU Lesser General Public |
|
| 8 |
+ * License as published by the Free Software Foundation; either |
|
| 9 |
+ * version 2.1 of the License, or (at your option) any later version. |
|
| 10 |
+ * |
|
| 11 |
+ * Libav is distributed in the hope that it will be useful, |
|
| 12 |
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 13 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
| 14 |
+ * Lesser General Public License for more details. |
|
| 15 |
+ * |
|
| 16 |
+ * You should have received a copy of the GNU Lesser General Public |
|
| 17 |
+ * License along with Libav; if not, write to the Free Software |
|
| 18 |
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|
| 19 |
+ */ |
|
| 20 |
+ |
|
| 21 |
+/** |
|
| 22 |
+ * @file |
|
| 23 |
+ * Audio FIFO Buffer |
|
| 24 |
+ */ |
|
| 25 |
+ |
|
| 26 |
+#ifndef AVUTIL_AUDIO_FIFO_H |
|
| 27 |
+#define AVUTIL_AUDIO_FIFO_H |
|
| 28 |
+ |
|
| 29 |
+#include "avutil.h" |
|
| 30 |
+#include "fifo.h" |
|
| 31 |
+#include "samplefmt.h" |
|
| 32 |
+ |
|
| 33 |
+/** |
|
| 34 |
+ * @addtogroup lavu_audio |
|
| 35 |
+ * @{
|
|
| 36 |
+ */ |
|
| 37 |
+ |
|
| 38 |
+/** |
|
| 39 |
+ * Context for an Audio FIFO Buffer. |
|
| 40 |
+ * |
|
| 41 |
+ * - Operates at the sample level rather than the byte level. |
|
| 42 |
+ * - Supports multiple channels with either planar or packed sample format. |
|
| 43 |
+ * - Automatic reallocation when writing to a full buffer. |
|
| 44 |
+ */ |
|
| 45 |
+typedef struct AVAudioFifo AVAudioFifo; |
|
| 46 |
+ |
|
| 47 |
+/** |
|
| 48 |
+ * Free an AVAudioFifo. |
|
| 49 |
+ * |
|
| 50 |
+ * @param af AVAudioFifo to free |
|
| 51 |
+ */ |
|
| 52 |
+void av_audio_fifo_free(AVAudioFifo *af); |
|
| 53 |
+ |
|
| 54 |
+/** |
|
| 55 |
+ * Allocate an AVAudioFifo. |
|
| 56 |
+ * |
|
| 57 |
+ * @param sample_fmt sample format |
|
| 58 |
+ * @param channels number of channels |
|
| 59 |
+ * @param nb_samples initial allocation size, in samples |
|
| 60 |
+ * @return newly allocated AVAudioFifo, or NULL on error |
|
| 61 |
+ */ |
|
| 62 |
+AVAudioFifo *av_audio_fifo_alloc(enum AVSampleFormat sample_fmt, int channels, |
|
| 63 |
+ int nb_samples); |
|
| 64 |
+ |
|
| 65 |
+/** |
|
| 66 |
+ * Reallocate an AVAudioFifo. |
|
| 67 |
+ * |
|
| 68 |
+ * @param af AVAudioFifo to reallocate |
|
| 69 |
+ * @param nb_samples new allocation size, in samples |
|
| 70 |
+ * @return 0 if OK, or negative AVERROR code on failure |
|
| 71 |
+ */ |
|
| 72 |
+int av_audio_fifo_realloc(AVAudioFifo *af, int nb_samples); |
|
| 73 |
+ |
|
| 74 |
+/** |
|
| 75 |
+ * Write data to an AVAudioFifo. |
|
| 76 |
+ * |
|
| 77 |
+ * The AVAudioFifo will be reallocated automatically if the available space |
|
| 78 |
+ * is less than nb_samples. |
|
| 79 |
+ * |
|
| 80 |
+ * @see enum AVSampleFormat |
|
| 81 |
+ * The documentation for AVSampleFormat describes the data layout. |
|
| 82 |
+ * |
|
| 83 |
+ * @param af AVAudioFifo to write to |
|
| 84 |
+ * @param data audio data plane pointers |
|
| 85 |
+ * @param nb_samples number of samples to write |
|
| 86 |
+ * @return number of samples actually written, or negative AVERROR |
|
| 87 |
+ * code on failure. |
|
| 88 |
+ */ |
|
| 89 |
+int av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples); |
|
| 90 |
+ |
|
| 91 |
+/** |
|
| 92 |
+ * Read data from an AVAudioFifo. |
|
| 93 |
+ * |
|
| 94 |
+ * @see enum AVSampleFormat |
|
| 95 |
+ * The documentation for AVSampleFormat describes the data layout. |
|
| 96 |
+ * |
|
| 97 |
+ * @param af AVAudioFifo to read from |
|
| 98 |
+ * @param data audio data plane pointers |
|
| 99 |
+ * @param nb_samples number of samples to read |
|
| 100 |
+ * @return number of samples actually read, or negative AVERROR code |
|
| 101 |
+ * on failure. |
|
| 102 |
+ */ |
|
| 103 |
+int av_audio_fifo_read(AVAudioFifo *af, void **data, int nb_samples); |
|
| 104 |
+ |
|
| 105 |
+/** |
|
| 106 |
+ * Drain data from an AVAudioFifo. |
|
| 107 |
+ * |
|
| 108 |
+ * Removes the data without reading it. |
|
| 109 |
+ * |
|
| 110 |
+ * @param af AVAudioFifo to drain |
|
| 111 |
+ * @param nb_samples number of samples to drain |
|
| 112 |
+ * @return 0 if OK, or negative AVERROR code on failure |
|
| 113 |
+ */ |
|
| 114 |
+int av_audio_fifo_drain(AVAudioFifo *af, int nb_samples); |
|
| 115 |
+ |
|
| 116 |
+/** |
|
| 117 |
+ * Reset the AVAudioFifo buffer. |
|
| 118 |
+ * |
|
| 119 |
+ * This empties all data in the buffer. |
|
| 120 |
+ * |
|
| 121 |
+ * @param af AVAudioFifo to reset |
|
| 122 |
+ */ |
|
| 123 |
+void av_audio_fifo_reset(AVAudioFifo *af); |
|
| 124 |
+ |
|
| 125 |
+/** |
|
| 126 |
+ * Get the current number of samples in the AVAudioFifo available for reading. |
|
| 127 |
+ * |
|
| 128 |
+ * @param af the AVAudioFifo to query |
|
| 129 |
+ * @return number of samples available for reading |
|
| 130 |
+ */ |
|
| 131 |
+int av_audio_fifo_size(AVAudioFifo *af); |
|
| 132 |
+ |
|
| 133 |
+/** |
|
| 134 |
+ * Get the current number of samples in the AVAudioFifo available for writing. |
|
| 135 |
+ * |
|
| 136 |
+ * @param af the AVAudioFifo to query |
|
| 137 |
+ * @return number of samples available for writing |
|
| 138 |
+ */ |
|
| 139 |
+int av_audio_fifo_space(AVAudioFifo *af); |
|
| 140 |
+ |
|
| 141 |
+/** |
|
| 142 |
+ * @} |
|
| 143 |
+ */ |
|
| 144 |
+ |
|
| 145 |
+#endif /* AVUTIL_AUDIO_FIFO_H */ |
| ... | ... |
@@ -153,7 +153,7 @@ |
| 153 | 153 |
*/ |
| 154 | 154 |
|
| 155 | 155 |
#define LIBAVUTIL_VERSION_MAJOR 51 |
| 156 |
-#define LIBAVUTIL_VERSION_MINOR 46 |
|
| 156 |
+#define LIBAVUTIL_VERSION_MINOR 47 |
|
| 157 | 157 |
#define LIBAVUTIL_VERSION_MICRO 100 |
| 158 | 158 |
|
| 159 | 159 |
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ |
| ... | ... |
@@ -29,6 +29,9 @@ tests/data/asynth1.sw: tests/audiogen$(HOSTEXESUF) | tests/data |
| 29 | 29 |
tests/data/asynth-16000-1.sw: tests/audiogen$(HOSTEXESUF) | tests/data |
| 30 | 30 |
$(M)./$< $@ 16000 1 |
| 31 | 31 |
|
| 32 |
+tests/data/asynth-%.wav: tests/audiogen$(HOSTEXESUF) | tests/data |
|
| 33 |
+ $(M)./$< $@ $(subst -, ,$*) |
|
| 34 |
+ |
|
| 32 | 35 |
tests/data/mapchan-6ch.sw: tests/audiogen$(HOSTEXESUF) |
| 33 | 36 |
@mkdir -p tests/data |
| 34 | 37 |
$(M)./$< $@ 22050 6 |
| ... | ... |
@@ -37,7 +40,7 @@ tests/data/mapchan-mono.sw: tests/audiogen$(HOSTEXESUF) |
| 37 | 37 |
@mkdir -p tests/data |
| 38 | 38 |
$(M)./$< $@ 22050 1 |
| 39 | 39 |
|
| 40 |
-tests/data/%.sw tests/vsynth%/00.pgm: TAG = GEN |
|
| 40 |
+tests/data/%.sw tests/data/asynth% tests/vsynth%/00.pgm: TAG = GEN |
|
| 41 | 41 |
|
| 42 | 42 |
include $(SRC_PATH)/tests/fate/aac.mak |
| 43 | 43 |
include $(SRC_PATH)/tests/fate/ac3.mak |
| ... | ... |
@@ -22,7 +22,9 @@ |
| 22 | 22 |
*/ |
| 23 | 23 |
|
| 24 | 24 |
#include <stdlib.h> |
| 25 |
+#include <stdint.h> |
|
| 25 | 26 |
#include <stdio.h> |
| 27 |
+#include <string.h> |
|
| 26 | 28 |
|
| 27 | 29 |
#define MAX_CHANNELS 8 |
| 28 | 30 |
|
| ... | ... |
@@ -93,12 +95,45 @@ static int int_cos(int a) |
| 93 | 93 |
|
| 94 | 94 |
FILE *outfile; |
| 95 | 95 |
|
| 96 |
-static void put_sample(int v) |
|
| 96 |
+static void put16(int16_t v) |
|
| 97 | 97 |
{
|
| 98 |
- fputc(v & 0xff, outfile); |
|
| 98 |
+ fputc( v & 0xff, outfile); |
|
| 99 | 99 |
fputc((v >> 8) & 0xff, outfile); |
| 100 | 100 |
} |
| 101 | 101 |
|
| 102 |
+static void put32(uint32_t v) |
|
| 103 |
+{
|
|
| 104 |
+ fputc( v & 0xff, outfile); |
|
| 105 |
+ fputc((v >> 8) & 0xff, outfile); |
|
| 106 |
+ fputc((v >> 16) & 0xff, outfile); |
|
| 107 |
+ fputc((v >> 24) & 0xff, outfile); |
|
| 108 |
+} |
|
| 109 |
+ |
|
| 110 |
+#define HEADER_SIZE 46 |
|
| 111 |
+#define FMT_SIZE 18 |
|
| 112 |
+#define SAMPLE_SIZE 2 |
|
| 113 |
+#define WFORMAT_PCM 0x0001 |
|
| 114 |
+ |
|
| 115 |
+static void put_wav_header(int sample_rate, int channels, int nb_samples) |
|
| 116 |
+{
|
|
| 117 |
+ int block_align = SAMPLE_SIZE * channels; |
|
| 118 |
+ int data_size = block_align * nb_samples; |
|
| 119 |
+ |
|
| 120 |
+ fputs("RIFF", outfile);
|
|
| 121 |
+ put32(HEADER_SIZE + data_size); |
|
| 122 |
+ fputs("WAVEfmt ", outfile);
|
|
| 123 |
+ put32(FMT_SIZE); |
|
| 124 |
+ put16(WFORMAT_PCM); |
|
| 125 |
+ put16(channels); |
|
| 126 |
+ put32(sample_rate); |
|
| 127 |
+ put32(block_align * sample_rate); |
|
| 128 |
+ put16(block_align); |
|
| 129 |
+ put16(SAMPLE_SIZE * 8); |
|
| 130 |
+ put16(0); |
|
| 131 |
+ fputs("data", outfile);
|
|
| 132 |
+ put32(data_size); |
|
| 133 |
+} |
|
| 134 |
+ |
|
| 102 | 135 |
int main(int argc, char **argv) |
| 103 | 136 |
{
|
| 104 | 137 |
int i, a, v, j, f, amp, ampa; |
| ... | ... |
@@ -107,10 +142,12 @@ int main(int argc, char **argv) |
| 107 | 107 |
int taba[MAX_CHANNELS]; |
| 108 | 108 |
int sample_rate = 44100; |
| 109 | 109 |
int nb_channels = 2; |
| 110 |
+ char *ext; |
|
| 110 | 111 |
|
| 111 | 112 |
if (argc < 2 || argc > 4) {
|
| 112 | 113 |
printf("usage: %s file [<sample rate> [<channels>]]\n"
|
| 113 | 114 |
"generate a test raw 16 bit audio stream\n" |
| 115 |
+ "If the file extension is .wav a WAVE header will be added.\n" |
|
| 114 | 116 |
"default: 44100 Hz stereo\n", argv[0]); |
| 115 | 117 |
exit(1); |
| 116 | 118 |
} |
| ... | ... |
@@ -137,12 +174,15 @@ int main(int argc, char **argv) |
| 137 | 137 |
return 1; |
| 138 | 138 |
} |
| 139 | 139 |
|
| 140 |
+ if ((ext = strrchr(argv[1], '.')) != NULL && !strcmp(ext, ".wav")) |
|
| 141 |
+ put_wav_header(sample_rate, nb_channels, 6 * sample_rate); |
|
| 142 |
+ |
|
| 140 | 143 |
/* 1 second of single freq sinus at 1000 Hz */ |
| 141 | 144 |
a = 0; |
| 142 | 145 |
for (i = 0; i < 1 * sample_rate; i++) {
|
| 143 | 146 |
v = (int_cos(a) * 10000) >> FRAC_BITS; |
| 144 | 147 |
for (j = 0; j < nb_channels; j++) |
| 145 |
- put_sample(v); |
|
| 148 |
+ put16(v); |
|
| 146 | 149 |
a += (1000 * FRAC_ONE) / sample_rate; |
| 147 | 150 |
} |
| 148 | 151 |
|
| ... | ... |
@@ -151,7 +191,7 @@ int main(int argc, char **argv) |
| 151 | 151 |
for (i = 0; i < 1 * sample_rate; i++) {
|
| 152 | 152 |
v = (int_cos(a) * 10000) >> FRAC_BITS; |
| 153 | 153 |
for (j = 0; j < nb_channels; j++) |
| 154 |
- put_sample(v); |
|
| 154 |
+ put16(v); |
|
| 155 | 155 |
f = 100 + (((10000 - 100) * i) / sample_rate); |
| 156 | 156 |
a += (f * FRAC_ONE) / sample_rate; |
| 157 | 157 |
} |
| ... | ... |
@@ -160,14 +200,14 @@ int main(int argc, char **argv) |
| 160 | 160 |
for (i = 0; i < sample_rate / 2; i++) {
|
| 161 | 161 |
v = myrnd(&seed, 20000) - 10000; |
| 162 | 162 |
for (j = 0; j < nb_channels; j++) |
| 163 |
- put_sample(v); |
|
| 163 |
+ put16(v); |
|
| 164 | 164 |
} |
| 165 | 165 |
|
| 166 | 166 |
/* 0.5 second of high amplitude white noise */ |
| 167 | 167 |
for (i = 0; i < sample_rate / 2; i++) {
|
| 168 | 168 |
v = myrnd(&seed, 65535) - 32768; |
| 169 | 169 |
for (j = 0; j < nb_channels; j++) |
| 170 |
- put_sample(v); |
|
| 170 |
+ put16(v); |
|
| 171 | 171 |
} |
| 172 | 172 |
|
| 173 | 173 |
/* 1 second of unrelated ramps for each channel */ |
| ... | ... |
@@ -179,7 +219,7 @@ int main(int argc, char **argv) |
| 179 | 179 |
for (i = 0; i < 1 * sample_rate; i++) {
|
| 180 | 180 |
for (j = 0; j < nb_channels; j++) {
|
| 181 | 181 |
v = (int_cos(taba[j]) * 10000) >> FRAC_BITS; |
| 182 |
- put_sample(v); |
|
| 182 |
+ put16(v); |
|
| 183 | 183 |
f = tabf1[j] + (((tabf2[j] - tabf1[j]) * i) / sample_rate); |
| 184 | 184 |
taba[j] += (f * FRAC_ONE) / sample_rate; |
| 185 | 185 |
} |
| ... | ... |
@@ -194,7 +234,7 @@ int main(int argc, char **argv) |
| 194 | 194 |
if (j & 1) |
| 195 | 195 |
amp = 10000 - amp; |
| 196 | 196 |
v = (int_cos(a) * amp) >> FRAC_BITS; |
| 197 |
- put_sample(v); |
|
| 197 |
+ put16(v); |
|
| 198 | 198 |
a += (500 * FRAC_ONE) / sample_rate; |
| 199 | 199 |
ampa += (2 * FRAC_ONE) / sample_rate; |
| 200 | 200 |
} |
| ... | ... |
@@ -395,16 +395,6 @@ do_audio_encoding g723_1.tco "-b:a 6.3k -ac 1 -ar 8000 -acodec g723_1" |
| 395 | 395 |
do_audio_decoding |
| 396 | 396 |
fi |
| 397 | 397 |
|
| 398 |
-if [ -n "$do_g722" ] ; then |
|
| 399 |
-do_audio_encoding g722.wav "-b 64k -ac 1 -ar 16000 -acodec g722" |
|
| 400 |
-do_audio_decoding |
|
| 401 |
-fi |
|
| 402 |
- |
|
| 403 |
-if [ -n "$do_g726" ] ; then |
|
| 404 |
-do_audio_encoding g726.wav "-b:a 32k -ac 1 -ar 8000 -acodec g726" |
|
| 405 |
-do_audio_decoding |
|
| 406 |
-fi |
|
| 407 |
- |
|
| 408 | 398 |
if [ -n "$do_adpcm_adx" ] ; then |
| 409 | 399 |
do_audio_encoding adpcm_adx.adx "-acodec adpcm_adx" |
| 410 | 400 |
do_audio_decoding |
| ... | ... |
@@ -534,6 +524,3 @@ fi |
| 534 | 534 |
if [ -n "$do_pcm_f64le" ] ; then |
| 535 | 535 |
do_audio_enc_dec wav dbl pcm_f64le |
| 536 | 536 |
fi |
| 537 |
-if [ -n "$do_pcm_s24daud" ] ; then |
|
| 538 |
-do_audio_enc_dec 302 s16 pcm_s24daud "-ac 6 -ar 96000" |
|
| 539 |
-fi |
| ... | ... |
@@ -25,5 +25,10 @@ fate-pcm_u8-stereo: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-2-8-raw.mov -f |
| 25 | 25 |
FATE_PCM += fate-w64 |
| 26 | 26 |
fate-w64: CMD = crc -i $(SAMPLES)/w64/w64-pcm16.w64 |
| 27 | 27 |
|
| 28 |
+FATE_PCM += fate-dcinema-encode |
|
| 29 |
+fate-dcinema-encode: tests/data/asynth-96000-6.wav |
|
| 30 |
+fate-dcinema-encode: SRC = tests/data/asynth-96000-6.wav |
|
| 31 |
+fate-dcinema-encode: CMD = enc_dec_pcm daud md5 s16le $(SRC) -c:a pcm_s24daud |
|
| 32 |
+ |
|
| 28 | 33 |
FATE_TESTS += $(FATE_PCM) |
| 29 | 34 |
fate-pcm: $(FATE_PCM) |
| ... | ... |
@@ -1,9 +1,36 @@ |
| 1 |
-FATE_VOICE += fate-g722dec-1 |
|
| 1 |
+FATE_G722 += fate-g722dec-1 |
|
| 2 | 2 |
fate-g722dec-1: CMD = framecrc -i $(SAMPLES)/g722/conf-adminmenu-162.g722 |
| 3 | 3 |
|
| 4 |
-FATE_VOICE += fate-g722enc |
|
| 5 |
-fate-g722enc: tests/data/asynth-16000-1.sw |
|
| 6 |
-fate-g722enc: CMD = md5 -ar 16000 -ac 1 -f s16le -i $(TARGET_PATH)/tests/data/asynth-16000-1.sw -acodec g722 -ac 1 -f g722 |
|
| 4 |
+FATE_G722 += fate-g722-encode |
|
| 5 |
+fate-g722-encode: tests/data/asynth-16000-1.wav |
|
| 6 |
+fate-g722-encode: SRC = tests/data/asynth-16000-1.wav |
|
| 7 |
+fate-g722-encode: CMD = enc_dec_pcm wav md5 s16le $(SRC) -c:a g722 |
|
| 8 |
+ |
|
| 9 |
+FATE_VOICE += $(FATE_G722) |
|
| 10 |
+fate-g722: $(FATE_G722) |
|
| 11 |
+ |
|
| 12 |
+FATE_G726 += fate-g726-encode-2bit |
|
| 13 |
+fate-g726-encode-2bit: tests/data/asynth-8000-1.wav |
|
| 14 |
+fate-g726-encode-2bit: SRC = tests/data/asynth-8000-1.wav |
|
| 15 |
+fate-g726-encode-2bit: CMD = enc_dec_pcm wav md5 s16le $(SRC) -c:a g726 -b:a 16k |
|
| 16 |
+ |
|
| 17 |
+FATE_G726 += fate-g726-encode-3bit |
|
| 18 |
+fate-g726-encode-3bit: tests/data/asynth-8000-1.wav |
|
| 19 |
+fate-g726-encode-3bit: SRC = tests/data/asynth-8000-1.wav |
|
| 20 |
+fate-g726-encode-3bit: CMD = enc_dec_pcm wav md5 s16le $(SRC) -c:a g726 -b:a 24k |
|
| 21 |
+ |
|
| 22 |
+FATE_G726 += fate-g726-encode-4bit |
|
| 23 |
+fate-g726-encode-4bit: tests/data/asynth-8000-1.wav |
|
| 24 |
+fate-g726-encode-4bit: SRC = tests/data/asynth-8000-1.wav |
|
| 25 |
+fate-g726-encode-4bit: CMD = enc_dec_pcm wav md5 s16le $(SRC) -c:a g726 -b:a 32k |
|
| 26 |
+ |
|
| 27 |
+FATE_G726 += fate-g726-encode-5bit |
|
| 28 |
+fate-g726-encode-5bit: tests/data/asynth-8000-1.wav |
|
| 29 |
+fate-g726-encode-5bit: SRC = tests/data/asynth-8000-1.wav |
|
| 30 |
+fate-g726-encode-5bit: CMD = enc_dec_pcm wav md5 s16le $(SRC) -c:a g726 -b:a 40k |
|
| 31 |
+ |
|
| 32 |
+FATE_VOICE += $(FATE_G726) |
|
| 33 |
+fate-g726: $(FATE_G726) |
|
| 7 | 34 |
|
| 8 | 35 |
FATE_GSM += fate-gsm-ms |
| 9 | 36 |
fate-gsm-ms: CMD = framecrc -i $(SAMPLES)/gsm/ciao.wav |
| ... | ... |
@@ -24,18 +24,18 @@ do_lavf_fate() |
| 24 | 24 |
do_lavf() |
| 25 | 25 |
{
|
| 26 | 26 |
file=${outfile}lavf.$1
|
| 27 |
- do_avconv $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -b:a 64k -t 1 -qscale:v 10 $2 |
|
| 28 |
- do_avconv_crc $file $DEC_OPTS -i $target_path/$file $3 |
|
| 27 |
+ do_avconv $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le $2 -i $pcm_src $ENC_OPTS -b:a 64k -t 1 -qscale:v 10 $3 |
|
| 28 |
+ do_avconv_crc $file $DEC_OPTS -i $target_path/$file $4 |
|
| 29 | 29 |
} |
| 30 | 30 |
|
| 31 |
-do_lavf_timecode_nodrop() { do_lavf $1 "$2 -timecode 02:56:14:13"; }
|
|
| 32 |
-do_lavf_timecode_drop() { do_lavf $1 "$2 -timecode 02:56:14.13 -r 30000/1001"; }
|
|
| 31 |
+do_lavf_timecode_nodrop() { do_lavf $1 "" "$2 -timecode 02:56:14:13"; }
|
|
| 32 |
+do_lavf_timecode_drop() { do_lavf $1 "" "$2 -timecode 02:56:14.13 -r 30000/1001"; }
|
|
| 33 | 33 |
|
| 34 | 34 |
do_lavf_timecode() |
| 35 | 35 |
{
|
| 36 | 36 |
do_lavf_timecode_nodrop "$@" |
| 37 | 37 |
do_lavf_timecode_drop "$@" |
| 38 |
- do_lavf "$@" |
|
| 38 |
+ do_lavf $1 "" "$2" |
|
| 39 | 39 |
} |
| 40 | 40 |
|
| 41 | 41 |
do_streamed_images() |
| ... | ... |
@@ -64,11 +64,11 @@ do_audio_only() |
| 64 | 64 |
} |
| 65 | 65 |
|
| 66 | 66 |
if [ -n "$do_avi" ] ; then |
| 67 |
-do_lavf avi "-acodec mp2 -ab 64k" |
|
| 67 |
+do_lavf avi "" "-acodec mp2 -ab 64k" |
|
| 68 | 68 |
fi |
| 69 | 69 |
|
| 70 | 70 |
if [ -n "$do_asf" ] ; then |
| 71 |
-do_lavf asf "-acodec mp2 -ab 64k" "-r 25" |
|
| 71 |
+do_lavf asf "" "-acodec mp2 -ab 64k" "-r 25" |
|
| 72 | 72 |
fi |
| 73 | 73 |
|
| 74 | 74 |
if [ -n "$do_rm" ] ; then |
| ... | ... |
@@ -87,15 +87,15 @@ do_lavf_timecode mxf "-ar 48000 -bf 2" |
| 87 | 87 |
fi |
| 88 | 88 |
|
| 89 | 89 |
if [ -n "$do_mxf_d10" ]; then |
| 90 |
-do_lavf mxf_d10 "-ar 48000 -ac 2 -r 25 -s 720x576 -vf pad=720:608:0:32 -vcodec mpeg2video -g 0 -flags +ildct+low_delay -dc 10 -non_linear_quant 1 -intra_vlc 1 -qscale 1 -ps 1 -qmin 1 -rc_max_vbv_use 1 -rc_min_vbv_use 1 -pix_fmt yuv422p -minrate 30000k -maxrate 30000k -b 30000k -bufsize 1200000 -top 1 -rc_init_occupancy 1200000 -qmax 12 -f mxf_d10" |
|
| 90 |
+do_lavf mxf_d10 "-ar 48000 -ac 2" "-r 25 -s 720x576 -vf pad=720:608:0:32 -vcodec mpeg2video -g 0 -flags +ildct+low_delay -dc 10 -non_linear_quant 1 -intra_vlc 1 -qscale 1 -ps 1 -qmin 1 -rc_max_vbv_use 1 -rc_min_vbv_use 1 -pix_fmt yuv422p -minrate 30000k -maxrate 30000k -b 30000k -bufsize 1200000 -top 1 -rc_init_occupancy 1200000 -qmax 12 -f mxf_d10" |
|
| 91 | 91 |
fi |
| 92 | 92 |
|
| 93 | 93 |
if [ -n "$do_ts" ] ; then |
| 94 |
-do_lavf ts "-ab 64k -mpegts_transport_stream_id 42" |
|
| 94 |
+do_lavf ts "" "-ab 64k -mpegts_transport_stream_id 42" |
|
| 95 | 95 |
fi |
| 96 | 96 |
|
| 97 | 97 |
if [ -n "$do_swf" ] ; then |
| 98 |
-do_lavf swf -an |
|
| 98 |
+do_lavf swf "" "-an" |
|
| 99 | 99 |
fi |
| 100 | 100 |
|
| 101 | 101 |
if [ -n "$do_ffm" ] ; then |
| ... | ... |
@@ -103,11 +103,11 @@ do_lavf ffm "-ab 64k" |
| 103 | 103 |
fi |
| 104 | 104 |
|
| 105 | 105 |
if [ -n "$do_flv_fmt" ] ; then |
| 106 |
-do_lavf flv -an |
|
| 106 |
+do_lavf flv "" "-an" |
|
| 107 | 107 |
fi |
| 108 | 108 |
|
| 109 | 109 |
if [ -n "$do_mov" ] ; then |
| 110 |
-do_lavf mov "-movflags +rtphint -acodec pcm_alaw -vcodec mpeg4" |
|
| 110 |
+do_lavf mov "" "-movflags +rtphint -acodec pcm_alaw -vcodec mpeg4" |
|
| 111 | 111 |
do_lavf_timecode mov "-acodec pcm_alaw -vcodec mpeg4" |
| 112 | 112 |
fi |
| 113 | 113 |
|
| ... | ... |
@@ -118,21 +118,21 @@ fi |
| 118 | 118 |
if [ -n "$do_dv_fmt" ] ; then |
| 119 | 119 |
do_lavf_timecode_nodrop dv "-ar 48000 -r 25 -s pal -ac 2" |
| 120 | 120 |
do_lavf_timecode_drop dv "-ar 48000 -pix_fmt yuv411p -s ntsc -ac 2" |
| 121 |
-do_lavf dv "-ar 48000 -r 25 -s pal -ac 2" |
|
| 121 |
+do_lavf dv "-ar 48000" "-r 25 -s pal -ac 2" |
|
| 122 | 122 |
fi |
| 123 | 123 |
|
| 124 | 124 |
if [ -n "$do_gxf" ] ; then |
| 125 | 125 |
do_lavf_timecode_nodrop gxf "-ar 48000 -r 25 -s pal -ac 1" |
| 126 | 126 |
do_lavf_timecode_drop gxf "-ar 48000 -s ntsc -ac 1" |
| 127 |
-do_lavf gxf "-ar 48000 -r 25 -s pal -ac 1" |
|
| 127 |
+do_lavf gxf "-ar 48000" "-r 25 -s pal -ac 1" |
|
| 128 | 128 |
fi |
| 129 | 129 |
|
| 130 | 130 |
if [ -n "$do_nut" ] ; then |
| 131 |
-do_lavf nut "-acodec mp2 -ab 64k" |
|
| 131 |
+do_lavf nut "" "-acodec mp2 -ab 64k" |
|
| 132 | 132 |
fi |
| 133 | 133 |
|
| 134 | 134 |
if [ -n "$do_mkv" ] ; then |
| 135 |
-do_lavf mkv "-acodec mp2 -ab 64k -vcodec mpeg4" |
|
| 135 |
+do_lavf mkv "" "-acodec mp2 -ab 64k -vcodec mpeg4" |
|
| 136 | 136 |
fi |
| 137 | 137 |
|
| 138 | 138 |
if [ -n "$do_mp3" ] ; then |
| ... | ... |
@@ -150,7 +150,7 @@ do_lavf_fate ogg "vp3/coeff_level64.mkv" |
| 150 | 150 |
fi |
| 151 | 151 |
|
| 152 | 152 |
if [ -n "$do_wtv" ] ; then |
| 153 |
-do_lavf wtv "-acodec mp2" |
|
| 153 |
+do_lavf wtv "" "-acodec mp2" |
|
| 154 | 154 |
fi |
| 155 | 155 |
|
| 156 | 156 |
|
| 5 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,4 +0,0 @@ |
| 1 |
-1b75d5198ae789ab3c48f7024e08f4a9 *./tests/data/acodec/pcm_s24daud.302 |
|
| 2 |
-10368730 ./tests/data/acodec/pcm_s24daud.302 |
|
| 3 |
-70ec0ba6bc151ddc7509c09804d95d3b *./tests/data/pcm_s24daud.acodec.out.wav |
|
| 4 |
-stddev: 8967.92 PSNR: 17.28 MAXDIFF:42548 bytes: 6911796/ 1058400 |
| ... | ... |
@@ -4,6 +4,6 @@ |
| 4 | 4 |
cc33ae4f9e6828914dea0f09d1241b7e *./tests/data/lavf/lavf.dv |
| 5 | 5 |
3480000 ./tests/data/lavf/lavf.dv |
| 6 | 6 |
./tests/data/lavf/lavf.dv CRC=0x8d5e9e8f |
| 7 |
-3a6a9163a67b729b4a6b5d972ccceb97 *./tests/data/lavf/lavf.dv |
|
| 7 |
+b36c83cd0ba0ebe719f09f885c4bbcd3 *./tests/data/lavf/lavf.dv |
|
| 8 | 8 |
3600000 ./tests/data/lavf/lavf.dv |
| 9 |
-./tests/data/lavf/lavf.dv CRC=0x5ce4e5e4 |
|
| 9 |
+./tests/data/lavf/lavf.dv CRC=0x2bc2ae3a |
| ... | ... |
@@ -4,6 +4,6 @@ befc1a39c37a4ecd9264942a3e34b3f6 *./tests/data/lavf/lavf.gxf |
| 4 | 4 |
267d2b2b6e357209d76c366302cf35c3 *./tests/data/lavf/lavf.gxf |
| 5 | 5 |
794572 ./tests/data/lavf/lavf.gxf |
| 6 | 6 |
./tests/data/lavf/lavf.gxf CRC=0xab47d02d |
| 7 |
-1c1693cf2358025f1e37ac76e1da925a *./tests/data/lavf/lavf.gxf |
|
| 7 |
+0a1a37fa79b62435545271b4e8e882f5 *./tests/data/lavf/lavf.gxf |
|
| 8 | 8 |
796392 ./tests/data/lavf/lavf.gxf |
| 9 |
-./tests/data/lavf/lavf.gxf CRC=0x102918fd |
|
| 9 |
+./tests/data/lavf/lavf.gxf CRC=0x3b1a8e91 |
| ... | ... |
@@ -1,3 +1,3 @@ |
| 1 |
-23177c8a72f34e243e9ffc4f6c70d3c7 *./tests/data/lavf/lavf.mxf_d10 |
|
| 1 |
+0d72247067569901a2e351586ddc0b82 *./tests/data/lavf/lavf.mxf_d10 |
|
| 2 | 2 |
5330989 ./tests/data/lavf/lavf.mxf_d10 |
| 3 |
-./tests/data/lavf/lavf.mxf_d10 CRC=0x81602ff1 |
|
| 3 |
+./tests/data/lavf/lavf.mxf_d10 CRC=0x4474d480 |
| 4 | 4 |
deleted file mode 100644 |
| ... | ... |
@@ -1,53 +0,0 @@ |
| 1 |
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 |
|
| 2 |
-ret: 0 st:-1 flags:0 ts:-1.000000 |
|
| 3 |
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 |
|
| 4 |
-ret: 0 st:-1 flags:1 ts: 1.894167 |
|
| 5 |
-ret: 0 st: 0 flags:1 dts: 1.894000 pts: 1.894000 pos: 7634 size: 4096 |
|
| 6 |
-ret: 0 st: 0 flags:0 ts: 0.788375 |
|
| 7 |
-ret: 0 st: 0 flags:1 dts: 0.788500 pts: 0.788500 pos: 3212 size: 4096 |
|
| 8 |
-ret: 0 st: 0 flags:1 ts:-0.317500 |
|
| 9 |
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 |
|
| 10 |
-ret: 0 st:-1 flags:0 ts: 2.576668 |
|
| 11 |
-ret: 0 st: 0 flags:1 dts: 2.576750 pts: 2.576750 pos: 10365 size: 4096 |
|
| 12 |
-ret: 0 st:-1 flags:1 ts: 1.470835 |
|
| 13 |
-ret: 0 st: 0 flags:1 dts: 1.470750 pts: 1.470750 pos: 5941 size: 4096 |
|
| 14 |
-ret: 0 st: 0 flags:0 ts: 0.365000 |
|
| 15 |
-ret: 0 st: 0 flags:1 dts: 0.365000 pts: 0.365000 pos: 1518 size: 4096 |
|
| 16 |
-ret: 0 st: 0 flags:1 ts:-0.740875 |
|
| 17 |
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 |
|
| 18 |
-ret: 0 st:-1 flags:0 ts: 2.153336 |
|
| 19 |
-ret: 0 st: 0 flags:1 dts: 2.153500 pts: 2.153500 pos: 8672 size: 4096 |
|
| 20 |
-ret: 0 st:-1 flags:1 ts: 1.047503 |
|
| 21 |
-ret: 0 st: 0 flags:1 dts: 1.047500 pts: 1.047500 pos: 4248 size: 4096 |
|
| 22 |
-ret: 0 st: 0 flags:0 ts:-0.058375 |
|
| 23 |
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 |
|
| 24 |
-ret: 0 st: 0 flags:1 ts: 2.835875 |
|
| 25 |
-ret: 0 st: 0 flags:1 dts: 2.835750 pts: 2.835750 pos: 11401 size: 4096 |
|
| 26 |
-ret: 0 st:-1 flags:0 ts: 1.730004 |
|
| 27 |
-ret: 0 st: 0 flags:1 dts: 1.730000 pts: 1.730000 pos: 6978 size: 4096 |
|
| 28 |
-ret: 0 st:-1 flags:1 ts: 0.624171 |
|
| 29 |
-ret: 0 st: 0 flags:1 dts: 0.624000 pts: 0.624000 pos: 2554 size: 4096 |
|
| 30 |
-ret: 0 st: 0 flags:0 ts:-0.481625 |
|
| 31 |
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 |
|
| 32 |
-ret: 0 st: 0 flags:1 ts: 2.412500 |
|
| 33 |
-ret: 0 st: 0 flags:1 dts: 2.412500 pts: 2.412500 pos: 9708 size: 4096 |
|
| 34 |
-ret: 0 st:-1 flags:0 ts: 1.306672 |
|
| 35 |
-ret: 0 st: 0 flags:1 dts: 1.306750 pts: 1.306750 pos: 5285 size: 4096 |
|
| 36 |
-ret: 0 st:-1 flags:1 ts: 0.200839 |
|
| 37 |
-ret: 0 st: 0 flags:1 dts: 0.200750 pts: 0.200750 pos: 861 size: 4096 |
|
| 38 |
-ret: 0 st: 0 flags:0 ts:-0.905000 |
|
| 39 |
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 |
|
| 40 |
-ret: 0 st: 0 flags:1 ts: 1.989125 |
|
| 41 |
-ret: 0 st: 0 flags:1 dts: 1.989000 pts: 1.989000 pos: 8014 size: 4096 |
|
| 42 |
-ret: 0 st:-1 flags:0 ts: 0.883340 |
|
| 43 |
-ret: 0 st: 0 flags:1 dts: 0.883500 pts: 0.883500 pos: 3592 size: 4096 |
|
| 44 |
-ret: 0 st:-1 flags:1 ts:-0.222493 |
|
| 45 |
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 |
|
| 46 |
-ret: 0 st: 0 flags:0 ts: 2.671625 |
|
| 47 |
-ret: 0 st: 0 flags:1 dts: 2.671750 pts: 2.671750 pos: 10745 size: 4096 |
|
| 48 |
-ret: 0 st: 0 flags:1 ts: 1.565875 |
|
| 49 |
-ret: 0 st: 0 flags:1 dts: 1.565750 pts: 1.565750 pos: 6321 size: 4096 |
|
| 50 |
-ret: 0 st:-1 flags:0 ts: 0.460008 |
|
| 51 |
-ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 1898 size: 4096 |
|
| 52 |
-ret: 0 st:-1 flags:1 ts:-0.645825 |
|
| 53 |
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 |
| 54 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,27 +0,0 @@ |
| 1 |
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 4 size: 39816 |
|
| 2 |
-ret:-1 st:-1 flags:0 ts:-1.000000 |
|
| 3 |
-ret:-1 st:-1 flags:1 ts: 1.894167 |
|
| 4 |
-ret:-1 st: 0 flags:0 ts: 0.788333 |
|
| 5 |
-ret:-1 st: 0 flags:1 ts:-0.317500 |
|
| 6 |
-ret:-1 st:-1 flags:0 ts: 2.576668 |
|
| 7 |
-ret:-1 st:-1 flags:1 ts: 1.470835 |
|
| 8 |
-ret:-1 st: 0 flags:0 ts: 0.365000 |
|
| 9 |
-ret:-1 st: 0 flags:1 ts:-0.740833 |
|
| 10 |
-ret:-1 st:-1 flags:0 ts: 2.153336 |
|
| 11 |
-ret:-1 st:-1 flags:1 ts: 1.047503 |
|
| 12 |
-ret:-1 st: 0 flags:0 ts:-0.058333 |
|
| 13 |
-ret:-1 st: 0 flags:1 ts: 2.835833 |
|
| 14 |
-ret:-1 st:-1 flags:0 ts: 1.730004 |
|
| 15 |
-ret:-1 st:-1 flags:1 ts: 0.624171 |
|
| 16 |
-ret:-1 st: 0 flags:0 ts:-0.481667 |
|
| 17 |
-ret:-1 st: 0 flags:1 ts: 2.412500 |
|
| 18 |
-ret:-1 st:-1 flags:0 ts: 1.306672 |
|
| 19 |
-ret:-1 st:-1 flags:1 ts: 0.200839 |
|
| 20 |
-ret:-1 st: 0 flags:0 ts:-0.904989 |
|
| 21 |
-ret:-1 st: 0 flags:1 ts: 1.989178 |
|
| 22 |
-ret:-1 st:-1 flags:0 ts: 0.883340 |
|
| 23 |
-ret:-1 st:-1 flags:1 ts:-0.222493 |
|
| 24 |
-ret:-1 st: 0 flags:0 ts: 2.671678 |
|
| 25 |
-ret:-1 st: 0 flags:1 ts: 1.565844 |
|
| 26 |
-ret:-1 st:-1 flags:0 ts: 0.460008 |
|
| 27 |
-ret:-1 st:-1 flags:1 ts:-0.645825 |