From fcd0298c05c28429ef8508c924288131c87830b5 Mon Sep 17 00:00:00 2001 From: Jordi Ortiz Date: Fri, 4 May 2012 17:50:31 +0200 Subject: rtsp: Add content-type message header parsing Signed-off-by: Luca Barbato --- libavformat/rtsp.c | 3 +++ libavformat/rtsp.h | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 2ad2c4dcf2..31eb4befd6 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -870,6 +870,9 @@ void ff_rtsp_parse_line(RTSPMessageHeader *reply, const char *buf, } else if (av_stristart(p, "x-Accept-Dynamic-Rate:", &p) && rt) { p += strspn(p, SPACE_CHARS); rt->accept_dynamic_rate = atoi(p); + } else if (av_stristart(p, "Content-Type:", &p)) { + p += strspn(p, SPACE_CHARS); + av_strlcpy(reply->content_type, p, sizeof(reply->content_type)); } } diff --git a/libavformat/rtsp.h b/libavformat/rtsp.h index 6872a51a24..e512336ab0 100644 --- a/libavformat/rtsp.h +++ b/libavformat/rtsp.h @@ -171,6 +171,11 @@ typedef struct RTSPMessageHeader { * returned */ char reason[256]; + + /** + * Content type header + */ + char content_type[64]; } RTSPMessageHeader; /** -- cgit v1.2.3 From 3607dc2b1a64ab74b823a3efbeda5097e533e62c Mon Sep 17 00:00:00 2001 From: Alex Converse Date: Mon, 7 May 2012 11:57:11 -0700 Subject: doc: Replace a stray reference to the old '-intra' flag. --- doc/avconv.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/avconv.texi b/doc/avconv.texi index bf72c4c922..cc46e95392 100644 --- a/doc/avconv.texi +++ b/doc/avconv.texi @@ -712,7 +712,7 @@ frame rate or decrease the frame size. @item If your computer is not fast enough, you can speed up the compression at the expense of the compression ratio. You can use -'-me zero' to speed up motion estimation, and '-intra' to disable +'-me zero' to speed up motion estimation, and '-g 0' to disable motion estimation completely (you have only I-frames, which means it is about as good as JPEG compression). -- cgit v1.2.3 From 40f81769aec24a93563cd547e02ba8478aa95849 Mon Sep 17 00:00:00 2001 From: Alex Converse Date: Mon, 7 May 2012 16:25:12 -0700 Subject: options_table: Add some missing #includes to fix "make checkheaders". Signed-off-by: Diego Biurrun --- libavcodec/options_table.h | 6 ++++++ libavformat/options_table.h | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h index 1e2560c941..eed3bdb483 100644 --- a/libavcodec/options_table.h +++ b/libavcodec/options_table.h @@ -20,6 +20,12 @@ #ifndef AVCODEC_OPTIONS_TABLE #define AVCODEC_OPTIONS_TABLE +#include +#include + +#include "libavutil/opt.h" +#include "avcodec.h" + #define OFFSET(x) offsetof(AVCodecContext,x) #define DEFAULT 0 //should be NAN but it does not work as it is not a constant in glibc as required by ANSI/ISO C //these names are too long to be readable diff --git a/libavformat/options_table.h b/libavformat/options_table.h index 683596c206..58f3dcff68 100644 --- a/libavformat/options_table.h +++ b/libavformat/options_table.h @@ -19,6 +19,11 @@ #ifndef AVFORMAT_OPTIONS_TABLE #define AVFORMAT_OPTIONS_TABLE +#include + +#include "libavutil/opt.h" +#include "avformat.h" + #define OFFSET(x) offsetof(AVFormatContext,x) #define DEFAULT 0 //should be NAN but it does not work as it is not a constant in glibc as required by ANSI/ISO C //these names are too long to be readable -- cgit v1.2.3 From 38f06a1415cf8394cf60f7b7a3cad84a3659beb4 Mon Sep 17 00:00:00 2001 From: Jordi Ortiz Date: Tue, 8 May 2012 19:20:32 +0200 Subject: libschroedingerdec: Change AVPicture to AVFrame and use SchroTag to store pts Signed-off-by: Luca Barbato --- libavcodec/libschroedingerdec.c | 97 ++++++++++++++++++++++++++++------------- 1 file changed, 67 insertions(+), 30 deletions(-) diff --git a/libavcodec/libschroedingerdec.c b/libavcodec/libschroedingerdec.c index 6a3b9bdb99..77f42899c1 100644 --- a/libavcodec/libschroedingerdec.c +++ b/libavcodec/libschroedingerdec.c @@ -28,6 +28,7 @@ */ #include "libavutil/imgutils.h" +#include "libavutil/intreadwrite.h" #include "avcodec.h" #include "libschroedinger.h" @@ -39,6 +40,12 @@ #include #include +/** SchroFrame and Pts relation */ +typedef struct LibSchroFrameContext { + SchroFrame *frame; + int64_t pts; +} LibSchroFrameContext; + /** libschroedinger decoder private data */ typedef struct SchroDecoderParams { /** Schroedinger video format */ @@ -60,7 +67,7 @@ typedef struct SchroDecoderParams { int eos_pulled; /** decoded picture */ - AVPicture dec_pic; + AVFrame dec_frame; } SchroDecoderParams; typedef struct SchroParseUnitContext { @@ -171,8 +178,8 @@ static void libschroedinger_handle_first_access_unit(AVCodecContext *avccontext) p_schro_params->format = schro_decoder_get_video_format(decoder); /* Tell Libav about sequence details. */ - if (av_image_check_size(p_schro_params->format->width, p_schro_params->format->height, - 0, avccontext) < 0) { + if (av_image_check_size(p_schro_params->format->width, + p_schro_params->format->height, 0, avccontext) < 0) { av_log(avccontext, AV_LOG_ERROR, "invalid dimensions (%dx%d)\n", p_schro_params->format->width, p_schro_params->format->height); avccontext->height = avccontext->width = 0; @@ -192,12 +199,6 @@ static void libschroedinger_handle_first_access_unit(AVCodecContext *avccontext) avccontext->time_base.den = p_schro_params->format->frame_rate_numerator; avccontext->time_base.num = p_schro_params->format->frame_rate_denominator; - - if (!p_schro_params->dec_pic.data[0]) - avpicture_alloc(&p_schro_params->dec_pic, - avccontext->pix_fmt, - avccontext->width, - avccontext->height); } static int libschroedinger_decode_frame(AVCodecContext *avccontext, @@ -206,16 +207,18 @@ static int libschroedinger_decode_frame(AVCodecContext *avccontext, { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; + int64_t pts = avpkt->pts; + SchroTag *tag; SchroDecoderParams *p_schro_params = avccontext->priv_data; SchroDecoder *decoder = p_schro_params->decoder; - AVPicture *picture = data; SchroBuffer *enc_buf; SchroFrame* frame; int state; int go = 1; int outer = 1; SchroParseUnitContext parse_ctx; + LibSchroFrameContext *framewithpts = NULL; *data_size = 0; @@ -230,6 +233,13 @@ static int libschroedinger_decode_frame(AVCodecContext *avccontext, /* Loop through all the individual parse units in the input buffer */ do { if ((enc_buf = find_next_parse_unit(&parse_ctx))) { + /* Set Schrotag with the pts to be recovered after decoding*/ + enc_buf->tag = schro_tag_new(av_malloc(sizeof(int64_t)), av_free); + if (!enc_buf->tag->value) { + av_log(avccontext, AV_LOG_ERROR, "Unable to allocate SchroTag\n"); + return AVERROR(ENOMEM); + } + AV_WN(64, enc_buf->tag->value, pts); /* Push buffer into decoder. */ if (SCHRO_PARSE_CODE_IS_PICTURE(enc_buf->data[4]) && SCHRO_PARSE_CODE_NUM_REFS(enc_buf->data[4]) > 0) @@ -263,11 +273,21 @@ static int libschroedinger_decode_frame(AVCodecContext *avccontext, case SCHRO_DECODER_OK: /* Pull a frame out of the decoder. */ + tag = schro_decoder_get_picture_tag(decoder); frame = schro_decoder_pull(decoder); - if (frame) + if (frame) { + /* Add relation between schroframe and pts. */ + framewithpts = av_malloc(sizeof(LibSchroFrameContext)); + if (!framewithpts) { + av_log(avccontext, AV_LOG_ERROR, "Unable to allocate FrameWithPts\n"); + return AVERROR(ENOMEM); + } + framewithpts->frame = frame; + framewithpts->pts = AV_RN64(tag->value); ff_schro_queue_push_back(&p_schro_params->dec_frame_queue, - frame); + framewithpts); + } break; case SCHRO_DECODER_EOS: go = 0; @@ -284,30 +304,46 @@ static int libschroedinger_decode_frame(AVCodecContext *avccontext, } while (outer); /* Grab next frame to be returned from the top of the queue. */ - frame = ff_schro_queue_pop(&p_schro_params->dec_frame_queue); + framewithpts = ff_schro_queue_pop(&p_schro_params->dec_frame_queue); + + if (framewithpts && framewithpts->frame) { + if (p_schro_params->dec_frame.data[0]) + avccontext->release_buffer(avccontext, &p_schro_params->dec_frame); + if (avccontext->get_buffer(avccontext, &p_schro_params->dec_frame) < 0) { + av_log(avccontext, AV_LOG_ERROR, "Unable to allocate buffer\n"); + return AVERROR(ENOMEM); + } - if (frame) { - memcpy(p_schro_params->dec_pic.data[0], - frame->components[0].data, - frame->components[0].length); + memcpy(p_schro_params->dec_frame.data[0], + framewithpts->frame->components[0].data, + framewithpts->frame->components[0].length); - memcpy(p_schro_params->dec_pic.data[1], - frame->components[1].data, - frame->components[1].length); + memcpy(p_schro_params->dec_frame.data[1], + framewithpts->frame->components[1].data, + framewithpts->frame->components[1].length); - memcpy(p_schro_params->dec_pic.data[2], - frame->components[2].data, - frame->components[2].length); + memcpy(p_schro_params->dec_frame.data[2], + framewithpts->frame->components[2].data, + framewithpts->frame->components[2].length); - /* Fill picture with current buffer data from Schroedinger. */ - avpicture_fill(picture, p_schro_params->dec_pic.data[0], - avccontext->pix_fmt, - avccontext->width, avccontext->height); + /* Fill frame with current buffer data from Schroedinger. */ + p_schro_params->dec_frame.format = -1; /* Unknown -1 */ + p_schro_params->dec_frame.width = framewithpts->frame->width; + p_schro_params->dec_frame.height = framewithpts->frame->height; + p_schro_params->dec_frame.pkt_pts = framewithpts->pts; + p_schro_params->dec_frame.linesize[0] = framewithpts->frame->components[0].stride; + p_schro_params->dec_frame.linesize[1] = framewithpts->frame->components[1].stride; + p_schro_params->dec_frame.linesize[2] = framewithpts->frame->components[2].stride; - *data_size = sizeof(AVPicture); + *(AVFrame*)data = p_schro_params->dec_frame; + *data_size = sizeof(AVFrame); /* Now free the frame resources. */ - libschroedinger_decode_frame_free(frame); + libschroedinger_decode_frame_free(framewithpts->frame); + av_free(framewithpts); + } else { + data = NULL; + *data_size = 0; } return buf_size; } @@ -320,7 +356,8 @@ static av_cold int libschroedinger_decode_close(AVCodecContext *avccontext) schro_decoder_free(p_schro_params->decoder); av_freep(&p_schro_params->format); - avpicture_free(&p_schro_params->dec_pic); + if (p_schro_params->dec_frame.data[0]) + avccontext->release_buffer(avccontext, &p_schro_params->dec_frame); /* Free data in the output frame queue. */ ff_schro_queue_free(&p_schro_params->dec_frame_queue, -- cgit v1.2.3 From 5699884c2e2b76c43df405b8613e40a953338738 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Sat, 21 Apr 2012 14:03:05 +0200 Subject: sctp: Initial tcp-alike sctp support with streams Signed-off-by: Jordi Ortiz Signed-off-by: Luca Barbato --- configure | 3 + libavformat/Makefile | 1 + libavformat/allformats.c | 1 + libavformat/sctp.c | 328 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 333 insertions(+) create mode 100644 libavformat/sctp.c diff --git a/configure b/configure index 837e296fa8..67cba5a795 100755 --- a/configure +++ b/configure @@ -1110,6 +1110,7 @@ HAVE_LIST=" memalign mkstemp mmap + netinet_sctp_h poll_h posix_memalign round @@ -1513,6 +1514,7 @@ mmst_protocol_deps="network" rtmp_protocol_deps="!librtmp_protocol" rtmp_protocol_select="tcp_protocol" rtp_protocol_select="udp_protocol" +sctp_protocol_deps="network netinet_sctp_h" tcp_protocol_deps="network" tls_protocol_deps_any="openssl gnutls" tls_protocol_select="tcp_protocol" @@ -2846,6 +2848,7 @@ if enabled network; then check_type netinet/in.h "struct sockaddr_in6" check_type "sys/types.h sys/socket.h" "struct sockaddr_storage" check_struct "sys/types.h sys/socket.h" "struct sockaddr" sa_len + check_header netinet/sctp.h # Prefer arpa/inet.h over winsock2 if check_header arpa/inet.h ; then check_func closesocket diff --git a/libavformat/Makefile b/libavformat/Makefile index 9a6cb558ea..00b65e498a 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -348,6 +348,7 @@ OBJS-$(CONFIG_MD5_PROTOCOL) += md5proto.o OBJS-$(CONFIG_PIPE_PROTOCOL) += file.o OBJS-$(CONFIG_RTMP_PROTOCOL) += rtmpproto.o rtmppkt.o OBJS-$(CONFIG_RTP_PROTOCOL) += rtpproto.o +OBJS-$(CONFIG_SCTP_PROTOCOL) += sctp.o OBJS-$(CONFIG_TCP_PROTOCOL) += tcp.o OBJS-$(CONFIG_TLS_PROTOCOL) += tls.o OBJS-$(CONFIG_UDP_PROTOCOL) += udp.o diff --git a/libavformat/allformats.c b/libavformat/allformats.c index f5be7aacb1..1b7badea8f 100644 --- a/libavformat/allformats.c +++ b/libavformat/allformats.c @@ -257,6 +257,7 @@ void av_register_all(void) REGISTER_PROTOCOL (PIPE, pipe); REGISTER_PROTOCOL (RTMP, rtmp); REGISTER_PROTOCOL (RTP, rtp); + REGISTER_PROTOCOL (SCTP, sctp); REGISTER_PROTOCOL (TCP, tcp); REGISTER_PROTOCOL (TLS, tls); REGISTER_PROTOCOL (UDP, udp); diff --git a/libavformat/sctp.c b/libavformat/sctp.c new file mode 100644 index 0000000000..3823e03ebe --- /dev/null +++ b/libavformat/sctp.c @@ -0,0 +1,328 @@ +/* + * SCTP protocol + * Copyright (c) 2012 Luca Barbato + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * + * sctp url_protocol + * + * url syntax: sctp://host:port[?option=val...] + * option: 'listen' : listen for an incoming connection + * 'max_streams=n' : set the maximum number of streams + * 'reuse=1' : enable reusing the socket [TBD] + * + * by setting the maximum number of streams the protocol will use the + * first two bytes of the incoming/outgoing buffer to store the + * stream number of the packet being read/written. + * @see sctp_read + * @see sctp_write + */ + + +#include +#include +#include +#include + +#include "config.h" + +#if HAVE_POLL_H +#include +#endif + +#include "libavutil/intreadwrite.h" +#include "libavutil/parseutils.h" +#include "avformat.h" +#include "internal.h" +#include "network.h" +#include "os_support.h" +#include "url.h" + +/* + * The sctp_recvmsg and sctp_sendmsg functions are part of the user + * library that offers support + * for the SCTP kernel Implementation. The main purpose of this + * code is to provide the SCTP Socket API mappings for user + * application to interface with the SCTP in kernel. + * + * This implementation is based on the Socket API Extensions for SCTP + * defined in + * + * Copyright (c) 2003 International Business Machines, Corp. + * + * Written or modified by: + * Ryan Layer + */ + +static int ff_sctp_recvmsg(int s, void *msg, size_t len, struct sockaddr *from, + socklen_t *fromlen, struct sctp_sndrcvinfo *sinfo, + int *msg_flags) +{ + int recvb; + struct iovec iov; + char incmsg[CMSG_SPACE(sizeof(struct sctp_sndrcvinfo))]; + struct msghdr inmsg = { 0 }; + struct cmsghdr *cmsg = NULL; + + iov.iov_base = msg; + iov.iov_len = len; + + inmsg.msg_name = from; + inmsg.msg_namelen = fromlen ? *fromlen : 0; + inmsg.msg_iov = &iov; + inmsg.msg_iovlen = 1; + inmsg.msg_control = incmsg; + inmsg.msg_controllen = sizeof(incmsg); + + if ((recvb = recvmsg(s, &inmsg, msg_flags ? *msg_flags : 0)) < 0) + return recvb; + + if (fromlen) + *fromlen = inmsg.msg_namelen; + if (msg_flags) + *msg_flags = inmsg.msg_flags; + + for (cmsg = CMSG_FIRSTHDR(&inmsg); cmsg != NULL; + cmsg = CMSG_NXTHDR(&inmsg, cmsg)) { + if ((IPPROTO_SCTP == cmsg->cmsg_level) && + (SCTP_SNDRCV == cmsg->cmsg_type)) + break; + } + + /* Copy sinfo. */ + if (cmsg) + memcpy(sinfo, CMSG_DATA(cmsg), sizeof(struct sctp_sndrcvinfo)); + + return recvb; +} + +static int ff_sctp_send(int s, const void *msg, size_t len, + const struct sctp_sndrcvinfo *sinfo, int flags) +{ + struct msghdr outmsg; + struct iovec iov; + + outmsg.msg_name = NULL; + outmsg.msg_namelen = 0; + outmsg.msg_iov = &iov; + iov.iov_base = msg; + iov.iov_len = len; + outmsg.msg_iovlen = 1; + outmsg.msg_controllen = 0; + + if (sinfo) { + char outcmsg[CMSG_SPACE(sizeof(struct sctp_sndrcvinfo))]; + struct cmsghdr *cmsg; + + outmsg.msg_control = outcmsg; + outmsg.msg_controllen = sizeof(outcmsg); + outmsg.msg_flags = 0; + + cmsg = CMSG_FIRSTHDR(&outmsg); + cmsg->cmsg_level = IPPROTO_SCTP; + cmsg->cmsg_type = SCTP_SNDRCV; + cmsg->cmsg_len = CMSG_LEN(sizeof(struct sctp_sndrcvinfo)); + + outmsg.msg_controllen = cmsg->cmsg_len; + memcpy(CMSG_DATA(cmsg), sinfo, sizeof(struct sctp_sndrcvinfo)); + } + + return sendmsg(s, &outmsg, flags); +} + +typedef struct SCTPContext { + int fd; + int max_streams; + struct sockaddr_storage dest_addr; + socklen_t dest_addr_len; +} SCTPContext; + +static int sctp_open(URLContext *h, const char *uri, int flags) +{ + struct addrinfo *ai, *cur_ai; + struct addrinfo hints = { 0 }; + struct sctp_event_subscribe event = { 0 }; + struct sctp_initmsg initparams = { 0 }; + int port; + int fd = -1; + SCTPContext *s = h->priv_data; + const char *p; + char buf[256]; + int ret, listen_socket = 0; + char hostname[1024], proto[1024], path[1024]; + char portstr[10]; + + av_url_split(proto, sizeof(proto), NULL, 0, hostname, sizeof(hostname), + &port, path, sizeof(path), uri); + if (strcmp(proto,"sctp") || port <= 0 || port >= 65536) + return AVERROR(EINVAL); + + s->max_streams = 0; + p = strchr(uri, '?'); + if (p) { + if (av_find_info_tag(buf, sizeof(buf), "listen", p)) + listen_socket = 1; + if (av_find_info_tag(buf, sizeof(buf), "max_streams", p)) + s->max_streams = strtol(buf, NULL, 10); + } + + hints.ai_family = AF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; + snprintf(portstr, sizeof(portstr), "%d", port); + ret = getaddrinfo(hostname, portstr, &hints, &ai); + if (ret) { + av_log(h, AV_LOG_ERROR, "Failed to resolve hostname %s: %s\n", + hostname, gai_strerror(ret)); + return AVERROR(EIO); + } + + cur_ai = ai; + + fd = socket(cur_ai->ai_family, SOCK_STREAM, IPPROTO_SCTP); + if (fd < 0) + goto fail; + + s->dest_addr_len = sizeof(s->dest_addr); + + if (listen_socket) { + int fd1; + ret = bind(fd, cur_ai->ai_addr, cur_ai->ai_addrlen); + listen(fd, 100); + fd1 = accept(fd, NULL, NULL); + closesocket(fd); + fd = fd1; + } else + ret = connect(fd, cur_ai->ai_addr, cur_ai->ai_addrlen); + + ff_socket_nonblock(fd, 1); + + event.sctp_data_io_event = 1; + /* TODO: Subscribe to more event types and handle them */ + + if (setsockopt(fd, IPPROTO_SCTP, SCTP_EVENTS, &event, + sizeof(event)) != 0) { + av_log(h, AV_LOG_ERROR, + "SCTP ERROR: Unable to subscribe to events\n"); + goto fail; + } + + if (s->max_streams) { + initparams.sinit_max_instreams = s->max_streams; + initparams.sinit_num_ostreams = s->max_streams; + if (setsockopt(fd, SOL_SCTP, SCTP_INITMSG, &initparams, + sizeof(initparams)) < 0) + av_log(h, AV_LOG_ERROR, + "SCTP ERROR: Unable to initialize socket max streams %d\n", + s->max_streams); + } + + h->priv_data = s; + h->is_streamed = 1; + s->fd = fd; + freeaddrinfo(ai); + return 0; + +fail: + ret = AVERROR(EIO); + freeaddrinfo(ai); + return ret; +} + +static int sctp_wait_fd(int fd, int write) +{ + int ev = write ? POLLOUT : POLLIN; + struct pollfd p = { .fd = fd, .events = ev, .revents = 0 }; + int ret; + + ret = poll(&p, 1, 100); + return ret < 0 ? ff_neterrno() : p.revents & ev ? 0 : AVERROR(EAGAIN); +} + +static int sctp_read(URLContext *h, uint8_t *buf, int size) +{ + SCTPContext *s = h->priv_data; + int ret; + + if (!(h->flags & AVIO_FLAG_NONBLOCK)) { + ret = sctp_wait_fd(s->fd, 0); + if (ret < 0) + return ret; + } + + if (s->max_streams) { + /*StreamId is introduced as a 2byte code into the stream*/ + struct sctp_sndrcvinfo info = { 0 }; + ret = ff_sctp_recvmsg(s->fd, buf + 2, size - 2, NULL, 0, &info, 0); + AV_WB16(buf, info.sinfo_stream); + ret = ret < 0 ? ret : ret + 2; + } else + ret = recv(s->fd, buf, size, 0); + + return ret < 0 ? ff_neterrno() : ret; +} + +static int sctp_write(URLContext *h, const uint8_t *buf, int size) +{ + SCTPContext *s = h->priv_data; + int ret; + + if (!(h->flags & AVIO_FLAG_NONBLOCK)) { + ret = sctp_wait_fd(s->fd, 1); + if (ret < 0) + return ret; + } + + if (s->max_streams) { + /*StreamId is introduced as a 2byte code into the stream*/ + struct sctp_sndrcvinfo info = { 0 }; + info.sinfo_stream = AV_RB16(buf); + if (info.sinfo_stream > s->max_streams) + abort(); + ret = ff_sctp_send(s->fd, buf + 2, size - 2, &info, MSG_EOR); + } else + ret = send(s->fd, buf, size, 0); + + return ret < 0 ? ff_neterrno() : ret; +} + +static int sctp_close(URLContext *h) +{ + SCTPContext *s = h->priv_data; + closesocket(s->fd); + return 0; +} + +static int sctp_get_file_handle(URLContext *h) +{ + SCTPContext *s = h->priv_data; + return s->fd; +} + +URLProtocol ff_sctp_protocol = { + .name = "sctp", + .url_open = sctp_open, + .url_read = sctp_read, + .url_write = sctp_write, + .url_close = sctp_close, + .url_get_file_handle = sctp_get_file_handle, + .priv_data_size = sizeof(SCTPContext), + .flags = URL_PROTOCOL_FLAG_NETWORK, +}; -- cgit v1.2.3 From ab165047a6142ca0c8c333c36f4ebb96477622d7 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Fri, 27 Apr 2012 17:27:40 +0200 Subject: lavfi: add a function for copying properties from AVFilterBufferRef->AVFrame Based on a commit by Stefano Sabatini --- libavfilter/avfilter.c | 30 ++++++++++++++++++++++++++++++ libavfilter/avfilter.h | 8 ++++++++ 2 files changed, 38 insertions(+) diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index d1c82cee2f..f12ca3a097 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -708,6 +708,36 @@ int avfilter_copy_frame_props(AVFilterBufferRef *dst, const AVFrame *src) return 0; } +int avfilter_copy_buf_props(AVFrame *dst, const AVFilterBufferRef *src) +{ + memcpy(dst->data, src->data, sizeof(dst->data)); + memcpy(dst->linesize, src->linesize, sizeof(dst->linesize)); + + dst->pts = src->pts; + dst->format = src->format; + + switch (src->type) { + case AVMEDIA_TYPE_VIDEO: + dst->width = src->video->w; + dst->height = src->video->h; + dst->sample_aspect_ratio = src->video->pixel_aspect; + dst->interlaced_frame = src->video->interlaced; + dst->top_field_first = src->video->top_field_first; + dst->key_frame = src->video->key_frame; + dst->pict_type = src->video->pict_type; + break; + case AVMEDIA_TYPE_AUDIO: + dst->sample_rate = src->audio->sample_rate; + dst->channel_layout = src->audio->channel_layout; + dst->nb_samples = src->audio->nb_samples; + break; + default: + return AVERROR(EINVAL); + } + + return 0; +} + void avfilter_copy_buffer_ref_props(AVFilterBufferRef *dst, AVFilterBufferRef *src) { // copy common properties diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index c2049f98fe..ef61a5da6a 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -848,4 +848,12 @@ static inline void avfilter_insert_outpad(AVFilterContext *f, unsigned index, */ int avfilter_copy_frame_props(AVFilterBufferRef *dst, const AVFrame *src); +/** + * Copy the frame properties and data pointers of src to dst, without copying + * the actual data. + * + * @return 0 on success, a negative number on error. + */ +int avfilter_copy_buf_props(AVFrame *dst, const AVFilterBufferRef *src); + #endif /* AVFILTER_AVFILTER_H */ -- cgit v1.2.3 From ac71230902af1a8ebc7abf85143139ffb49838eb Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Fri, 27 Apr 2012 06:56:56 +0200 Subject: lavfi: add video buffer sink, and use it in avtools Also add the public interface libavfilter/buffersink.h. Based on a commit by Stefano Sabatini. --- avconv.c | 104 +++++++++++++++++++++++++++++------------- avplay.c | 29 ++++++++---- cmdutils.c | 68 ---------------------------- cmdutils.h | 15 ------- configure | 2 +- doc/filters.texi | 8 ++++ libavfilter/Makefile | 2 + libavfilter/allfilters.c | 4 ++ libavfilter/buffersink.c | 114 +++++++++++++++++++++++++++++++++++++++++++++++ libavfilter/buffersink.h | 43 ++++++++++++++++++ 10 files changed, 267 insertions(+), 122 deletions(-) create mode 100644 libavfilter/buffersink.c create mode 100644 libavfilter/buffersink.h diff --git a/avconv.c b/avconv.c index 73f3bc3763..33758c12b7 100644 --- a/avconv.c +++ b/avconv.c @@ -50,6 +50,7 @@ # include "libavfilter/avfilter.h" # include "libavfilter/avfiltergraph.h" # include "libavfilter/buffersrc.h" +# include "libavfilter/buffersink.h" # include "libavfilter/vsrc_buffer.h" #if HAVE_SYS_RESOURCE_H @@ -582,14 +583,25 @@ static void filter_release_buffer(AVFilterBuffer *fb) unref_buffer(buf->ist, buf); } -static const enum PixelFormat *choose_pixel_fmts(OutputStream *ost) +static char *choose_pixel_fmts(OutputStream *ost) { if (ost->st->codec->pix_fmt != PIX_FMT_NONE) { - ost->pix_fmts[0] = ost->st->codec->pix_fmt; - return ost->pix_fmts; - } else if (ost->enc->pix_fmts) - return ost->enc->pix_fmts; - else + return av_strdup(av_get_pix_fmt_name(ost->st->codec->pix_fmt)); + } else if (ost->enc->pix_fmts) { + const enum PixelFormat *p; + AVIOContext *s = NULL; + uint8_t *ret; + int len; + + if (avio_open_dyn_buf(&s) < 0) + exit_program(1); + + for (p = ost->enc->pix_fmts; *p != PIX_FMT_NONE; p++) + avio_printf(s, "%s:", av_get_pix_fmt_name(*p)); + len = avio_close_dyn_buf(s, &ret); + ret[len - 1] = 0; + return ret; + } else return NULL; } @@ -597,9 +609,9 @@ static int configure_video_filters(FilterGraph *fg) { InputStream *ist = fg->inputs[0]->ist; OutputStream *ost = fg->outputs[0]->ost; - AVFilterContext *last_filter, *filter; + AVFilterContext *in_filter, *out_filter, *filter; AVCodecContext *codec = ost->st->codec; - SinkContext sink_ctx = { .pix_fmts = choose_pixel_fmts(ost) }; + char *pix_fmts; AVRational sample_aspect_ratio; char args[255]; int ret; @@ -621,11 +633,13 @@ static int configure_video_filters(FilterGraph *fg) "src", args, NULL, fg->graph); if (ret < 0) return ret; - ret = avfilter_graph_create_filter(&fg->outputs[0]->filter, &sink, - "out", NULL, &sink_ctx, fg->graph); + ret = avfilter_graph_create_filter(&fg->outputs[0]->filter, + avfilter_get_by_name("buffersink"), + "out", NULL, NULL, fg->graph); if (ret < 0) return ret; - last_filter = fg->inputs[0]->filter; + in_filter = fg->inputs[0]->filter; + out_filter = fg->outputs[0]->filter; if (codec->width || codec->height) { snprintf(args, 255, "%d:%d:flags=0x%X", @@ -635,9 +649,22 @@ static int configure_video_filters(FilterGraph *fg) if ((ret = avfilter_graph_create_filter(&filter, avfilter_get_by_name("scale"), NULL, args, NULL, fg->graph)) < 0) return ret; - if ((ret = avfilter_link(last_filter, 0, filter, 0)) < 0) + if ((ret = avfilter_link(in_filter, 0, filter, 0)) < 0) return ret; - last_filter = filter; + in_filter = filter; + } + + if ((pix_fmts = choose_pixel_fmts(ost))) { + if ((ret = avfilter_graph_create_filter(&filter, + avfilter_get_by_name("format"), + "format", pix_fmts, NULL, + fg->graph)) < 0) + return ret; + if ((ret = avfilter_link(filter, 0, out_filter, 0)) < 0) + return ret; + + out_filter = filter; + av_freep(&pix_fmts); } snprintf(args, sizeof(args), "flags=0x%X", (unsigned)ost->sws_flags); @@ -648,19 +675,19 @@ static int configure_video_filters(FilterGraph *fg) AVFilterInOut *inputs = avfilter_inout_alloc(); outputs->name = av_strdup("in"); - outputs->filter_ctx = last_filter; + outputs->filter_ctx = in_filter; outputs->pad_idx = 0; outputs->next = NULL; inputs->name = av_strdup("out"); - inputs->filter_ctx = fg->outputs[0]->filter; + inputs->filter_ctx = out_filter; inputs->pad_idx = 0; inputs->next = NULL; if ((ret = avfilter_graph_parse(fg->graph, ost->avfilter, inputs, outputs, NULL)) < 0) return ret; } else { - if ((ret = avfilter_link(last_filter, 0, fg->outputs[0]->filter, 0)) < 0) + if ((ret = avfilter_link(in_filter, 0, out_filter, 0)) < 0) return ret; } @@ -776,33 +803,52 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in) static int configure_output_filter(FilterGraph *fg, OutputFilter *ofilter, AVFilterInOut *out) { - SinkContext sink_ctx; + char *pix_fmts; AVCodecContext *codec = ofilter->ost->st->codec; AVFilterContext *last_filter = out->filter_ctx; int pad_idx = out->pad_idx; int ret; - sink_ctx.pix_fmts = choose_pixel_fmts(ofilter->ost); - ret = avfilter_graph_create_filter(&ofilter->filter, &sink, - "out", NULL, &sink_ctx, fg->graph); + ret = avfilter_graph_create_filter(&ofilter->filter, + avfilter_get_by_name("buffersink"), + "out", NULL, pix_fmts, fg->graph); if (ret < 0) return ret; if (codec->width || codec->height) { char args[255]; + AVFilterContext *filter; + snprintf(args, sizeof(args), "%d:%d:flags=0x%X", codec->width, codec->height, (unsigned)ofilter->ost->sws_flags); - if ((ret = avfilter_graph_create_filter(&last_filter, avfilter_get_by_name("scale"), + if ((ret = avfilter_graph_create_filter(&filter, avfilter_get_by_name("scale"), NULL, args, NULL, fg->graph)) < 0) return ret; - if ((ret = avfilter_link(out->filter_ctx, out->pad_idx, last_filter, 0)) < 0) + if ((ret = avfilter_link(last_filter, pad_idx, filter, 0)) < 0) return ret; + + last_filter = filter; pad_idx = 0; } + if ((pix_fmts = choose_pixel_fmts(ofilter->ost))) { + AVFilterContext *filter; + if ((ret = avfilter_graph_create_filter(&filter, + avfilter_get_by_name("format"), + "format", pix_fmts, NULL, + fg->graph)) < 0) + return ret; + if ((ret = avfilter_link(last_filter, pad_idx, filter, 0)) < 0) + return ret; + + last_filter = filter; + pad_idx = 0; + av_freep(&pix_fmts); + } + if ((ret = avfilter_link(last_filter, pad_idx, ofilter->filter, 0)) < 0) return ret; @@ -1801,7 +1847,7 @@ static int poll_filters(void) { AVFilterBufferRef *picref; AVFrame *filtered_frame = NULL; - int i, frame_size, ret; + int i, frame_size; for (i = 0; i < nb_output_streams; i++) { OutputStream *ost = output_streams[i]; @@ -1816,13 +1862,11 @@ static int poll_filters(void) avcodec_get_frame_defaults(ost->filtered_frame); filtered_frame = ost->filtered_frame; - while (avfilter_poll_frame(ost->filter->filter->inputs[0])) { - AVRational ist_pts_tb; - if ((ret = get_filtered_video_frame(ost->filter->filter, - filtered_frame, &picref, - &ist_pts_tb)) < 0) - return ret; - filtered_frame->pts = av_rescale_q(picref->pts, ist_pts_tb, AV_TIME_BASE_Q); + while (av_buffersink_read(ost->filter->filter, &picref) >= 0) { + avfilter_copy_buf_props(filtered_frame, picref); + filtered_frame->pts = av_rescale_q(picref->pts, + ost->filter->filter->inputs[0]->time_base, + AV_TIME_BASE_Q); if (of->start_time && filtered_frame->pts < of->start_time) return 0; diff --git a/avplay.c b/avplay.c index 9bd83f381e..d291ba384a 100644 --- a/avplay.c +++ b/avplay.c @@ -41,6 +41,7 @@ #if CONFIG_AVFILTER # include "libavfilter/avfilter.h" # include "libavfilter/avfiltergraph.h" +# include "libavfilter/buffersink.h" #endif #include "cmdutils.h" @@ -1708,21 +1709,28 @@ static AVFilter input_filter = static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const char *vfilters) { - static const enum PixelFormat pix_fmts[] = { PIX_FMT_YUV420P, PIX_FMT_NONE }; char sws_flags_str[128]; int ret; - SinkContext sink_ctx = { .pix_fmts = pix_fmts }; - AVFilterContext *filt_src = NULL, *filt_out = NULL; + AVFilterContext *filt_src = NULL, *filt_out = NULL, *filt_format; snprintf(sws_flags_str, sizeof(sws_flags_str), "flags=%d", sws_flags); graph->scale_sws_opts = av_strdup(sws_flags_str); if ((ret = avfilter_graph_create_filter(&filt_src, &input_filter, "src", NULL, is, graph)) < 0) return ret; - if ((ret = avfilter_graph_create_filter(&filt_out, &sink, "out", - NULL, &sink_ctx, graph)) < 0) + if ((ret = avfilter_graph_create_filter(&filt_out, + avfilter_get_by_name("buffersink"), + "out", NULL, NULL, graph)) < 0) return ret; + if ((ret = avfilter_graph_create_filter(&filt_format, + avfilter_get_by_name("format"), + "format", "yuv420p", NULL, graph)) < 0) + return ret; + if ((ret = avfilter_link(filt_format, 0, filt_out, 0)) < 0) + return ret; + + if (vfilters) { AVFilterInOut *outputs = avfilter_inout_alloc(); AVFilterInOut *inputs = avfilter_inout_alloc(); @@ -1733,14 +1741,14 @@ static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const c outputs->next = NULL; inputs->name = av_strdup("out"); - inputs->filter_ctx = filt_out; + inputs->filter_ctx = filt_format; inputs->pad_idx = 0; inputs->next = NULL; if ((ret = avfilter_graph_parse(graph, vfilters, inputs, outputs, NULL)) < 0) return ret; } else { - if ((ret = avfilter_link(filt_src, 0, filt_out, 0)) < 0) + if ((ret = avfilter_link(filt_src, 0, filt_format, 0)) < 0) return ret; } @@ -1796,11 +1804,16 @@ static int video_thread(void *arg) last_w = is->video_st->codec->width; last_h = is->video_st->codec->height; } - ret = get_filtered_video_frame(filt_out, frame, &picref, &tb); + ret = av_buffersink_read(filt_out, &picref); if (picref) { + avfilter_copy_buf_props(frame, picref); + pts_int = picref->pts; + tb = filt_out->inputs[0]->time_base; pos = picref->pos; frame->opaque = picref; + + ret = 1; } if (ret >= 0 && av_cmp_q(tb, is->video_st->time_base)) { diff --git a/cmdutils.c b/cmdutils.c index 6d2e97f694..3cd11ca241 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -1021,74 +1021,6 @@ AVDictionary **setup_find_stream_info_opts(AVFormatContext *s, return opts; } -#if CONFIG_AVFILTER - -static int sink_init(AVFilterContext *ctx, const char *args, void *opaque) -{ - SinkContext *priv = ctx->priv; - - if (!opaque) - return AVERROR(EINVAL); - *priv = *(SinkContext *)opaque; - - return 0; -} - -static void null_end_frame(AVFilterLink *inlink) { } - -static int sink_query_formats(AVFilterContext *ctx) -{ - SinkContext *priv = ctx->priv; - - if (priv->pix_fmts) - avfilter_set_common_formats(ctx, avfilter_make_format_list(priv->pix_fmts)); - else - avfilter_default_query_formats(ctx); - return 0; -} - -AVFilter sink = { - .name = "sink", - .priv_size = sizeof(SinkContext), - .init = sink_init, - - .query_formats = sink_query_formats, - - .inputs = (AVFilterPad[]) {{ .name = "default", - .type = AVMEDIA_TYPE_VIDEO, - .end_frame = null_end_frame, - .min_perms = AV_PERM_READ, }, - { .name = NULL }}, - .outputs = (AVFilterPad[]) {{ .name = NULL }}, -}; - -int get_filtered_video_frame(AVFilterContext *ctx, AVFrame *frame, - AVFilterBufferRef **picref_ptr, AVRational *tb) -{ - int ret; - AVFilterBufferRef *picref; - - if ((ret = avfilter_request_frame(ctx->inputs[0])) < 0) - return ret; - if (!(picref = ctx->inputs[0]->cur_buf)) - return AVERROR(ENOENT); - *picref_ptr = picref; - ctx->inputs[0]->cur_buf = NULL; - *tb = ctx->inputs[0]->time_base; - - memcpy(frame->data, picref->data, sizeof(frame->data)); - memcpy(frame->linesize, picref->linesize, sizeof(frame->linesize)); - frame->interlaced_frame = picref->video->interlaced; - frame->top_field_first = picref->video->top_field_first; - frame->key_frame = picref->video->key_frame; - frame->pict_type = picref->video->pict_type; - frame->sample_aspect_ratio = picref->video->pixel_aspect; - - return 1; -} - -#endif /* CONFIG_AVFILTER */ - void *grow_array(void *array, int elem_size, int *size, int new_size) { if (new_size >= INT_MAX / elem_size) { diff --git a/cmdutils.h b/cmdutils.h index 792254cf6c..6fff47ddeb 100644 --- a/cmdutils.h +++ b/cmdutils.h @@ -367,21 +367,6 @@ int64_t guess_correct_pts(PtsCorrectionContext *ctx, int64_t pts, int64_t dts); FILE *get_preset_file(char *filename, size_t filename_size, const char *preset_name, int is_path, const char *codec_name); -typedef struct { - const enum PixelFormat *pix_fmts; -} SinkContext; - -extern AVFilter sink; - -/** - * Extract a frame from sink. - * - * @return a negative error in case of failure, 1 if one frame has - * been extracted successfully. - */ -int get_filtered_video_frame(AVFilterContext *sink, AVFrame *frame, - AVFilterBufferRef **picref, AVRational *pts_tb); - /** * Do all the necessary cleanup and abort. * This function is implemented in the avtools, not cmdutils. diff --git a/configure b/configure index 67cba5a795..4b1e55169f 100755 --- a/configure +++ b/configure @@ -1540,7 +1540,7 @@ avfilter_deps="swscale" avformat_deps="avcodec" # programs -avconv_deps="avcodec avfilter avformat avresample swscale" +avconv_deps="avcodec avfilter avformat avresample swscale format_filter" avplay_deps="avcodec avformat swscale sdl" avplay_select="rdft" avprobe_deps="avcodec avformat" diff --git a/doc/filters.texi b/doc/filters.texi index c5a56f49f6..dbcc86a384 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -2078,6 +2078,14 @@ will generate a video with a duration of 5.3 seconds, with size Below is a description of the currently available video sinks. +@section buffersink + +Buffer video frames, and make them available to the end of the filter +graph. + +This sink is intended for a programmatic use through the interface defined in +@file{libavfilter/buffersink.h}. + @section nullsink Null video sink, do absolutely nothing with the input video. It is diff --git a/libavfilter/Makefile b/libavfilter/Makefile index ae858397df..e786b6d2fe 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -4,6 +4,7 @@ FFLIBS-$(CONFIG_MOVIE_FILTER) += avformat avcodec HEADERS = avfilter.h \ avfiltergraph.h \ + buffersink.h \ buffersrc.h \ version.h \ vsrc_buffer.h \ @@ -11,6 +12,7 @@ HEADERS = avfilter.h \ OBJS = allfilters.o \ avfilter.o \ avfiltergraph.o \ + buffersink.o \ defaults.o \ drawutils.o \ formats.o \ diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c index 198e152cb0..f887002b66 100644 --- a/libavfilter/allfilters.c +++ b/libavfilter/allfilters.c @@ -94,6 +94,10 @@ void avfilter_register_all(void) extern AVFilter avfilter_vsrc_buffer; avfilter_register(&avfilter_vsrc_buffer); } + { + extern AVFilter avfilter_vsink_buffer; + avfilter_register(&avfilter_vsink_buffer); + } { extern AVFilter avfilter_vf_scale; avfilter_register(&avfilter_vf_scale); diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c new file mode 100644 index 0000000000..e4cbe3be42 --- /dev/null +++ b/libavfilter/buffersink.c @@ -0,0 +1,114 @@ +/* + * Copyright (c) 2011 Stefano Sabatini + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * buffer sink + */ + +#include "libavutil/fifo.h" + +#include "avfilter.h" +#include "buffersink.h" + +typedef struct { + AVFifoBuffer *fifo; ///< FIFO buffer of video frame references +} BufferSinkContext; + +#define FIFO_INIT_SIZE 8 + +static av_cold void uninit(AVFilterContext *ctx) +{ + BufferSinkContext *sink = ctx->priv; + + while (sink->fifo && av_fifo_size(sink->fifo)) { + AVFilterBufferRef *buf; + av_fifo_generic_read(sink->fifo, &buf, sizeof(buf), NULL); + avfilter_unref_buffer(buf); + } + av_fifo_free(sink->fifo); +} + +static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) +{ + BufferSinkContext *sink = ctx->priv; + + if (!(sink->fifo = av_fifo_alloc(FIFO_INIT_SIZE*sizeof(AVFilterBufferRef*)))) { + av_log(ctx, AV_LOG_ERROR, "Failed to allocate fifo\n"); + return AVERROR(ENOMEM); + } + + return 0; +} + +static void end_frame(AVFilterLink *link) +{ + AVFilterContext *ctx = link->dst; + BufferSinkContext *sink = ctx->priv; + + if (av_fifo_space(sink->fifo) < sizeof(AVFilterBufferRef *) && + (av_fifo_realloc2(sink->fifo, av_fifo_size(sink->fifo) * 2) < 0)) { + av_log(ctx, AV_LOG_ERROR, "Error reallocating the FIFO.\n"); + return; + } + + av_fifo_generic_write(sink->fifo, &link->cur_buf, sizeof(link->cur_buf), NULL); + link->cur_buf = NULL; +} + +int av_buffersink_read(AVFilterContext *ctx, AVFilterBufferRef **buf) +{ + BufferSinkContext *sink = ctx->priv; + AVFilterLink *link = ctx->inputs[0]; + int ret; + + if (!buf) { + if (av_fifo_size(sink->fifo)) + return av_fifo_size(sink->fifo)/sizeof(*buf); + else + return avfilter_poll_frame(ctx->inputs[0]); + } + + if (!av_fifo_size(sink->fifo) && + (ret = avfilter_request_frame(link)) < 0) + return ret; + + if (!av_fifo_size(sink->fifo)) + return AVERROR(EINVAL); + + av_fifo_generic_read(sink->fifo, buf, sizeof(*buf), NULL); + + return 0; +} + +AVFilter avfilter_vsink_buffer = { + .name = "buffersink", + .description = NULL_IF_CONFIG_SMALL("Buffer video frames, and make them available to the end of the filter graph."), + .priv_size = sizeof(BufferSinkContext), + .init = init, + .uninit = uninit, + + .inputs = (AVFilterPad[]) {{ .name = "default", + .type = AVMEDIA_TYPE_VIDEO, + .end_frame = end_frame, + .min_perms = AV_PERM_READ, }, + { .name = NULL }}, + .outputs = (AVFilterPad[]) {{ .name = NULL }}, +}; diff --git a/libavfilter/buffersink.h b/libavfilter/buffersink.h new file mode 100644 index 0000000000..e579b9ad03 --- /dev/null +++ b/libavfilter/buffersink.h @@ -0,0 +1,43 @@ +/* + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_BUFFERSINK_H +#define AVFILTER_BUFFERSINK_H + +/** + * @file + * memory buffer sink API + */ + +#include "avfilter.h" + +/** + * Get a buffer with filtered data from sink and put it in buf. + * + * @param sink pointer to a context of a buffersink AVFilter. + * @param buf pointer to the buffer will be written here if buf is non-NULL. buf + * must be freed by the caller using avfilter_unref_buffer(). + * Buf may also be NULL to query whether a buffer is ready to be + * output. + * + * @return >= 0 in case of success, a negative AVERROR code in case of + * failure. + */ +int av_buffersink_read(AVFilterContext *sink, AVFilterBufferRef **buf); + +#endif /* AVFILTER_BUFFERSINK_H */ -- cgit v1.2.3 From b82b49a5b774b6ad9119e981c72b8f594fee2ae0 Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Sat, 5 May 2012 23:24:51 +0100 Subject: mips: intreadwrite: remove unnecessary inline asm GCC actually handles unaligned accesses correctly in all cases except, absurdly, 32-bit loads on mips64. The remaining asm is thus not needed, and removing it results in better code. Signed-off-by: Mans Rullgard --- libavutil/mips/intreadwrite.h | 59 ++----------------------------------------- 1 file changed, 2 insertions(+), 57 deletions(-) diff --git a/libavutil/mips/intreadwrite.h b/libavutil/mips/intreadwrite.h index 0e0cc065a9..d0c558fb81 100644 --- a/libavutil/mips/intreadwrite.h +++ b/libavutil/mips/intreadwrite.h @@ -24,7 +24,7 @@ #include #include "config.h" -#if HAVE_INLINE_ASM +#if ARCH_MIPS64 && HAVE_INLINE_ASM #define AV_RN32 AV_RN32 static av_always_inline uint32_t AV_RN32(const void *p) @@ -38,61 +38,6 @@ static av_always_inline uint32_t AV_RN32(const void *p) return v; } -#define AV_WN32 AV_WN32 -static av_always_inline void AV_WN32(void *p, uint32_t v) -{ - __asm__ ("swl %2, %0 \n\t" - "swr %2, %1 \n\t" - : "=m"(*(uint32_t *)((uint8_t *)p+3*!HAVE_BIGENDIAN)), - "=m"(*(uint32_t *)((uint8_t *)p+3*HAVE_BIGENDIAN)) - : "r"(v)); -} - -#if ARCH_MIPS64 - -#define AV_RN64 AV_RN64 -static av_always_inline uint64_t AV_RN64(const void *p) -{ - uint64_t v; - __asm__ ("ldl %0, %1 \n\t" - "ldr %0, %2 \n\t" - : "=&r"(v) - : "m"(*(const uint64_t *)((const uint8_t *)p+7*!HAVE_BIGENDIAN)), - "m"(*(const uint64_t *)((const uint8_t *)p+7*HAVE_BIGENDIAN))); - return v; -} - -#define AV_WN64 AV_WN64 -static av_always_inline void AV_WN64(void *p, uint64_t v) -{ - __asm__ ("sdl %2, %0 \n\t" - "sdr %2, %1 \n\t" - : "=m"(*(uint64_t *)((uint8_t *)p+7*!HAVE_BIGENDIAN)), - "=m"(*(uint64_t *)((uint8_t *)p+7*HAVE_BIGENDIAN)) - : "r"(v)); -} - -#else - -#define AV_RN64 AV_RN64 -static av_always_inline uint64_t AV_RN64(const void *p) -{ - union { uint64_t v; uint32_t hl[2]; } v; - v.hl[0] = AV_RN32(p); - v.hl[1] = AV_RN32((const uint8_t *)p + 4); - return v.v; -} - -#define AV_WN64 AV_WN64 -static av_always_inline void AV_WN64(void *p, uint64_t v) -{ - union { uint64_t v; uint32_t hl[2]; } vv = { v }; - AV_WN32(p, vv.hl[0]); - AV_WN32((uint8_t *)p + 4, vv.hl[1]); -} - -#endif /* ARCH_MIPS64 */ - -#endif /* HAVE_INLINE_ASM */ +#endif /* ARCH_MIPS64 && HAVE_INLINE_ASM */ #endif /* AVUTIL_MIPS_INTREADWRITE_H */ -- cgit v1.2.3 From 6766169c4198031c58a7972604d74947a16b75a7 Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Sat, 5 May 2012 23:38:15 +0100 Subject: mips: intreadwrite: fix inline asm for gcc 4.8 Just like gcc 4.6 and later on ARM, gcc 4.8 on MIPS generates inefficient code when a known-unaligned location is used as a memory input operand. This applies the same fix as has been previously done to the ARM version of the code. Signed-off-by: Mans Rullgard --- libavutil/mips/intreadwrite.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavutil/mips/intreadwrite.h b/libavutil/mips/intreadwrite.h index d0c558fb81..4dabbe6819 100644 --- a/libavutil/mips/intreadwrite.h +++ b/libavutil/mips/intreadwrite.h @@ -29,12 +29,15 @@ #define AV_RN32 AV_RN32 static av_always_inline uint32_t AV_RN32(const void *p) { + struct __attribute__((packed)) u32 { uint32_t v; }; + const uint8_t *q = p; + const struct u32 *pl = (const struct u32 *)(q + 3 * !HAVE_BIGENDIAN); + const struct u32 *pr = (const struct u32 *)(q + 3 * HAVE_BIGENDIAN); uint32_t v; __asm__ ("lwl %0, %1 \n\t" "lwr %0, %2 \n\t" : "=&r"(v) - : "m"(*(const uint32_t *)((const uint8_t *)p+3*!HAVE_BIGENDIAN)), - "m"(*(const uint32_t *)((const uint8_t *)p+3*HAVE_BIGENDIAN))); + : "m"(*pl), "m"(*pr)); return v; } -- cgit v1.2.3 From d57b43df2e691bc5f32bedf15a7e5bb0e6b84b61 Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Tue, 8 May 2012 11:29:09 +0100 Subject: fate: fix dependencies for probe tests Only the probe tests should depend on avprobe and these should be enabled only if avprobe is configured. Signed-off-by: Mans Rullgard --- tests/Makefile | 2 +- tests/fate/probe.mak | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index c440f04b33..56a8bb7df3 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -119,7 +119,7 @@ FATE_UTILS = base64 tiny_psnr fate: $(FATE) -$(FATE): avconv$(EXESUF) avprobe$(EXESUF) $(FATE_UTILS:%=tests/%$(HOSTEXESUF)) +$(FATE): avconv$(EXESUF) $(FATE_UTILS:%=tests/%$(HOSTEXESUF)) @echo "TEST $(@:fate-%=%)" $(Q)$(SRC_PATH)/tests/fate-run.sh $@ "$(SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)' '$(THREAD_TYPE)' '$(CPUFLAGS)' '$(CMP_SHIFT)' '$(CMP_TARGET)' '$(SIZE_TOLERANCE)' diff --git a/tests/fate/probe.mak b/tests/fate/probe.mak index 39068f2d74..77e9943552 100644 --- a/tests/fate/probe.mak +++ b/tests/fate/probe.mak @@ -10,8 +10,9 @@ fate-probe-format-roundup1414: REF = format_name=mpeg FATE_PROBE_FORMAT += fate-probe-format-roundup2015 fate-probe-format-roundup2015: REF = format_name=dv -FATE_TESTS += $(FATE_PROBE_FORMAT) +FATE-$(CONFIG_AVPROBE) += $(FATE_PROBE_FORMAT) fate-probe-format: $(FATE_PROBE_FORMAT) +$(FATE_PROBE_FORMAT): avprobe$(EXESUF) $(FATE_PROBE_FORMAT): CMP = oneline fate-probe-format-%: CMD = probefmt $(SAMPLES)/probe-format/$(@:fate-probe-format-%=%) -- cgit v1.2.3 From f2a5586c6462f942628e2c66109198ee07ce88bc Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Fri, 27 Apr 2012 14:17:42 +0000 Subject: fate: split some combined tests into separate audio and video tests Signed-off-by: Mans Rullgard --- tests/fate/adpcm.mak | 19 ++- tests/fate/ea.mak | 17 ++- tests/fate/video.mak | 6 + tests/ref/fate/adpcm-ea-1 | 26 ++++ tests/ref/fate/adpcm-ea-2 | 134 +++++++++++++++++++ tests/ref/fate/adpcm-ea-mad-ea-r1 | 193 --------------------------- tests/ref/fate/adpcm-ea-r1 | 96 ++++++++++++++ tests/ref/fate/adpcm-ea-tqi | 53 -------- tests/ref/fate/adpcm-ima-ea-eacs | 48 +++++++ tests/ref/fate/adpcm-ima-ea-sead | 50 +++++++ tests/ref/fate/adpcm-thp | 217 ++++++++++-------------------- tests/ref/fate/ea-dct | 269 -------------------------------------- tests/ref/fate/ea-mad | 97 ++++++++++++++ tests/ref/fate/ea-tgv-1 | 48 +++++++ tests/ref/fate/ea-tgv-2 | 39 ++++++ tests/ref/fate/ea-tgv-ima-ea-eacs | 96 -------------- tests/ref/fate/ea-tgv-ima-ea-sead | 89 ------------- tests/ref/fate/ea-tqi | 27 ++++ tests/ref/fate/mdec | 135 +++++++++++++++++++ tests/ref/fate/thp | 73 +++++++++++ 20 files changed, 875 insertions(+), 857 deletions(-) create mode 100644 tests/ref/fate/adpcm-ea-1 create mode 100644 tests/ref/fate/adpcm-ea-2 delete mode 100644 tests/ref/fate/adpcm-ea-mad-ea-r1 create mode 100644 tests/ref/fate/adpcm-ea-r1 delete mode 100644 tests/ref/fate/adpcm-ea-tqi create mode 100644 tests/ref/fate/adpcm-ima-ea-eacs create mode 100644 tests/ref/fate/adpcm-ima-ea-sead delete mode 100644 tests/ref/fate/ea-dct create mode 100644 tests/ref/fate/ea-mad create mode 100644 tests/ref/fate/ea-tgv-1 create mode 100644 tests/ref/fate/ea-tgv-2 delete mode 100644 tests/ref/fate/ea-tgv-ima-ea-eacs delete mode 100644 tests/ref/fate/ea-tgv-ima-ea-sead create mode 100644 tests/ref/fate/ea-tqi create mode 100644 tests/ref/fate/mdec create mode 100644 tests/ref/fate/thp diff --git a/tests/fate/adpcm.mak b/tests/fate/adpcm.mak index 5e41d6e18f..5a12a77e20 100644 --- a/tests/fate/adpcm.mak +++ b/tests/fate/adpcm.mak @@ -16,14 +16,17 @@ fate-adpcm-creative-8-2.6bit: CMD = md5 -i $(SAMPLES)/creative/BBC_3BIT.VOC -f s FATE_ADPCM += fate-adpcm-creative-8-4bit fate-adpcm-creative-8-4bit: CMD = md5 -i $(SAMPLES)/creative/BBC_4BIT.VOC -f s16le -FATE_ADPCM += fate-adpcm-ea-mad-ea-r1 -fate-adpcm-ea-mad-ea-r1: CMD = framecrc -i $(SAMPLES)/ea-mad/NFS6LogoE.mad +FATE_ADPCM += fate-adpcm-ea-1 +fate-adpcm-ea-1: CMD = framecrc -i $(SAMPLES)/ea-wve/networkBackbone-partial.wve -frames:a 26 -vn + +FATE_ADPCM += fate-adpcm-ea-2 +fate-adpcm-ea-2: CMD = framecrc -i $(SAMPLES)/ea-dct/NFS2Esprit-partial.dct -vn FATE_ADPCM += fate-adpcm-ea-maxis-xa fate-adpcm-ea-maxis-xa: CMD = framecrc -i $(SAMPLES)/maxis-xa/SC2KBUG.XA -frames:a 30 -FATE_ADPCM += fate-adpcm-ea-tqi -fate-adpcm-ea-tqi: CMD = framecrc -i $(SAMPLES)/ea-wve/networkBackbone-partial.wve -frames:v 26 +FATE_ADPCM += fate-adpcm-ea-r1 +fate-adpcm-ea-r1: CMD = framecrc -i $(SAMPLES)/ea-mad/NFS6LogoE.mad -vn FATE_ADPCM += fate-adpcm-ima-dk3 fate-adpcm-ima-dk3: CMD = md5 -i $(SAMPLES)/duck/sop-audio-only.avi -f s16le @@ -31,6 +34,12 @@ fate-adpcm-ima-dk3: CMD = md5 -i $(SAMPLES)/duck/sop-audio-only.avi -f s16le FATE_ADPCM += fate-adpcm-ima-dk4 fate-adpcm-ima-dk4: CMD = md5 -i $(SAMPLES)/duck/salsa-audio-only.avi -f s16le +FATE_ADPCM += fate-adpcm-ima-ea-eacs +fate-adpcm-ima-ea-eacs: CMD = framecrc -i $(SAMPLES)/ea-tgv/INTRO8K-partial.TGV -vn + +FATE_ADPCM += fate-adpcm-ima-ea-sead +fate-adpcm-ima-ea-sead: CMD = framecrc -i $(SAMPLES)/ea-tgv/INTEL_S.TGV -vn + FATE_ADPCM += fate-adpcm-ima_wav-stereo fate-adpcm-ima_wav-stereo: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-2-16-L-ms11.mov -f s16le @@ -38,7 +47,7 @@ FATE_ADPCM += fate-adpcm-psx-str-v3 fate-adpcm-psx-str-v3: CMD = framecrc -i $(SAMPLES)/psx-str/abc000_cut.str -vn FATE_ADPCM += fate-adpcm-thp -fate-adpcm-thp: CMD = framecrc -idct simple -i $(SAMPLES)/thp/pikmin2-opening1-partial.thp +fate-adpcm-thp: CMD = framecrc -i $(SAMPLES)/thp/pikmin2-opening1-partial.thp -vn FATE_ADPCM += fate-adpcm_ms-stereo fate-adpcm_ms-stereo: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-2-16-L-ms02.mov -f s16le diff --git a/tests/fate/ea.mak b/tests/fate/ea.mak index 0c91de5141..4734161630 100644 --- a/tests/fate/ea.mak +++ b/tests/fate/ea.mak @@ -4,14 +4,17 @@ fate-ea-cdata: CMD = md5 -i $(SAMPLES)/ea-cdata/166b084d.46410f77.0009b440.24be9 FATE_TESTS += fate-ea-cmv fate-ea-cmv: CMD = framecrc -i $(SAMPLES)/ea-cmv/TITLE.CMV -pix_fmt rgb24 -FATE_TESTS += fate-ea-dct -fate-ea-dct: CMD = framecrc -idct simple -i $(SAMPLES)/ea-dct/NFS2Esprit-partial.dct - FATE_TESTS += fate-ea-tgq fate-ea-tgq: CMD = framecrc -i $(SAMPLES)/ea-tgq/v27.tgq -an -FATE_TESTS += fate-ea-tgv-ima-ea-eacs -fate-ea-tgv-ima-ea-eacs: CMD = framecrc -i $(SAMPLES)/ea-tgv/INTRO8K-partial.TGV -pix_fmt rgb24 +FATE_TESTS += fate-ea-tqi +fate-ea-tqi: CMD = framecrc -i $(SAMPLES)/ea-wve/networkBackbone-partial.wve -frames:v 26 -an + +FATE_TESTS += fate-ea-mad +fate-ea-mad: CMD = framecrc -i $(SAMPLES)/ea-mad/NFS6LogoE.mad -an + +FATE_TESTS += fate-ea-tgv-1 +fate-ea-tgv-1: CMD = framecrc -i $(SAMPLES)/ea-tgv/INTRO8K-partial.TGV -pix_fmt rgb24 -an -FATE_TESTS += fate-ea-tgv-ima-ea-sead -fate-ea-tgv-ima-ea-sead: CMD = framecrc -i $(SAMPLES)/ea-tgv/INTEL_S.TGV -pix_fmt rgb24 +FATE_TESTS += fate-ea-tgv-2 +fate-ea-tgv-2: CMD = framecrc -i $(SAMPLES)/ea-tgv/INTEL_S.TGV -pix_fmt rgb24 -an diff --git a/tests/fate/video.mak b/tests/fate/video.mak index a676cd10d1..c07ab628af 100644 --- a/tests/fate/video.mak +++ b/tests/fate/video.mak @@ -133,6 +133,9 @@ fate-kgv1: CMD = framecrc -i $(SAMPLES)/kega/kgv1.avi -pix_fmt rgb555le -an FATE_TESTS += fate-kmvc fate-kmvc: CMD = framecrc -i $(SAMPLES)/KMVC/LOGO1.AVI -an -t 3 -pix_fmt rgb24 +FATE_TESTS += fate-mdec +fate-mdec: CMD = framecrc -idct simple -i $(SAMPLES)/ea-dct/NFS2Esprit-partial.dct -an + FATE_TESTS += fate-mimic fate-mimic: CMD = framecrc -idct simple -i $(SAMPLES)/mimic/mimic2-womanloveffmpeg.cam @@ -170,6 +173,9 @@ fate-sp5x: CMD = framecrc -idct simple -i $(SAMPLES)/sp5x/sp5x_problem.avi FATE_TESTS += fate-sub-srt fate-sub-srt: CMD = md5 -i $(SAMPLES)/sub/SubRip_capability_tester.srt -f ass +FATE_TESTS += fate-thp +fate-thp: CMD = framecrc -idct simple -i $(SAMPLES)/thp/pikmin2-opening1-partial.thp -an + FATE_TESTS += fate-tiertex-seq fate-tiertex-seq: CMD = framecrc -i $(SAMPLES)/tiertex-seq/Gameover.seq -pix_fmt rgb24 diff --git a/tests/ref/fate/adpcm-ea-1 b/tests/ref/fate/adpcm-ea-1 new file mode 100644 index 0000000000..f5a33df710 --- /dev/null +++ b/tests/ref/fate/adpcm-ea-1 @@ -0,0 +1,26 @@ +#tb 0: 1/22050 +0, 0, 0, 1484, 5936, 0x00000000 +0, 1484, 1484, 1456, 5824, 0x00000000 +0, 2940, 2940, 1484, 5936, 0x00000000 +0, 4424, 4424, 1456, 5824, 0x00000000 +0, 5880, 5880, 1484, 5936, 0x00000000 +0, 7364, 7364, 1456, 5824, 0x00000000 +0, 8820, 8820, 1484, 5936, 0x00000000 +0, 10304, 10304, 1456, 5824, 0x0f06f5bb +0, 11760, 11760, 1484, 5936, 0xb0dbfc46 +0, 13244, 13244, 1456, 5824, 0x9daa9f9c +0, 14700, 14700, 1484, 5936, 0x61400d2f +0, 16184, 16184, 1456, 5824, 0x34a5b0e3 +0, 17640, 17640, 1484, 5936, 0x6e546f72 +0, 19124, 19124, 1456, 5824, 0x4f093b35 +0, 20580, 20580, 1484, 5936, 0x95b5b599 +0, 22064, 22064, 1456, 5824, 0x75e15e60 +0, 23520, 23520, 1484, 5936, 0xd1077d39 +0, 25004, 25004, 1456, 5824, 0x956e21ca +0, 26460, 26460, 1484, 5936, 0x33bac234 +0, 27944, 27944, 1456, 5824, 0x5df37824 +0, 29400, 29400, 1484, 5936, 0xc174af24 +0, 30884, 30884, 1456, 5824, 0xe5dc2159 +0, 32340, 32340, 1484, 5936, 0x63ffc8b1 +0, 33824, 33824, 1456, 5824, 0xefe4c365 +0, 35280, 35280, 1484, 5936, 0x2174304d diff --git a/tests/ref/fate/adpcm-ea-2 b/tests/ref/fate/adpcm-ea-2 new file mode 100644 index 0000000000..f58d9a00ce --- /dev/null +++ b/tests/ref/fate/adpcm-ea-2 @@ -0,0 +1,134 @@ +#tb 0: 1/22050 +0, 0, 0, 1484, 5936, 0xea261a29 +0, 1484, 1484, 1456, 5824, 0x253df061 +0, 2940, 2940, 1484, 5936, 0x603a5bd7 +0, 4424, 4424, 1456, 5824, 0x9d283f59 +0, 5880, 5880, 1484, 5936, 0x49323497 +0, 7364, 7364, 1456, 5824, 0x7c299939 +0, 8820, 8820, 1484, 5936, 0x9f918e9a +0, 10304, 10304, 1456, 5824, 0x1226b534 +0, 11760, 11760, 1484, 5936, 0xdd159326 +0, 13244, 13244, 1456, 5824, 0x361ad10f +0, 14700, 14700, 1484, 5936, 0x6ccac9e3 +0, 16184, 16184, 1456, 5824, 0x1861efef +0, 17640, 17640, 1484, 5936, 0x5f718eb9 +0, 19124, 19124, 1456, 5824, 0xd4ca72ba +0, 20580, 20580, 1484, 5936, 0xbf2b27e6 +0, 22064, 22064, 1456, 5824, 0xcb6f024e +0, 23520, 23520, 1484, 5936, 0x7dfb7e05 +0, 25004, 25004, 1456, 5824, 0x80e16f13 +0, 26460, 26460, 1484, 5936, 0x0fb59227 +0, 27944, 27944, 1456, 5824, 0x4d6f1fdb +0, 29400, 29400, 1484, 5936, 0x505a5103 +0, 30884, 30884, 1456, 5824, 0x47ef4c13 +0, 32340, 32340, 1484, 5936, 0xbe4795fb +0, 33824, 33824, 1456, 5824, 0xb82cc4ff +0, 35280, 35280, 1484, 5936, 0xf7c6ab8d +0, 36764, 36764, 1456, 5824, 0x1442f5e0 +0, 38220, 38220, 1484, 5936, 0x64659389 +0, 39704, 39704, 1456, 5824, 0xdd81725c +0, 41160, 41160, 1484, 5936, 0x7f7c604f +0, 42644, 42644, 1456, 5824, 0xafc77beb +0, 44100, 44100, 1484, 5936, 0x24f88e4d +0, 45584, 45584, 1456, 5824, 0xa31956ca +0, 47040, 47040, 1484, 5936, 0x958e02b9 +0, 48524, 48524, 1456, 5824, 0xcfc79890 +0, 49980, 49980, 1484, 5936, 0xc7e788ae +0, 51464, 51464, 1456, 5824, 0x4b6b1acc +0, 52920, 52920, 1484, 5936, 0xa74496dc +0, 54404, 54404, 1456, 5824, 0x719e6171 +0, 55860, 55860, 1484, 5936, 0x9346222d +0, 57344, 57344, 1456, 5824, 0x9e2a876e +0, 58800, 58800, 1484, 5936, 0xeca6ea64 +0, 60284, 60284, 1456, 5824, 0x07d8174f +0, 61740, 61740, 1484, 5936, 0x2df5aa6b +0, 63224, 63224, 1456, 5824, 0x314e7034 +0, 64680, 64680, 1484, 5936, 0x5a328768 +0, 66164, 66164, 1456, 5824, 0x32b92446 +0, 67620, 67620, 1484, 5936, 0x20ecbc9b +0, 69104, 69104, 1456, 5824, 0x76019c14 +0, 70560, 70560, 1484, 5936, 0x8c3ef8a6 +0, 72044, 72044, 1456, 5824, 0xcdaab50b +0, 73500, 73500, 1484, 5936, 0xb2f87f4f +0, 74984, 74984, 1456, 5824, 0x70c26379 +0, 76440, 76440, 1484, 5936, 0x5691ecfd +0, 77924, 77924, 1456, 5824, 0x61e208fe +0, 79380, 79380, 1484, 5936, 0x87d1a5e0 +0, 80864, 80864, 1456, 5824, 0x02054cfd +0, 82320, 82320, 1484, 5936, 0x22ff1c4b +0, 83804, 83804, 1456, 5824, 0xc6d87fef +0, 85260, 85260, 1484, 5936, 0x9028bb3b +0, 86744, 86744, 1456, 5824, 0xbadde406 +0, 88200, 88200, 1484, 5936, 0x6e88ddf1 +0, 89684, 89684, 1456, 5824, 0x5bb8be6e +0, 91140, 91140, 1484, 5936, 0xe1f8d7fc +0, 92624, 92624, 1456, 5824, 0xc824e388 +0, 94080, 94080, 1484, 5936, 0x654371a9 +0, 95564, 95564, 1456, 5824, 0xae6ee9ec +0, 97020, 97020, 1484, 5936, 0x9aa4550d +0, 98504, 98504, 1456, 5824, 0xdce210ac +0, 99960, 99960, 1484, 5936, 0xb12641c8 +0, 101444, 101444, 1456, 5824, 0x277e014b +0, 102900, 102900, 1484, 5936, 0xb0d262de +0, 104384, 104384, 1456, 5824, 0xf94d6f49 +0, 105840, 105840, 1484, 5936, 0x3d7848cb +0, 107324, 107324, 1456, 5824, 0xe67fc08e +0, 108780, 108780, 1484, 5936, 0x0475e0d6 +0, 110264, 110264, 1456, 5824, 0x8a9a4a2e +0, 111720, 111720, 1484, 5936, 0x82576204 +0, 113204, 113204, 1456, 5824, 0x3017b648 +0, 114660, 114660, 1484, 5936, 0xca4c3e04 +0, 116144, 116144, 1456, 5824, 0x340077d1 +0, 117600, 117600, 1484, 5936, 0x805bea6e +0, 119084, 119084, 1456, 5824, 0x2cf6c87b +0, 120540, 120540, 1484, 5936, 0x3635bc5f +0, 122024, 122024, 1456, 5824, 0x0d7a81c7 +0, 123480, 123480, 1484, 5936, 0x26179764 +0, 124964, 124964, 1456, 5824, 0xa0b2454f +0, 126420, 126420, 1484, 5936, 0x91d24608 +0, 127904, 127904, 1456, 5824, 0x6509b3e1 +0, 129360, 129360, 1484, 5936, 0xa0e3c9fc +0, 130844, 130844, 1456, 5824, 0x18682a2f +0, 132300, 132300, 1484, 5936, 0x89cea4ff +0, 133784, 133784, 1456, 5824, 0x7dd22b85 +0, 135240, 135240, 1484, 5936, 0x8b2eeb8d +0, 136724, 136724, 1456, 5824, 0x0c21af82 +0, 138180, 138180, 1484, 5936, 0x9c5a748d +0, 139664, 139664, 1456, 5824, 0x1dc72c5c +0, 141120, 141120, 1484, 5936, 0xe6129383 +0, 142604, 142604, 1456, 5824, 0x0a44312a +0, 144060, 144060, 1484, 5936, 0x7ed30640 +0, 145544, 145544, 1456, 5824, 0xede15f25 +0, 147000, 147000, 1484, 5936, 0x0096d0f3 +0, 148484, 148484, 1456, 5824, 0x13764b4b +0, 149940, 149940, 1484, 5936, 0xd4608756 +0, 151424, 151424, 1456, 5824, 0x254b5f2a +0, 152880, 152880, 1484, 5936, 0x7705b830 +0, 154364, 154364, 1456, 5824, 0x64a63d78 +0, 155820, 155820, 1484, 5936, 0xc02d81a6 +0, 157304, 157304, 1456, 5824, 0xd239e55e +0, 158760, 158760, 1484, 5936, 0x8018cd3a +0, 160244, 160244, 1456, 5824, 0xf86b8a98 +0, 161700, 161700, 1484, 5936, 0x2a0078bc +0, 163184, 163184, 1456, 5824, 0x058d4e1b +0, 164640, 164640, 1484, 5936, 0xbc718309 +0, 166124, 166124, 1456, 5824, 0xaf6c29e5 +0, 167580, 167580, 1484, 5936, 0x80df004d +0, 169064, 169064, 1456, 5824, 0xeca5aa57 +0, 170520, 170520, 1484, 5936, 0xb793a8f8 +0, 172004, 172004, 1456, 5824, 0x70fa6aff +0, 173460, 173460, 1484, 5936, 0xda8d4cc6 +0, 174944, 174944, 1456, 5824, 0xa70088eb +0, 176400, 176400, 1484, 5936, 0x1c0b0aab +0, 177884, 177884, 1456, 5824, 0x234d2436 +0, 179340, 179340, 1484, 5936, 0xf79d731e +0, 180824, 180824, 1456, 5824, 0x5a4e454a +0, 182280, 182280, 1484, 5936, 0xccf6d042 +0, 183764, 183764, 1456, 5824, 0x4e524d14 +0, 185220, 185220, 1484, 5936, 0xf8f2fcc3 +0, 186704, 186704, 1456, 5824, 0x08f12491 +0, 188160, 188160, 1484, 5936, 0x506e0a42 +0, 189644, 189644, 1456, 5824, 0x7cf05049 +0, 191100, 191100, 1484, 5936, 0xdeb9d295 +0, 192584, 192584, 1456, 5824, 0x758ef642 +0, 194040, 194040, 1484, 5936, 0x91903980 diff --git a/tests/ref/fate/adpcm-ea-mad-ea-r1 b/tests/ref/fate/adpcm-ea-mad-ea-r1 deleted file mode 100644 index 7e8a995992..0000000000 --- a/tests/ref/fate/adpcm-ea-mad-ea-r1 +++ /dev/null @@ -1,193 +0,0 @@ -#tb 0: 1/90000 -#tb 1: 1/48000 -0, 0, 0, 0, 535680, 0x889c32cf -1, 0, 0, 1624, 6496, 0x00000000 -0, 2970, 2970, 0, 535680, 0x0b1ef044 -1, 1624, 1624, 1596, 6384, 0x00000000 -0, 5940, 5940, 0, 535680, 0xa7d0818b -1, 3220, 3220, 1596, 6384, 0x00000000 -0, 8910, 8910, 0, 535680, 0xf392e4e1 -1, 4816, 4816, 1596, 6384, 0x00000000 -0, 11880, 11880, 0, 535680, 0x08480c69 -1, 6412, 6412, 1596, 6384, 0x00000000 -0, 14850, 14850, 0, 535680, 0x2b8af1ed -1, 8008, 8008, 1624, 6496, 0xe2034d04 -0, 17820, 17820, 0, 535680, 0x0d58e062 -1, 9632, 9632, 1596, 6384, 0x089c9157 -0, 20790, 20790, 0, 535680, 0xd140ced0 -1, 11228, 11228, 1596, 6384, 0xeed5743c -0, 23760, 23760, 0, 535680, 0xbd0e6652 -1, 12824, 12824, 1596, 6384, 0x71de6b34 -0, 26730, 26730, 0, 535680, 0xdc2f2a6b -1, 14420, 14420, 1596, 6384, 0xc0d67710 -0, 29700, 29700, 0, 535680, 0x97c31a38 -1, 16016, 16016, 1624, 6496, 0x35786490 -0, 32670, 32670, 0, 535680, 0x1a2bdf38 -1, 17640, 17640, 1596, 6384, 0xdf1c99a2 -0, 35640, 35640, 0, 535680, 0xb3af3ac4 -1, 19236, 19236, 1596, 6384, 0xca9591ad -0, 38610, 38610, 0, 535680, 0x07a52577 -1, 20832, 20832, 1596, 6384, 0x6f0d9c3d -0, 41580, 41580, 0, 535680, 0x78407368 -1, 22428, 22428, 1596, 6384, 0xfacbbaee -0, 44550, 44550, 0, 535680, 0xd2a9efc3 -1, 24024, 24024, 1624, 6496, 0x927fb136 -0, 47520, 47520, 0, 535680, 0x36df2f29 -1, 25648, 25648, 1596, 6384, 0x9d4f2572 -0, 50490, 50490, 0, 535680, 0x9821d8f7 -1, 27244, 27244, 1596, 6384, 0x2a3c6d08 -0, 53460, 53460, 0, 535680, 0xf64321aa -1, 28840, 28840, 1596, 6384, 0x4282b1e0 -0, 56430, 56430, 0, 535680, 0x53e4d9aa -1, 30436, 30436, 1596, 6384, 0xc4a77b9f -0, 59400, 59400, 0, 535680, 0xdbd6f853 -1, 32032, 32032, 1624, 6496, 0x2af6a14f -0, 62370, 62370, 0, 535680, 0x5d40cf8b -1, 33656, 33656, 1596, 6384, 0x4d734169 -0, 65340, 65340, 0, 535680, 0xe624af9d -1, 35252, 35252, 1596, 6384, 0xb91b5865 -0, 68310, 68310, 0, 535680, 0xd9dbb4cd -1, 36848, 36848, 1596, 6384, 0x9dce2417 -0, 71280, 71280, 0, 535680, 0xf14e72ec -1, 38444, 38444, 1596, 6384, 0xb7c4e1ce -0, 74250, 74250, 0, 535680, 0xb35c18f6 -1, 40040, 40040, 1624, 6496, 0xef0dc07a -0, 77220, 77220, 0, 535680, 0xc96d7757 -1, 41664, 41664, 1596, 6384, 0x4ad21d10 -0, 80190, 80190, 0, 535680, 0xdfb937df -1, 43260, 43260, 1596, 6384, 0xcfe14682 -0, 83160, 83160, 0, 535680, 0x40cd71d7 -1, 44856, 44856, 1596, 6384, 0x07be48eb -0, 86130, 86130, 0, 535680, 0x15e176d6 -1, 46452, 46452, 1596, 6384, 0x09de3498 -0, 89100, 89100, 0, 535680, 0x7f891b24 -1, 48048, 48048, 1624, 6496, 0xab2e9686 -0, 92070, 92070, 0, 535680, 0xb87a8c32 -1, 49672, 49672, 1596, 6384, 0x3aba3ccc -0, 95040, 95040, 0, 535680, 0x0c01541f -1, 51268, 51268, 1596, 6384, 0x0a905ec3 -0, 98010, 98010, 0, 535680, 0x9eee99b3 -1, 52864, 52864, 1596, 6384, 0x76a93ce4 -0, 100980, 100980, 0, 535680, 0xd65eb689 -1, 54460, 54460, 1596, 6384, 0xa99063a4 -0, 103950, 103950, 0, 535680, 0x6e733cfa -1, 56056, 56056, 1624, 6496, 0xc16bb88d -0, 106920, 106920, 0, 535680, 0xac536670 -1, 57680, 57680, 1596, 6384, 0x650379bf -0, 109890, 109890, 0, 535680, 0x002275b8 -1, 59276, 59276, 1596, 6384, 0x4e0749fe -0, 112860, 112860, 0, 535680, 0x6a5385cb -1, 60872, 60872, 1596, 6384, 0x778e8d12 -0, 115830, 115830, 0, 535680, 0xd129ade3 -1, 62468, 62468, 1596, 6384, 0x9fa8c494 -0, 118800, 118800, 0, 535680, 0x32cab5d7 -1, 64064, 64064, 1624, 6496, 0x61d5bead -0, 121770, 121770, 0, 535680, 0x08be1c8f -1, 65688, 65688, 1596, 6384, 0x4da9bc3c -0, 124740, 124740, 0, 535680, 0x59e1fba0 -1, 67284, 67284, 1596, 6384, 0xa72b6f93 -0, 127710, 127710, 0, 535680, 0x138aee3a -1, 68880, 68880, 1596, 6384, 0x811f5f77 -0, 130680, 130680, 0, 535680, 0x4cfbcd5e -1, 70476, 70476, 1596, 6384, 0x83ea5e3d -0, 133650, 133650, 0, 535680, 0xf6cf0fb4 -1, 72072, 72072, 1624, 6496, 0x78bab460 -0, 136620, 136620, 0, 535680, 0xb13a06de -1, 73696, 73696, 1596, 6384, 0xc9a07432 -0, 139590, 139590, 0, 535680, 0x59176f00 -1, 75292, 75292, 1596, 6384, 0x4b4f2a34 -0, 142560, 142560, 0, 535680, 0xf84b4ca3 -1, 76888, 76888, 1596, 6384, 0x4d707a53 -0, 145530, 145530, 0, 535680, 0x7fd09f73 -1, 78484, 78484, 1596, 6384, 0x703efb60 -0, 148500, 148500, 0, 535680, 0x3be383b8 -1, 80080, 80080, 1624, 6496, 0x319a77bb -0, 151470, 151470, 0, 535680, 0xa7118e51 -1, 81704, 81704, 1596, 6384, 0xbdfd82ec -0, 154440, 154440, 0, 535680, 0xbd83120c -1, 83300, 83300, 1596, 6384, 0x413c3503 -0, 157410, 157410, 0, 535680, 0x3bc9d256 -1, 84896, 84896, 1596, 6384, 0xe6e666b3 -0, 160380, 160380, 0, 535680, 0xb6c87f87 -1, 86492, 86492, 1596, 6384, 0xa09c7342 -0, 163350, 163350, 0, 535680, 0xe80d110a -1, 88088, 88088, 1624, 6496, 0x60cba846 -0, 166320, 166320, 0, 535680, 0xb3a83362 -1, 89712, 89712, 1596, 6384, 0x0ba34308 -0, 169290, 169290, 0, 535680, 0xfb39eb52 -1, 91308, 91308, 1596, 6384, 0xdc3a65f0 -0, 172260, 172260, 0, 535680, 0xbf6e1220 -1, 92904, 92904, 1596, 6384, 0x1ebf9dc4 -0, 175230, 175230, 0, 535680, 0x9ecdfbae -1, 94500, 94500, 1596, 6384, 0xbbcb1449 -0, 178200, 178200, 0, 535680, 0x069a65f5 -1, 96096, 96096, 1624, 6496, 0x926574eb -0, 181170, 181170, 0, 535680, 0x206e372c -1, 97720, 97720, 1596, 6384, 0xb4da92f1 -0, 184140, 184140, 0, 535680, 0x58c83dd4 -1, 99316, 99316, 1596, 6384, 0xdbbd21e0 -0, 187110, 187110, 0, 535680, 0xc3562b03 -1, 100912, 100912, 1596, 6384, 0x08510eff -0, 190080, 190080, 0, 535680, 0xd1ed85a0 -1, 102508, 102508, 1596, 6384, 0x9534b7ca -0, 193050, 193050, 0, 535680, 0xb6205f4b -1, 104104, 104104, 1624, 6496, 0x50a5ed30 -0, 196020, 196020, 0, 535680, 0xaedf8bfa -1, 105728, 105728, 1596, 6384, 0xf5ac2f7c -0, 198990, 198990, 0, 535680, 0xa48d5dea -1, 107324, 107324, 1596, 6384, 0x4fe1fa55 -0, 201960, 201960, 0, 535680, 0xff82e7c1 -1, 108920, 108920, 1596, 6384, 0xd61c4c05 -0, 204930, 204930, 0, 535680, 0xc9560222 -1, 110516, 110516, 1596, 6384, 0x56d11b45 -0, 207900, 207900, 0, 535680, 0x0fafa549 -1, 112112, 112112, 1624, 6496, 0x3906084b -0, 210870, 210870, 0, 535680, 0x8d556ccb -1, 113736, 113736, 1596, 6384, 0x1ef31fed -0, 213840, 213840, 0, 535680, 0x802aac1f -1, 115332, 115332, 1596, 6384, 0x58ed82f5 -0, 216810, 216810, 0, 535680, 0x7d0fa168 -1, 116928, 116928, 1596, 6384, 0xb31ccd1f -0, 219780, 219780, 0, 535680, 0x1a9255c9 -1, 118524, 118524, 1596, 6384, 0xfb648285 -0, 222750, 222750, 0, 535680, 0xb4ec7e35 -1, 120120, 120120, 1624, 6496, 0xfae2950b -0, 225720, 225720, 0, 535680, 0x48fac072 -1, 121744, 121744, 1596, 6384, 0xe28c8357 -0, 228690, 228690, 0, 535680, 0x1e260135 -1, 123340, 123340, 1596, 6384, 0xda718e60 -0, 231660, 231660, 0, 535680, 0xce4d5079 -1, 124936, 124936, 1596, 6384, 0x27516999 -0, 234630, 234630, 0, 535680, 0x13e5e4ed -1, 126532, 126532, 1596, 6384, 0x0ba07921 -0, 237600, 237600, 0, 535680, 0x592305ec -1, 128128, 128128, 1624, 6496, 0xcfbecfab -0, 240570, 240570, 0, 535680, 0x9e227508 -1, 129752, 129752, 1596, 6384, 0xae4cedcd -0, 243540, 243540, 0, 535680, 0x1d37e5ea -1, 131348, 131348, 1596, 6384, 0x917b4707 -0, 246510, 246510, 0, 535680, 0x7eae7692 -1, 132944, 132944, 1596, 6384, 0x8671b28e -0, 249480, 249480, 0, 535680, 0xf452e4b9 -1, 134540, 134540, 1596, 6384, 0x9a1238fa -0, 252450, 252450, 0, 535680, 0x1460e7e9 -1, 136136, 136136, 1624, 6496, 0x23b8f8ca -0, 255420, 255420, 0, 535680, 0xc6d8a638 -1, 137760, 137760, 1596, 6384, 0x3903bcd6 -0, 258390, 258390, 0, 535680, 0x854f5fb0 -1, 139356, 139356, 1596, 6384, 0x0532b267 -0, 261360, 261360, 0, 535680, 0x854f5fb0 -1, 140952, 140952, 1596, 6384, 0xde931220 -0, 264330, 264330, 0, 535680, 0x70a02d87 -1, 142548, 142548, 1596, 6384, 0x4ed70a80 -0, 267300, 267300, 0, 535680, 0x9a4ad464 -0, 270270, 270270, 0, 535680, 0x9a4ad464 -1, 144144, 144144, 1624, 6496, 0x4a52d5a1 -0, 273240, 273240, 0, 535680, 0x9a4ad464 -1, 145768, 145768, 1596, 6384, 0xc1be5760 -0, 276210, 276210, 0, 535680, 0x9a4ad464 -1, 147364, 147364, 1596, 6384, 0x790d69ba -0, 279180, 279180, 0, 535680, 0x9a4ad464 -1, 148960, 148960, 1596, 6384, 0x9d73e6cf -0, 282150, 282150, 0, 535680, 0x9a4ad464 -1, 150556, 150556, 1568, 6272, 0xbc0fc725 diff --git a/tests/ref/fate/adpcm-ea-r1 b/tests/ref/fate/adpcm-ea-r1 new file mode 100644 index 0000000000..74d15c6f67 --- /dev/null +++ b/tests/ref/fate/adpcm-ea-r1 @@ -0,0 +1,96 @@ +#tb 0: 1/48000 +0, 0, 0, 1624, 6496, 0x00000000 +0, 1624, 1624, 1596, 6384, 0x00000000 +0, 3220, 3220, 1596, 6384, 0x00000000 +0, 4816, 4816, 1596, 6384, 0x00000000 +0, 6412, 6412, 1596, 6384, 0x00000000 +0, 8008, 8008, 1624, 6496, 0xe2034d04 +0, 9632, 9632, 1596, 6384, 0x089c9157 +0, 11228, 11228, 1596, 6384, 0xeed5743c +0, 12824, 12824, 1596, 6384, 0x71de6b34 +0, 14420, 14420, 1596, 6384, 0xc0d67710 +0, 16016, 16016, 1624, 6496, 0x35786490 +0, 17640, 17640, 1596, 6384, 0xdf1c99a2 +0, 19236, 19236, 1596, 6384, 0xca9591ad +0, 20832, 20832, 1596, 6384, 0x6f0d9c3d +0, 22428, 22428, 1596, 6384, 0xfacbbaee +0, 24024, 24024, 1624, 6496, 0x927fb136 +0, 25648, 25648, 1596, 6384, 0x9d4f2572 +0, 27244, 27244, 1596, 6384, 0x2a3c6d08 +0, 28840, 28840, 1596, 6384, 0x4282b1e0 +0, 30436, 30436, 1596, 6384, 0xc4a77b9f +0, 32032, 32032, 1624, 6496, 0x2af6a14f +0, 33656, 33656, 1596, 6384, 0x4d734169 +0, 35252, 35252, 1596, 6384, 0xb91b5865 +0, 36848, 36848, 1596, 6384, 0x9dce2417 +0, 38444, 38444, 1596, 6384, 0xb7c4e1ce +0, 40040, 40040, 1624, 6496, 0xef0dc07a +0, 41664, 41664, 1596, 6384, 0x4ad21d10 +0, 43260, 43260, 1596, 6384, 0xcfe14682 +0, 44856, 44856, 1596, 6384, 0x07be48eb +0, 46452, 46452, 1596, 6384, 0x09de3498 +0, 48048, 48048, 1624, 6496, 0xab2e9686 +0, 49672, 49672, 1596, 6384, 0x3aba3ccc +0, 51268, 51268, 1596, 6384, 0x0a905ec3 +0, 52864, 52864, 1596, 6384, 0x76a93ce4 +0, 54460, 54460, 1596, 6384, 0xa99063a4 +0, 56056, 56056, 1624, 6496, 0xc16bb88d +0, 57680, 57680, 1596, 6384, 0x650379bf +0, 59276, 59276, 1596, 6384, 0x4e0749fe +0, 60872, 60872, 1596, 6384, 0x778e8d12 +0, 62468, 62468, 1596, 6384, 0x9fa8c494 +0, 64064, 64064, 1624, 6496, 0x61d5bead +0, 65688, 65688, 1596, 6384, 0x4da9bc3c +0, 67284, 67284, 1596, 6384, 0xa72b6f93 +0, 68880, 68880, 1596, 6384, 0x811f5f77 +0, 70476, 70476, 1596, 6384, 0x83ea5e3d +0, 72072, 72072, 1624, 6496, 0x78bab460 +0, 73696, 73696, 1596, 6384, 0xc9a07432 +0, 75292, 75292, 1596, 6384, 0x4b4f2a34 +0, 76888, 76888, 1596, 6384, 0x4d707a53 +0, 78484, 78484, 1596, 6384, 0x703efb60 +0, 80080, 80080, 1624, 6496, 0x319a77bb +0, 81704, 81704, 1596, 6384, 0xbdfd82ec +0, 83300, 83300, 1596, 6384, 0x413c3503 +0, 84896, 84896, 1596, 6384, 0xe6e666b3 +0, 86492, 86492, 1596, 6384, 0xa09c7342 +0, 88088, 88088, 1624, 6496, 0x60cba846 +0, 89712, 89712, 1596, 6384, 0x0ba34308 +0, 91308, 91308, 1596, 6384, 0xdc3a65f0 +0, 92904, 92904, 1596, 6384, 0x1ebf9dc4 +0, 94500, 94500, 1596, 6384, 0xbbcb1449 +0, 96096, 96096, 1624, 6496, 0x926574eb +0, 97720, 97720, 1596, 6384, 0xb4da92f1 +0, 99316, 99316, 1596, 6384, 0xdbbd21e0 +0, 100912, 100912, 1596, 6384, 0x08510eff +0, 102508, 102508, 1596, 6384, 0x9534b7ca +0, 104104, 104104, 1624, 6496, 0x50a5ed30 +0, 105728, 105728, 1596, 6384, 0xf5ac2f7c +0, 107324, 107324, 1596, 6384, 0x4fe1fa55 +0, 108920, 108920, 1596, 6384, 0xd61c4c05 +0, 110516, 110516, 1596, 6384, 0x56d11b45 +0, 112112, 112112, 1624, 6496, 0x3906084b +0, 113736, 113736, 1596, 6384, 0x1ef31fed +0, 115332, 115332, 1596, 6384, 0x58ed82f5 +0, 116928, 116928, 1596, 6384, 0xb31ccd1f +0, 118524, 118524, 1596, 6384, 0xfb648285 +0, 120120, 120120, 1624, 6496, 0xfae2950b +0, 121744, 121744, 1596, 6384, 0xe28c8357 +0, 123340, 123340, 1596, 6384, 0xda718e60 +0, 124936, 124936, 1596, 6384, 0x27516999 +0, 126532, 126532, 1596, 6384, 0x0ba07921 +0, 128128, 128128, 1624, 6496, 0xcfbecfab +0, 129752, 129752, 1596, 6384, 0xae4cedcd +0, 131348, 131348, 1596, 6384, 0x917b4707 +0, 132944, 132944, 1596, 6384, 0x8671b28e +0, 134540, 134540, 1596, 6384, 0x9a1238fa +0, 136136, 136136, 1624, 6496, 0x23b8f8ca +0, 137760, 137760, 1596, 6384, 0x3903bcd6 +0, 139356, 139356, 1596, 6384, 0x0532b267 +0, 140952, 140952, 1596, 6384, 0xde931220 +0, 142548, 142548, 1596, 6384, 0x4ed70a80 +0, 144144, 144144, 1624, 6496, 0x4a52d5a1 +0, 145768, 145768, 1596, 6384, 0xc1be5760 +0, 147364, 147364, 1596, 6384, 0x790d69ba +0, 148960, 148960, 1596, 6384, 0x9d73e6cf +0, 150556, 150556, 1568, 6272, 0xbc0fc725 diff --git a/tests/ref/fate/adpcm-ea-tqi b/tests/ref/fate/adpcm-ea-tqi deleted file mode 100644 index 9f09003bf3..0000000000 --- a/tests/ref/fate/adpcm-ea-tqi +++ /dev/null @@ -1,53 +0,0 @@ -#tb 0: 1/90000 -#tb 1: 1/22050 -0, 0, 0, 0, 115200, 0x375ec573 -1, 0, 0, 1484, 5936, 0x00000000 -0, 6000, 6000, 0, 115200, 0x375ec573 -1, 1484, 1484, 1456, 5824, 0x00000000 -0, 12000, 12000, 0, 115200, 0x375ec573 -1, 2940, 2940, 1484, 5936, 0x00000000 -0, 18000, 18000, 0, 115200, 0x375ec573 -1, 4424, 4424, 1456, 5824, 0x00000000 -0, 24000, 24000, 0, 115200, 0x375ec573 -1, 5880, 5880, 1484, 5936, 0x00000000 -0, 30000, 30000, 0, 115200, 0x375ec573 -1, 7364, 7364, 1456, 5824, 0x00000000 -0, 36000, 36000, 0, 115200, 0x375ec573 -1, 8820, 8820, 1484, 5936, 0x00000000 -0, 42000, 42000, 0, 115200, 0x375ec573 -1, 10304, 10304, 1456, 5824, 0x0f06f5bb -0, 48000, 48000, 0, 115200, 0x0b4d31bf -1, 11760, 11760, 1484, 5936, 0xb0dbfc46 -0, 54000, 54000, 0, 115200, 0xdd724598 -1, 13244, 13244, 1456, 5824, 0x9daa9f9c -0, 60000, 60000, 0, 115200, 0xc3077e75 -1, 14700, 14700, 1484, 5936, 0x61400d2f -0, 66000, 66000, 0, 115200, 0xbf70778a -1, 16184, 16184, 1456, 5824, 0x34a5b0e3 -0, 72000, 72000, 0, 115200, 0x117eb766 -1, 17640, 17640, 1484, 5936, 0x6e546f72 -0, 78000, 78000, 0, 115200, 0x4617fbad -1, 19124, 19124, 1456, 5824, 0x4f093b35 -0, 84000, 84000, 0, 115200, 0x5f5b02d2 -1, 20580, 20580, 1484, 5936, 0x95b5b599 -0, 90000, 90000, 0, 115200, 0x2a9c5325 -1, 22064, 22064, 1456, 5824, 0x75e15e60 -0, 96000, 96000, 0, 115200, 0x14a89e2a -1, 23520, 23520, 1484, 5936, 0xd1077d39 -0, 102000, 102000, 0, 115200, 0xe69aa994 -1, 25004, 25004, 1456, 5824, 0x956e21ca -0, 108000, 108000, 0, 115200, 0xfbacf589 -1, 26460, 26460, 1484, 5936, 0x33bac234 -0, 114000, 114000, 0, 115200, 0x1d714c6e -1, 27944, 27944, 1456, 5824, 0x5df37824 -0, 120000, 120000, 0, 115200, 0x6eff66cb -1, 29400, 29400, 1484, 5936, 0xc174af24 -0, 126000, 126000, 0, 115200, 0xee21c1cb -1, 30884, 30884, 1456, 5824, 0xe5dc2159 -0, 132000, 132000, 0, 115200, 0xce714ada -1, 32340, 32340, 1484, 5936, 0x63ffc8b1 -0, 138000, 138000, 0, 115200, 0xf89d56c3 -1, 33824, 33824, 1456, 5824, 0xefe4c365 -0, 144000, 144000, 0, 115200, 0x65fd5e60 -1, 35280, 35280, 1484, 5936, 0x2174304d -0, 150000, 150000, 0, 115200, 0x0c256424 diff --git a/tests/ref/fate/adpcm-ima-ea-eacs b/tests/ref/fate/adpcm-ima-ea-eacs new file mode 100644 index 0000000000..9887296f45 --- /dev/null +++ b/tests/ref/fate/adpcm-ima-ea-eacs @@ -0,0 +1,48 @@ +#tb 0: 1/22050 +0, 0, 0, 1468, 5872, 0x00000000 +0, 1468, 1468, 1468, 5872, 0x00000000 +0, 2936, 2936, 1468, 5872, 0x00000000 +0, 4404, 4404, 1468, 5872, 0x00000000 +0, 5872, 5872, 1468, 5872, 0x00000000 +0, 7340, 7340, 1468, 5872, 0x00000000 +0, 8808, 8808, 1468, 5872, 0x00000000 +0, 10276, 10276, 1468, 5872, 0x00000000 +0, 11744, 11744, 1468, 5872, 0x00000000 +0, 13212, 13212, 1468, 5872, 0x00000000 +0, 14680, 14680, 1468, 5872, 0x00000000 +0, 16148, 16148, 1468, 5872, 0x00000000 +0, 17616, 17616, 1468, 5872, 0x00000000 +0, 19084, 19084, 1468, 5872, 0x00000000 +0, 20552, 20552, 1468, 5872, 0x00000000 +0, 22020, 22020, 1468, 5872, 0xc6f64777 +0, 23488, 23488, 1468, 5872, 0x7c9e60e8 +0, 24956, 24956, 1468, 5872, 0x46525c54 +0, 26424, 26424, 1468, 5872, 0x842796bb +0, 27892, 27892, 1468, 5872, 0xb1f6cbd5 +0, 29360, 29360, 1468, 5872, 0x0261a74b +0, 30828, 30828, 1468, 5872, 0x8218b1f9 +0, 32296, 32296, 1468, 5872, 0xd7a2cae6 +0, 33764, 33764, 1468, 5872, 0x69d34562 +0, 35232, 35232, 1468, 5872, 0x9303ec65 +0, 36700, 36700, 1468, 5872, 0xd5d963a1 +0, 38168, 38168, 1468, 5872, 0x0557e06f +0, 39636, 39636, 1468, 5872, 0x1eb48b41 +0, 41104, 41104, 1468, 5872, 0x70f5ca3f +0, 42572, 42572, 1468, 5872, 0xd39e5c5e +0, 44040, 44040, 1468, 5872, 0x29c59140 +0, 45508, 45508, 1468, 5872, 0x7d95e643 +0, 46976, 46976, 1468, 5872, 0x45353fd8 +0, 48444, 48444, 1468, 5872, 0xad7b1b27 +0, 49912, 49912, 1468, 5872, 0x1f0377b3 +0, 51380, 51380, 1468, 5872, 0x6074541e +0, 52848, 52848, 1468, 5872, 0xa4f5e892 +0, 54316, 54316, 1468, 5872, 0x084bc696 +0, 55784, 55784, 1468, 5872, 0x67fdafce +0, 57252, 57252, 1468, 5872, 0x8dfd249d +0, 58720, 58720, 1468, 5872, 0x514184ee +0, 60188, 60188, 1468, 5872, 0xc0090b0d +0, 61656, 61656, 1468, 5872, 0xc1171cc8 +0, 63124, 63124, 1468, 5872, 0x7d7dd07e +0, 64592, 64592, 1468, 5872, 0xe6aa619c +0, 66060, 66060, 1468, 5872, 0xd5aac0df +0, 67528, 67528, 1468, 5872, 0x3b68b390 diff --git a/tests/ref/fate/adpcm-ima-ea-sead b/tests/ref/fate/adpcm-ima-ea-sead new file mode 100644 index 0000000000..17c10875a6 --- /dev/null +++ b/tests/ref/fate/adpcm-ima-ea-sead @@ -0,0 +1,50 @@ +#tb 0: 1/22050 +0, 0, 0, 736, 2944, 0x00000000 +0, 736, 736, 1472, 5888, 0x5ae3c2a4 +0, 2208, 2208, 1472, 5888, 0x158fbcb4 +0, 3680, 3680, 1472, 5888, 0x3fc85d35 +0, 5152, 5152, 1472, 5888, 0x4667ec2b +0, 6624, 6624, 1472, 5888, 0x82744494 +0, 8096, 8096, 1472, 5888, 0x3b0cb86f +0, 9568, 9568, 1472, 5888, 0x29493fbb +0, 11040, 11040, 1472, 5888, 0xaa2d8595 +0, 12512, 12512, 1472, 5888, 0x2e563de6 +0, 13984, 13984, 1472, 5888, 0x225cca99 +0, 15456, 15456, 1472, 5888, 0x2b577599 +0, 16928, 16928, 1472, 5888, 0x3d967f32 +0, 18400, 18400, 1472, 5888, 0x16639a84 +0, 19872, 19872, 1472, 5888, 0x90549ba0 +0, 21344, 21344, 1472, 5888, 0xf46e6644 +0, 22816, 22816, 1472, 5888, 0x39a073ec +0, 24288, 24288, 1472, 5888, 0xb1d7a93a +0, 25760, 25760, 1472, 5888, 0x25e9795b +0, 27232, 27232, 1472, 5888, 0xbbc07644 +0, 28704, 28704, 1472, 5888, 0x323f6a1b +0, 30176, 30176, 1472, 5888, 0x7cae130b +0, 31648, 31648, 1472, 5888, 0xd23bf9c6 +0, 33120, 33120, 1472, 5888, 0x5f73ef35 +0, 34592, 34592, 1472, 5888, 0xc66026be +0, 36064, 36064, 1472, 5888, 0xc8fdb539 +0, 37536, 37536, 1472, 5888, 0x94c6bfbd +0, 39008, 39008, 1472, 5888, 0xb77e1b83 +0, 40480, 40480, 1472, 5888, 0x6c6d6693 +0, 41952, 41952, 1472, 5888, 0xd9f064d4 +0, 43424, 43424, 1472, 5888, 0x85dd990d +0, 44896, 44896, 1472, 5888, 0x385e021b +0, 46368, 46368, 1472, 5888, 0xac09fd02 +0, 47840, 47840, 1472, 5888, 0xc6dcdff2 +0, 49312, 49312, 1472, 5888, 0x86a6944d +0, 50784, 50784, 1472, 5888, 0x8587b964 +0, 52256, 52256, 1472, 5888, 0x2b0355ff +0, 53728, 53728, 1472, 5888, 0xe4148a85 +0, 55200, 55200, 1472, 5888, 0xdf02ed4f +0, 56672, 56672, 1472, 5888, 0x87a54b15 +0, 58144, 58144, 1472, 5888, 0x3ad2be45 +0, 59616, 59616, 1472, 5888, 0x3a49c2c3 +0, 61088, 61088, 1472, 5888, 0xc2b66404 +0, 62560, 62560, 1472, 5888, 0xac3e234a +0, 64032, 64032, 1472, 5888, 0x5dcf523b +0, 65504, 65504, 1472, 5888, 0x2034b5d6 +0, 66976, 66976, 1472, 5888, 0x96882832 +0, 68448, 68448, 1472, 5888, 0x2be3d534 +0, 69920, 69920, 1472, 5888, 0xa841a49d diff --git a/tests/ref/fate/adpcm-thp b/tests/ref/fate/adpcm-thp index 135de54910..72aff61ade 100644 --- a/tests/ref/fate/adpcm-thp +++ b/tests/ref/fate/adpcm-thp @@ -1,145 +1,72 @@ -#tb 0: 524288/15712911 -#tb 1: 1/32000 -0, 0, 0, 1, 291840, 0xbd7e0b22 -1, 0, 0, 1078, 4312, 0x469714f6 -0, 1, 1, 1, 291840, 0xf6e12ca5 -1, 1078, 1078, 1064, 4256, 0xe03dd882 -0, 2, 2, 1, 291840, 0x528c7049 -1, 2142, 2142, 1078, 4312, 0x46b901f7 -0, 3, 3, 1, 291840, 0x93055de9 -1, 3220, 3220, 1064, 4256, 0x8d4a54e4 -0, 4, 4, 1, 291840, 0xf95a51c1 -1, 4284, 4284, 1064, 4256, 0xfd616b67 -0, 5, 5, 1, 291840, 0x6ad3a65a -1, 5348, 5348, 1078, 4312, 0xefe62302 -0, 6, 6, 1, 291840, 0x494684a7 -1, 6426, 6426, 1064, 4256, 0xab11684e -0, 7, 7, 1, 291840, 0x74c14eb1 -1, 7490, 7490, 1064, 4256, 0xb4b3feb8 -0, 8, 8, 1, 291840, 0x149fcb7e -1, 8554, 8554, 1078, 4312, 0x71db6461 -0, 9, 9, 1, 291840, 0x25649761 -1, 9632, 9632, 1064, 4256, 0x090e5efa -0, 10, 10, 1, 291840, 0xbc3f9052 -1, 10696, 10696, 1064, 4256, 0x36f49c28 -0, 11, 11, 1, 291840, 0x080edfff -1, 11760, 11760, 1078, 4312, 0x0fe3d262 -0, 12, 12, 1, 291840, 0x6d7ad684 -1, 12838, 12838, 1064, 4256, 0x199ce269 -0, 13, 13, 1, 291840, 0x6d53844d -1, 13902, 13902, 1064, 4256, 0x98342d05 -0, 14, 14, 1, 291840, 0xf7ad5385 -1, 14966, 14966, 1078, 4312, 0xb6fb7ebe -0, 15, 15, 1, 291840, 0x0241b56a -1, 16044, 16044, 1064, 4256, 0x033dd562 -0, 16, 16, 1, 291840, 0x120122c8 -1, 17108, 17108, 1064, 4256, 0xc2cc17e0 -0, 17, 17, 1, 291840, 0x31b0f32a -1, 18172, 18172, 1078, 4312, 0x4bb3ff50 -0, 18, 18, 1, 291840, 0x14068b98 -1, 19250, 19250, 1064, 4256, 0x6f2671ef -0, 19, 19, 1, 291840, 0xeeec658b -1, 20314, 20314, 1064, 4256, 0x5a337bf4 -0, 20, 20, 1, 291840, 0x9376374c -1, 21378, 21378, 1078, 4312, 0xa71f6967 -0, 21, 21, 1, 291840, 0x091e8c6e -1, 22456, 22456, 1064, 4256, 0x48084aa9 -0, 22, 22, 1, 291840, 0x744ad07f -1, 23520, 23520, 1064, 4256, 0x3cce4218 -0, 23, 23, 1, 291840, 0xf99c554e -1, 24584, 24584, 1078, 4312, 0xcbb8f73d -0, 24, 24, 1, 291840, 0xc84bd677 -1, 25662, 25662, 1064, 4256, 0x36825021 -0, 25, 25, 1, 291840, 0x3898d474 -1, 26726, 26726, 1064, 4256, 0xeae036c6 -0, 26, 26, 1, 291840, 0x1e2910c8 -1, 27790, 27790, 1078, 4312, 0x0d650ac6 -0, 27, 27, 1, 291840, 0xb11f58bc -1, 28868, 28868, 1064, 4256, 0xfba4f58c -0, 28, 28, 1, 291840, 0xf89170ee -1, 29932, 29932, 1064, 4256, 0x54311f9b -0, 29, 29, 1, 291840, 0x8f239dc3 -1, 30996, 30996, 1078, 4312, 0x286386b3 -0, 30, 30, 1, 291840, 0x8538c76c -1, 32074, 32074, 1064, 4256, 0x871896de -0, 31, 31, 1, 291840, 0x162ee66f -1, 33138, 33138, 1064, 4256, 0x9ef9f970 -0, 32, 32, 1, 291840, 0x5f8708a5 -1, 34202, 34202, 1078, 4312, 0xf9ae97f1 -0, 33, 33, 1, 291840, 0x95802dfb -1, 35280, 35280, 1064, 4256, 0x0ad0d765 -0, 34, 34, 1, 291840, 0xc424630d -1, 36344, 36344, 1064, 4256, 0x8e6aa9b5 -0, 35, 35, 1, 291840, 0xfb8a8667 -1, 37408, 37408, 1078, 4312, 0x8362787b -0, 36, 36, 1, 291840, 0xbad79af5 -1, 38486, 38486, 1064, 4256, 0x9b6a5d9c -0, 37, 37, 1, 291840, 0xc733b325 -1, 39550, 39550, 1064, 4256, 0xfb715d8f -0, 38, 38, 1, 291840, 0x4bfbcd70 -1, 40614, 40614, 1078, 4312, 0x02bd8075 -0, 39, 39, 1, 291840, 0x502cd950 -1, 41692, 41692, 1064, 4256, 0x428eb932 -0, 40, 40, 1, 291840, 0x8461ca2c -1, 42756, 42756, 1064, 4256, 0x17ea8c94 -0, 41, 41, 1, 291840, 0x00219b0d -1, 43820, 43820, 1078, 4312, 0xb3e761d7 -0, 42, 42, 1, 291840, 0xa4de45e1 -1, 44898, 44898, 1064, 4256, 0x0919755a -0, 43, 43, 1, 291840, 0xacd3f4df -1, 45962, 45962, 1064, 4256, 0x5e520edd -0, 44, 44, 1, 291840, 0x2203a369 -1, 47026, 47026, 1078, 4312, 0x69aa070e -0, 45, 45, 1, 291840, 0x0a66effa -1, 48104, 48104, 1064, 4256, 0xf8192f7d -0, 46, 46, 1, 291840, 0x7ac1fd91 -1, 49168, 49168, 1064, 4256, 0xaad4475c -0, 47, 47, 1, 291840, 0x84970aa7 -1, 50232, 50232, 1078, 4312, 0x0cabcfcb -0, 48, 48, 1, 291840, 0x569d145f -1, 51310, 51310, 1064, 4256, 0x952f0f96 -0, 49, 49, 1, 291840, 0xe51efe1b -1, 52374, 52374, 1064, 4256, 0x1b805a0c -0, 50, 50, 1, 291840, 0x38e2cd78 -1, 53438, 53438, 1078, 4312, 0x93043d2a -0, 51, 51, 1, 291840, 0x93428ea2 -1, 54516, 54516, 1064, 4256, 0x38b99e44 -0, 52, 52, 1, 291840, 0x3d3f5b17 -1, 55580, 55580, 1064, 4256, 0x60cc52ff -0, 53, 53, 1, 291840, 0x9546127d -1, 56644, 56644, 1078, 4312, 0x6a875849 -0, 54, 54, 1, 291840, 0x4178be54 -1, 57722, 57722, 1064, 4256, 0xd08d6d0e -0, 55, 55, 1, 291840, 0x0d0f8036 -1, 58786, 58786, 1064, 4256, 0x36bfe48e -0, 56, 56, 1, 291840, 0xc20557b9 -1, 59850, 59850, 1078, 4312, 0x795c6134 -0, 57, 57, 1, 291840, 0x6d4b2d64 -1, 60928, 60928, 1064, 4256, 0x4fd79583 -0, 58, 58, 1, 291840, 0xa750125d -1, 61992, 61992, 1064, 4256, 0x65e2ab9f -0, 59, 59, 1, 291840, 0x04623ce3 -1, 63056, 63056, 1078, 4312, 0xedeede4a -0, 60, 60, 1, 291840, 0xc7f2bbc7 -1, 64134, 64134, 1064, 4256, 0x097e0d09 -0, 61, 61, 1, 291840, 0x6e271336 -1, 65198, 65198, 1064, 4256, 0x58afa133 -0, 62, 62, 1, 291840, 0xcfbd4246 -1, 66262, 66262, 1078, 4312, 0x442525b5 -0, 63, 63, 1, 291840, 0xe1493be9 -1, 67340, 67340, 1064, 4256, 0x6645c591 -0, 64, 64, 1, 291840, 0x6c731194 -1, 68404, 68404, 1064, 4256, 0xb0dd948a -0, 65, 65, 1, 291840, 0x0fc30cc2 -1, 69468, 69468, 1078, 4312, 0x12684e69 -0, 66, 66, 1, 291840, 0x967427f3 -1, 70546, 70546, 1064, 4256, 0xb45098e3 -0, 67, 67, 1, 291840, 0x55ae3b00 -1, 71610, 71610, 1064, 4256, 0xb6d3c61c -0, 68, 68, 1, 291840, 0xbe4f200c -1, 72674, 72674, 1078, 4312, 0xb46b5b22 -0, 69, 69, 1, 291840, 0xc515e443 -1, 73752, 73752, 1064, 4256, 0x9a556830 -0, 70, 70, 1, 291840, 0xd738bd69 -1, 74816, 74816, 1064, 4256, 0x67ca2b35 -0, 71, 71, 1, 291840, 0xa8e0ab69 +#tb 0: 1/32000 +0, 0, 0, 1078, 4312, 0x469714f6 +0, 1078, 1078, 1064, 4256, 0xe03dd882 +0, 2142, 2142, 1078, 4312, 0x46b901f7 +0, 3220, 3220, 1064, 4256, 0x8d4a54e4 +0, 4284, 4284, 1064, 4256, 0xfd616b67 +0, 5348, 5348, 1078, 4312, 0xefe62302 +0, 6426, 6426, 1064, 4256, 0xab11684e +0, 7490, 7490, 1064, 4256, 0xb4b3feb8 +0, 8554, 8554, 1078, 4312, 0x71db6461 +0, 9632, 9632, 1064, 4256, 0x090e5efa +0, 10696, 10696, 1064, 4256, 0x36f49c28 +0, 11760, 11760, 1078, 4312, 0x0fe3d262 +0, 12838, 12838, 1064, 4256, 0x199ce269 +0, 13902, 13902, 1064, 4256, 0x98342d05 +0, 14966, 14966, 1078, 4312, 0xb6fb7ebe +0, 16044, 16044, 1064, 4256, 0x033dd562 +0, 17108, 17108, 1064, 4256, 0xc2cc17e0 +0, 18172, 18172, 1078, 4312, 0x4bb3ff50 +0, 19250, 19250, 1064, 4256, 0x6f2671ef +0, 20314, 20314, 1064, 4256, 0x5a337bf4 +0, 21378, 21378, 1078, 4312, 0xa71f6967 +0, 22456, 22456, 1064, 4256, 0x48084aa9 +0, 23520, 23520, 1064, 4256, 0x3cce4218 +0, 24584, 24584, 1078, 4312, 0xcbb8f73d +0, 25662, 25662, 1064, 4256, 0x36825021 +0, 26726, 26726, 1064, 4256, 0xeae036c6 +0, 27790, 27790, 1078, 4312, 0x0d650ac6 +0, 28868, 28868, 1064, 4256, 0xfba4f58c +0, 29932, 29932, 1064, 4256, 0x54311f9b +0, 30996, 30996, 1078, 4312, 0x286386b3 +0, 32074, 32074, 1064, 4256, 0x871896de +0, 33138, 33138, 1064, 4256, 0x9ef9f970 +0, 34202, 34202, 1078, 4312, 0xf9ae97f1 +0, 35280, 35280, 1064, 4256, 0x0ad0d765 +0, 36344, 36344, 1064, 4256, 0x8e6aa9b5 +0, 37408, 37408, 1078, 4312, 0x8362787b +0, 38486, 38486, 1064, 4256, 0x9b6a5d9c +0, 39550, 39550, 1064, 4256, 0xfb715d8f +0, 40614, 40614, 1078, 4312, 0x02bd8075 +0, 41692, 41692, 1064, 4256, 0x428eb932 +0, 42756, 42756, 1064, 4256, 0x17ea8c94 +0, 43820, 43820, 1078, 4312, 0xb3e761d7 +0, 44898, 44898, 1064, 4256, 0x0919755a +0, 45962, 45962, 1064, 4256, 0x5e520edd +0, 47026, 47026, 1078, 4312, 0x69aa070e +0, 48104, 48104, 1064, 4256, 0xf8192f7d +0, 49168, 49168, 1064, 4256, 0xaad4475c +0, 50232, 50232, 1078, 4312, 0x0cabcfcb +0, 51310, 51310, 1064, 4256, 0x952f0f96 +0, 52374, 52374, 1064, 4256, 0x1b805a0c +0, 53438, 53438, 1078, 4312, 0x93043d2a +0, 54516, 54516, 1064, 4256, 0x38b99e44 +0, 55580, 55580, 1064, 4256, 0x60cc52ff +0, 56644, 56644, 1078, 4312, 0x6a875849 +0, 57722, 57722, 1064, 4256, 0xd08d6d0e +0, 58786, 58786, 1064, 4256, 0x36bfe48e +0, 59850, 59850, 1078, 4312, 0x795c6134 +0, 60928, 60928, 1064, 4256, 0x4fd79583 +0, 61992, 61992, 1064, 4256, 0x65e2ab9f +0, 63056, 63056, 1078, 4312, 0xedeede4a +0, 64134, 64134, 1064, 4256, 0x097e0d09 +0, 65198, 65198, 1064, 4256, 0x58afa133 +0, 66262, 66262, 1078, 4312, 0x442525b5 +0, 67340, 67340, 1064, 4256, 0x6645c591 +0, 68404, 68404, 1064, 4256, 0xb0dd948a +0, 69468, 69468, 1078, 4312, 0x12684e69 +0, 70546, 70546, 1064, 4256, 0xb45098e3 +0, 71610, 71610, 1064, 4256, 0xb6d3c61c +0, 72674, 72674, 1078, 4312, 0xb46b5b22 +0, 73752, 73752, 1064, 4256, 0x9a556830 +0, 74816, 74816, 1064, 4256, 0x67ca2b35 diff --git a/tests/ref/fate/ea-dct b/tests/ref/fate/ea-dct deleted file mode 100644 index 071be8abb6..0000000000 --- a/tests/ref/fate/ea-dct +++ /dev/null @@ -1,269 +0,0 @@ -#tb 0: 1/15 -#tb 1: 1/22050 -0, 0, 0, 1, 102144, 0x6edc83de -1, 0, 0, 1484, 5936, 0xea261a29 -0, 1, 1, 1, 102144, 0xd0534fda -1, 1484, 1484, 1456, 5824, 0x253df061 -0, 2, 2, 1, 102144, 0x6447911f -1, 2940, 2940, 1484, 5936, 0x603a5bd7 -0, 3, 3, 1, 102144, 0xf21f3b46 -1, 4424, 4424, 1456, 5824, 0x9d283f59 -0, 4, 4, 1, 102144, 0x0975077a -1, 5880, 5880, 1484, 5936, 0x49323497 -0, 5, 5, 1, 102144, 0xb9a12d8e -1, 7364, 7364, 1456, 5824, 0x7c299939 -0, 6, 6, 1, 102144, 0x17413513 -1, 8820, 8820, 1484, 5936, 0x9f918e9a -0, 7, 7, 1, 102144, 0x1e622a04 -1, 10304, 10304, 1456, 5824, 0x1226b534 -0, 8, 8, 1, 102144, 0x7489224e -1, 11760, 11760, 1484, 5936, 0xdd159326 -0, 9, 9, 1, 102144, 0xae14956e -1, 13244, 13244, 1456, 5824, 0x361ad10f -0, 10, 10, 1, 102144, 0x104fd3a0 -1, 14700, 14700, 1484, 5936, 0x6ccac9e3 -0, 11, 11, 1, 102144, 0xea63a940 -1, 16184, 16184, 1456, 5824, 0x1861efef -0, 12, 12, 1, 102144, 0x0cf81588 -1, 17640, 17640, 1484, 5936, 0x5f718eb9 -0, 13, 13, 1, 102144, 0xe4a5b2fd -1, 19124, 19124, 1456, 5824, 0xd4ca72ba -0, 14, 14, 1, 102144, 0x0c9aaf77 -1, 20580, 20580, 1484, 5936, 0xbf2b27e6 -0, 15, 15, 1, 102144, 0x065007d7 -1, 22064, 22064, 1456, 5824, 0xcb6f024e -0, 16, 16, 1, 102144, 0x54c0c29b -1, 23520, 23520, 1484, 5936, 0x7dfb7e05 -0, 17, 17, 1, 102144, 0x1114cb8e -1, 25004, 25004, 1456, 5824, 0x80e16f13 -0, 18, 18, 1, 102144, 0xe4270462 -1, 26460, 26460, 1484, 5936, 0x0fb59227 -0, 19, 19, 1, 102144, 0x61e5b7fd -1, 27944, 27944, 1456, 5824, 0x4d6f1fdb -0, 20, 20, 1, 102144, 0x7cbeaca6 -1, 29400, 29400, 1484, 5936, 0x505a5103 -0, 21, 21, 1, 102144, 0xed92daa4 -1, 30884, 30884, 1456, 5824, 0x47ef4c13 -0, 22, 22, 1, 102144, 0xd8654d0d -1, 32340, 32340, 1484, 5936, 0xbe4795fb -0, 23, 23, 1, 102144, 0x854e842b -1, 33824, 33824, 1456, 5824, 0xb82cc4ff -0, 24, 24, 1, 102144, 0x56407c3a -1, 35280, 35280, 1484, 5936, 0xf7c6ab8d -0, 25, 25, 1, 102144, 0x17db3f90 -1, 36764, 36764, 1456, 5824, 0x1442f5e0 -0, 26, 26, 1, 102144, 0x8b133b9a -1, 38220, 38220, 1484, 5936, 0x64659389 -0, 27, 27, 1, 102144, 0xe4899db9 -1, 39704, 39704, 1456, 5824, 0xdd81725c -0, 28, 28, 1, 102144, 0x579cf092 -1, 41160, 41160, 1484, 5936, 0x7f7c604f -0, 29, 29, 1, 102144, 0x19fa5062 -1, 42644, 42644, 1456, 5824, 0xafc77beb -0, 30, 30, 1, 102144, 0x71339792 -1, 44100, 44100, 1484, 5936, 0x24f88e4d -0, 31, 31, 1, 102144, 0x970e5c0c -1, 45584, 45584, 1456, 5824, 0xa31956ca -0, 32, 32, 1, 102144, 0x84ee616a -1, 47040, 47040, 1484, 5936, 0x958e02b9 -0, 33, 33, 1, 102144, 0x1d6f9a23 -1, 48524, 48524, 1456, 5824, 0xcfc79890 -0, 34, 34, 1, 102144, 0xc28e19db -1, 49980, 49980, 1484, 5936, 0xc7e788ae -0, 35, 35, 1, 102144, 0x0e898967 -1, 51464, 51464, 1456, 5824, 0x4b6b1acc -0, 36, 36, 1, 102144, 0x52a8b671 -1, 52920, 52920, 1484, 5936, 0xa74496dc -0, 37, 37, 1, 102144, 0x3f45ea83 -1, 54404, 54404, 1456, 5824, 0x719e6171 -0, 38, 38, 1, 102144, 0x7b0fc603 -1, 55860, 55860, 1484, 5936, 0x9346222d -0, 39, 39, 1, 102144, 0x14f94469 -1, 57344, 57344, 1456, 5824, 0x9e2a876e -0, 40, 40, 1, 102144, 0x5b9f37cc -1, 58800, 58800, 1484, 5936, 0xeca6ea64 -0, 41, 41, 1, 102144, 0xf902b7c7 -1, 60284, 60284, 1456, 5824, 0x07d8174f -0, 42, 42, 1, 102144, 0x326836e0 -1, 61740, 61740, 1484, 5936, 0x2df5aa6b -0, 43, 43, 1, 102144, 0x2e4aebba -1, 63224, 63224, 1456, 5824, 0x314e7034 -0, 44, 44, 1, 102144, 0xd10ae58c -1, 64680, 64680, 1484, 5936, 0x5a328768 -0, 45, 45, 1, 102144, 0xbd084ecf -1, 66164, 66164, 1456, 5824, 0x32b92446 -0, 46, 46, 1, 102144, 0xb2157c0a -1, 67620, 67620, 1484, 5936, 0x20ecbc9b -0, 47, 47, 1, 102144, 0xd7f158d4 -1, 69104, 69104, 1456, 5824, 0x76019c14 -0, 48, 48, 1, 102144, 0x3cf86462 -1, 70560, 70560, 1484, 5936, 0x8c3ef8a6 -0, 49, 49, 1, 102144, 0x53ecddab -1, 72044, 72044, 1456, 5824, 0xcdaab50b -0, 50, 50, 1, 102144, 0xcdaba8ef -1, 73500, 73500, 1484, 5936, 0xb2f87f4f -0, 51, 51, 1, 102144, 0xab9ede18 -1, 74984, 74984, 1456, 5824, 0x70c26379 -0, 52, 52, 1, 102144, 0xb6706e79 -1, 76440, 76440, 1484, 5936, 0x5691ecfd -0, 53, 53, 1, 102144, 0x76371069 -1, 77924, 77924, 1456, 5824, 0x61e208fe -0, 54, 54, 1, 102144, 0x3a365016 -1, 79380, 79380, 1484, 5936, 0x87d1a5e0 -0, 55, 55, 1, 102144, 0x52177c09 -1, 80864, 80864, 1456, 5824, 0x02054cfd -0, 56, 56, 1, 102144, 0xc33eb4fb -1, 82320, 82320, 1484, 5936, 0x22ff1c4b -0, 57, 57, 1, 102144, 0x16098436 -1, 83804, 83804, 1456, 5824, 0xc6d87fef -0, 58, 58, 1, 102144, 0x715d6a2b -1, 85260, 85260, 1484, 5936, 0x9028bb3b -0, 59, 59, 1, 102144, 0xd3abc960 -1, 86744, 86744, 1456, 5824, 0xbadde406 -0, 60, 60, 1, 102144, 0x7f34b0d4 -1, 88200, 88200, 1484, 5936, 0x6e88ddf1 -0, 61, 61, 1, 102144, 0xe3219b9c -1, 89684, 89684, 1456, 5824, 0x5bb8be6e -0, 62, 62, 1, 102144, 0x5fa54f54 -1, 91140, 91140, 1484, 5936, 0xe1f8d7fc -0, 63, 63, 1, 102144, 0x0fb746cb -1, 92624, 92624, 1456, 5824, 0xc824e388 -0, 64, 64, 1, 102144, 0xa6bd2da2 -1, 94080, 94080, 1484, 5936, 0x654371a9 -0, 65, 65, 1, 102144, 0x04579119 -1, 95564, 95564, 1456, 5824, 0xae6ee9ec -0, 66, 66, 1, 102144, 0xda818691 -1, 97020, 97020, 1484, 5936, 0x9aa4550d -0, 67, 67, 1, 102144, 0xe9d44445 -1, 98504, 98504, 1456, 5824, 0xdce210ac -0, 68, 68, 1, 102144, 0x94868dc9 -1, 99960, 99960, 1484, 5936, 0xb12641c8 -0, 69, 69, 1, 102144, 0x3ca52ce6 -1, 101444, 101444, 1456, 5824, 0x277e014b -0, 70, 70, 1, 102144, 0xd7eb4c4f -1, 102900, 102900, 1484, 5936, 0xb0d262de -0, 71, 71, 1, 102144, 0xfcdfafca -1, 104384, 104384, 1456, 5824, 0xf94d6f49 -0, 72, 72, 1, 102144, 0x473a4a5a -1, 105840, 105840, 1484, 5936, 0x3d7848cb -0, 73, 73, 1, 102144, 0xe5a5f3cb -1, 107324, 107324, 1456, 5824, 0xe67fc08e -0, 74, 74, 1, 102144, 0x34070219 -1, 108780, 108780, 1484, 5936, 0x0475e0d6 -0, 75, 75, 1, 102144, 0x0faa965a -1, 110264, 110264, 1456, 5824, 0x8a9a4a2e -0, 76, 76, 1, 102144, 0xe2c6acda -1, 111720, 111720, 1484, 5936, 0x82576204 -0, 77, 77, 1, 102144, 0xe22776d5 -1, 113204, 113204, 1456, 5824, 0x3017b648 -0, 78, 78, 1, 102144, 0x80d85602 -1, 114660, 114660, 1484, 5936, 0xca4c3e04 -0, 79, 79, 1, 102144, 0x2f3fa190 -1, 116144, 116144, 1456, 5824, 0x340077d1 -0, 80, 80, 1, 102144, 0x70b461b1 -1, 117600, 117600, 1484, 5936, 0x805bea6e -0, 81, 81, 1, 102144, 0x366c8b27 -1, 119084, 119084, 1456, 5824, 0x2cf6c87b -0, 82, 82, 1, 102144, 0x65cc0866 -1, 120540, 120540, 1484, 5936, 0x3635bc5f -0, 83, 83, 1, 102144, 0x903beb14 -1, 122024, 122024, 1456, 5824, 0x0d7a81c7 -0, 84, 84, 1, 102144, 0xb6c5f5c7 -1, 123480, 123480, 1484, 5936, 0x26179764 -0, 85, 85, 1, 102144, 0xaa813725 -1, 124964, 124964, 1456, 5824, 0xa0b2454f -0, 86, 86, 1, 102144, 0x014a84a0 -1, 126420, 126420, 1484, 5936, 0x91d24608 -0, 87, 87, 1, 102144, 0xd286ece1 -1, 127904, 127904, 1456, 5824, 0x6509b3e1 -0, 88, 88, 1, 102144, 0x48b1c27d -1, 129360, 129360, 1484, 5936, 0xa0e3c9fc -0, 89, 89, 1, 102144, 0xa611ef42 -1, 130844, 130844, 1456, 5824, 0x18682a2f -0, 90, 90, 1, 102144, 0x98627584 -1, 132300, 132300, 1484, 5936, 0x89cea4ff -0, 91, 91, 1, 102144, 0x43de7c75 -1, 133784, 133784, 1456, 5824, 0x7dd22b85 -0, 92, 92, 1, 102144, 0xa9e22c68 -1, 135240, 135240, 1484, 5936, 0x8b2eeb8d -0, 93, 93, 1, 102144, 0x84ac34d4 -1, 136724, 136724, 1456, 5824, 0x0c21af82 -0, 94, 94, 1, 102144, 0x6abd00ba -1, 138180, 138180, 1484, 5936, 0x9c5a748d -0, 95, 95, 1, 102144, 0x5d11066e -1, 139664, 139664, 1456, 5824, 0x1dc72c5c -0, 96, 96, 1, 102144, 0xb6b083aa -1, 141120, 141120, 1484, 5936, 0xe6129383 -0, 97, 97, 1, 102144, 0x5d152a11 -1, 142604, 142604, 1456, 5824, 0x0a44312a -0, 98, 98, 1, 102144, 0x0c0aec67 -1, 144060, 144060, 1484, 5936, 0x7ed30640 -0, 99, 99, 1, 102144, 0xa248bd10 -1, 145544, 145544, 1456, 5824, 0xede15f25 -0, 100, 100, 1, 102144, 0x4e6c12cc -1, 147000, 147000, 1484, 5936, 0x0096d0f3 -0, 101, 101, 1, 102144, 0xca1d6753 -1, 148484, 148484, 1456, 5824, 0x13764b4b -0, 102, 102, 1, 102144, 0x116310c3 -1, 149940, 149940, 1484, 5936, 0xd4608756 -0, 103, 103, 1, 102144, 0x16903cd0 -1, 151424, 151424, 1456, 5824, 0x254b5f2a -0, 104, 104, 1, 102144, 0x239adfed -1, 152880, 152880, 1484, 5936, 0x7705b830 -0, 105, 105, 1, 102144, 0x0970ce49 -1, 154364, 154364, 1456, 5824, 0x64a63d78 -0, 106, 106, 1, 102144, 0xb628adc1 -1, 155820, 155820, 1484, 5936, 0xc02d81a6 -0, 107, 107, 1, 102144, 0x473613f7 -1, 157304, 157304, 1456, 5824, 0xd239e55e -0, 108, 108, 1, 102144, 0x3eef3987 -1, 158760, 158760, 1484, 5936, 0x8018cd3a -0, 109, 109, 1, 102144, 0x935b99ca -1, 160244, 160244, 1456, 5824, 0xf86b8a98 -0, 110, 110, 1, 102144, 0xb9f4d6ee -1, 161700, 161700, 1484, 5936, 0x2a0078bc -0, 111, 111, 1, 102144, 0xac811656 -1, 163184, 163184, 1456, 5824, 0x058d4e1b -0, 112, 112, 1, 102144, 0xd1f84af0 -1, 164640, 164640, 1484, 5936, 0xbc718309 -0, 113, 113, 1, 102144, 0xf2fd25f4 -1, 166124, 166124, 1456, 5824, 0xaf6c29e5 -0, 114, 114, 1, 102144, 0x935bbed9 -1, 167580, 167580, 1484, 5936, 0x80df004d -0, 115, 115, 1, 102144, 0x8c8c3e53 -1, 169064, 169064, 1456, 5824, 0xeca5aa57 -0, 116, 116, 1, 102144, 0x24afc20f -1, 170520, 170520, 1484, 5936, 0xb793a8f8 -0, 117, 117, 1, 102144, 0xad20a451 -1, 172004, 172004, 1456, 5824, 0x70fa6aff -0, 118, 118, 1, 102144, 0xd1a0df13 -1, 173460, 173460, 1484, 5936, 0xda8d4cc6 -0, 119, 119, 1, 102144, 0xb0ee53f8 -1, 174944, 174944, 1456, 5824, 0xa70088eb -0, 120, 120, 1, 102144, 0x08cdb591 -1, 176400, 176400, 1484, 5936, 0x1c0b0aab -0, 121, 121, 1, 102144, 0x89b985b0 -1, 177884, 177884, 1456, 5824, 0x234d2436 -0, 122, 122, 1, 102144, 0xdd27d51f -1, 179340, 179340, 1484, 5936, 0xf79d731e -0, 123, 123, 1, 102144, 0xa783fce0 -1, 180824, 180824, 1456, 5824, 0x5a4e454a -0, 124, 124, 1, 102144, 0xfe5602e8 -1, 182280, 182280, 1484, 5936, 0xccf6d042 -0, 125, 125, 1, 102144, 0xfb989934 -1, 183764, 183764, 1456, 5824, 0x4e524d14 -0, 126, 126, 1, 102144, 0xf857eb2b -1, 185220, 185220, 1484, 5936, 0xf8f2fcc3 -0, 127, 127, 1, 102144, 0x987a7098 -1, 186704, 186704, 1456, 5824, 0x08f12491 -0, 128, 128, 1, 102144, 0xbc749f42 -1, 188160, 188160, 1484, 5936, 0x506e0a42 -0, 129, 129, 1, 102144, 0x221e48a6 -1, 189644, 189644, 1456, 5824, 0x7cf05049 -0, 130, 130, 1, 102144, 0x4c4b5da2 -1, 191100, 191100, 1484, 5936, 0xdeb9d295 -0, 131, 131, 1, 102144, 0x32140027 -1, 192584, 192584, 1456, 5824, 0x758ef642 -0, 132, 132, 1, 102144, 0xbeb4bf18 -1, 194040, 194040, 1484, 5936, 0x91903980 -0, 133, 133, 1, 102144, 0x523012e5 diff --git a/tests/ref/fate/ea-mad b/tests/ref/fate/ea-mad new file mode 100644 index 0000000000..ce1df4af4b --- /dev/null +++ b/tests/ref/fate/ea-mad @@ -0,0 +1,97 @@ +#tb 0: 1/90000 +0, 0, 0, 0, 535680, 0x889c32cf +0, 2970, 2970, 0, 535680, 0x0b1ef044 +0, 5940, 5940, 0, 535680, 0xa7d0818b +0, 8910, 8910, 0, 535680, 0xf392e4e1 +0, 11880, 11880, 0, 535680, 0x08480c69 +0, 14850, 14850, 0, 535680, 0x2b8af1ed +0, 17820, 17820, 0, 535680, 0x0d58e062 +0, 20790, 20790, 0, 535680, 0xd140ced0 +0, 23760, 23760, 0, 535680, 0xbd0e6652 +0, 26730, 26730, 0, 535680, 0xdc2f2a6b +0, 29700, 29700, 0, 535680, 0x97c31a38 +0, 32670, 32670, 0, 535680, 0x1a2bdf38 +0, 35640, 35640, 0, 535680, 0xb3af3ac4 +0, 38610, 38610, 0, 535680, 0x07a52577 +0, 41580, 41580, 0, 535680, 0x78407368 +0, 44550, 44550, 0, 535680, 0xd2a9efc3 +0, 47520, 47520, 0, 535680, 0x36df2f29 +0, 50490, 50490, 0, 535680, 0x9821d8f7 +0, 53460, 53460, 0, 535680, 0xf64321aa +0, 56430, 56430, 0, 535680, 0x53e4d9aa +0, 59400, 59400, 0, 535680, 0xdbd6f853 +0, 62370, 62370, 0, 535680, 0x5d40cf8b +0, 65340, 65340, 0, 535680, 0xe624af9d +0, 68310, 68310, 0, 535680, 0xd9dbb4cd +0, 71280, 71280, 0, 535680, 0xf14e72ec +0, 74250, 74250, 0, 535680, 0xb35c18f6 +0, 77220, 77220, 0, 535680, 0xc96d7757 +0, 80190, 80190, 0, 535680, 0xdfb937df +0, 83160, 83160, 0, 535680, 0x40cd71d7 +0, 86130, 86130, 0, 535680, 0x15e176d6 +0, 89100, 89100, 0, 535680, 0x7f891b24 +0, 92070, 92070, 0, 535680, 0xb87a8c32 +0, 95040, 95040, 0, 535680, 0x0c01541f +0, 98010, 98010, 0, 535680, 0x9eee99b3 +0, 100980, 100980, 0, 535680, 0xd65eb689 +0, 103950, 103950, 0, 535680, 0x6e733cfa +0, 106920, 106920, 0, 535680, 0xac536670 +0, 109890, 109890, 0, 535680, 0x002275b8 +0, 112860, 112860, 0, 535680, 0x6a5385cb +0, 115830, 115830, 0, 535680, 0xd129ade3 +0, 118800, 118800, 0, 535680, 0x32cab5d7 +0, 121770, 121770, 0, 535680, 0x08be1c8f +0, 124740, 124740, 0, 535680, 0x59e1fba0 +0, 127710, 127710, 0, 535680, 0x138aee3a +0, 130680, 130680, 0, 535680, 0x4cfbcd5e +0, 133650, 133650, 0, 535680, 0xf6cf0fb4 +0, 136620, 136620, 0, 535680, 0xb13a06de +0, 139590, 139590, 0, 535680, 0x59176f00 +0, 142560, 142560, 0, 535680, 0xf84b4ca3 +0, 145530, 145530, 0, 535680, 0x7fd09f73 +0, 148500, 148500, 0, 535680, 0x3be383b8 +0, 151470, 151470, 0, 535680, 0xa7118e51 +0, 154440, 154440, 0, 535680, 0xbd83120c +0, 157410, 157410, 0, 535680, 0x3bc9d256 +0, 160380, 160380, 0, 535680, 0xb6c87f87 +0, 163350, 163350, 0, 535680, 0xe80d110a +0, 166320, 166320, 0, 535680, 0xb3a83362 +0, 169290, 169290, 0, 535680, 0xfb39eb52 +0, 172260, 172260, 0, 535680, 0xbf6e1220 +0, 175230, 175230, 0, 535680, 0x9ecdfbae +0, 178200, 178200, 0, 535680, 0x069a65f5 +0, 181170, 181170, 0, 535680, 0x206e372c +0, 184140, 184140, 0, 535680, 0x58c83dd4 +0, 187110, 187110, 0, 535680, 0xc3562b03 +0, 190080, 190080, 0, 535680, 0xd1ed85a0 +0, 193050, 193050, 0, 535680, 0xb6205f4b +0, 196020, 196020, 0, 535680, 0xaedf8bfa +0, 198990, 198990, 0, 535680, 0xa48d5dea +0, 201960, 201960, 0, 535680, 0xff82e7c1 +0, 204930, 204930, 0, 535680, 0xc9560222 +0, 207900, 207900, 0, 535680, 0x0fafa549 +0, 210870, 210870, 0, 535680, 0x8d556ccb +0, 213840, 213840, 0, 535680, 0x802aac1f +0, 216810, 216810, 0, 535680, 0x7d0fa168 +0, 219780, 219780, 0, 535680, 0x1a9255c9 +0, 222750, 222750, 0, 535680, 0xb4ec7e35 +0, 225720, 225720, 0, 535680, 0x48fac072 +0, 228690, 228690, 0, 535680, 0x1e260135 +0, 231660, 231660, 0, 535680, 0xce4d5079 +0, 234630, 234630, 0, 535680, 0x13e5e4ed +0, 237600, 237600, 0, 535680, 0x592305ec +0, 240570, 240570, 0, 535680, 0x9e227508 +0, 243540, 243540, 0, 535680, 0x1d37e5ea +0, 246510, 246510, 0, 535680, 0x7eae7692 +0, 249480, 249480, 0, 535680, 0xf452e4b9 +0, 252450, 252450, 0, 535680, 0x1460e7e9 +0, 255420, 255420, 0, 535680, 0xc6d8a638 +0, 258390, 258390, 0, 535680, 0x854f5fb0 +0, 261360, 261360, 0, 535680, 0x854f5fb0 +0, 264330, 264330, 0, 535680, 0x70a02d87 +0, 267300, 267300, 0, 535680, 0x9a4ad464 +0, 270270, 270270, 0, 535680, 0x9a4ad464 +0, 273240, 273240, 0, 535680, 0x9a4ad464 +0, 276210, 276210, 0, 535680, 0x9a4ad464 +0, 279180, 279180, 0, 535680, 0x9a4ad464 +0, 282150, 282150, 0, 535680, 0x9a4ad464 diff --git a/tests/ref/fate/ea-tgv-1 b/tests/ref/fate/ea-tgv-1 new file mode 100644 index 0000000000..fc9218164b --- /dev/null +++ b/tests/ref/fate/ea-tgv-1 @@ -0,0 +1,48 @@ +#tb 0: 1/15 +0, 0, 0, 1, 230400, 0xfbf2581e +0, 1, 1, 1, 230400, 0xfbf2581e +0, 2, 2, 1, 230400, 0xfbf2581e +0, 3, 3, 1, 230400, 0xfbf2581e +0, 4, 4, 1, 230400, 0xfbf2581e +0, 5, 5, 1, 230400, 0xfbf2581e +0, 6, 6, 1, 230400, 0xfbf2581e +0, 7, 7, 1, 230400, 0xfbf2581e +0, 8, 8, 1, 230400, 0xfbf2581e +0, 9, 9, 1, 230400, 0xfbf2581e +0, 10, 10, 1, 230400, 0xfbf2581e +0, 11, 11, 1, 230400, 0xfbf2581e +0, 12, 12, 1, 230400, 0xfbf2581e +0, 13, 13, 1, 230400, 0xfbf2581e +0, 14, 14, 1, 230400, 0xfbf2581e +0, 15, 15, 1, 230400, 0xf5a0a21d +0, 16, 16, 1, 230400, 0x909cc039 +0, 17, 17, 1, 230400, 0x14d899dd +0, 18, 18, 1, 230400, 0x0d246edf +0, 19, 19, 1, 230400, 0x5345fe0d +0, 20, 20, 1, 230400, 0x5abdff9a +0, 21, 21, 1, 230400, 0x1730d973 +0, 22, 22, 1, 230400, 0xec881be9 +0, 23, 23, 1, 230400, 0xf4216895 +0, 24, 24, 1, 230400, 0x529d7a52 +0, 25, 25, 1, 230400, 0x93b4c7b9 +0, 26, 26, 1, 230400, 0xedc65bcd +0, 27, 27, 1, 230400, 0xf0fb54ae +0, 28, 28, 1, 230400, 0x27864ce9 +0, 29, 29, 1, 230400, 0xcd05012d +0, 30, 30, 1, 230400, 0x019b6d84 +0, 31, 31, 1, 230400, 0xcc05d416 +0, 32, 32, 1, 230400, 0xb04c0248 +0, 33, 33, 1, 230400, 0x6806eb92 +0, 34, 34, 1, 230400, 0x60e9c001 +0, 35, 35, 1, 230400, 0x9b040261 +0, 36, 36, 1, 230400, 0x6961fb90 +0, 37, 37, 1, 230400, 0xbf67ad24 +0, 38, 38, 1, 230400, 0x2270f328 +0, 39, 39, 1, 230400, 0xd0c345f6 +0, 40, 40, 1, 230400, 0xfd159212 +0, 41, 41, 1, 230400, 0x085578ff +0, 42, 42, 1, 230400, 0xcca8afa6 +0, 43, 43, 1, 230400, 0x901ec91c +0, 44, 44, 1, 230400, 0xf1cb99f3 +0, 45, 45, 1, 230400, 0x86d98f0c +0, 46, 46, 1, 230400, 0x52970700 diff --git a/tests/ref/fate/ea-tgv-2 b/tests/ref/fate/ea-tgv-2 new file mode 100644 index 0000000000..5e9de02149 --- /dev/null +++ b/tests/ref/fate/ea-tgv-2 @@ -0,0 +1,39 @@ +#tb 0: 1/15 +0, 0, 0, 1, 192000, 0xdfc2f225 +0, 1, 1, 1, 192000, 0x059b57bd +0, 2, 2, 1, 192000, 0x766cb086 +0, 3, 3, 1, 192000, 0x459e3bac +0, 4, 4, 1, 192000, 0x5293e622 +0, 5, 5, 1, 192000, 0x898b03f4 +0, 6, 6, 1, 192000, 0xb184a627 +0, 7, 7, 1, 192000, 0xa3fc650a +0, 8, 8, 1, 192000, 0xea448589 +0, 9, 9, 1, 192000, 0x700e2b76 +0, 10, 10, 1, 192000, 0xa1a1d66d +0, 11, 11, 1, 192000, 0xd63bc8a1 +0, 12, 12, 1, 192000, 0x5f08c023 +0, 13, 13, 1, 192000, 0x8b75ec3b +0, 14, 14, 1, 192000, 0x62728ce4 +0, 15, 15, 1, 192000, 0xaa007941 +0, 16, 16, 1, 192000, 0x55dc5b3b +0, 17, 17, 1, 192000, 0x72d836c2 +0, 18, 18, 1, 192000, 0x1f2de2fc +0, 19, 19, 1, 192000, 0xb295dfdb +0, 20, 20, 1, 192000, 0xe5c5f634 +0, 21, 21, 1, 192000, 0x455a0464 +0, 22, 22, 1, 192000, 0x3bf2340d +0, 23, 23, 1, 192000, 0xe368f0fc +0, 24, 24, 1, 192000, 0xfa7549c0 +0, 25, 25, 1, 192000, 0x4dd76f3d +0, 26, 26, 1, 192000, 0x50a49f6c +0, 27, 27, 1, 192000, 0xb6072f65 +0, 28, 28, 1, 192000, 0x093ce1a8 +0, 29, 29, 1, 192000, 0x55afe3db +0, 30, 30, 1, 192000, 0x81c3bfab +0, 31, 31, 1, 192000, 0x583ebd3d +0, 32, 32, 1, 192000, 0x2504f003 +0, 33, 33, 1, 192000, 0x44ade2af +0, 34, 34, 1, 192000, 0x77cbcfd8 +0, 35, 35, 1, 192000, 0xac7ddfa1 +0, 36, 36, 1, 192000, 0x79f7cfe8 +0, 37, 37, 1, 192000, 0xdf2898fd diff --git a/tests/ref/fate/ea-tgv-ima-ea-eacs b/tests/ref/fate/ea-tgv-ima-ea-eacs deleted file mode 100644 index 1814e3ce83..0000000000 --- a/tests/ref/fate/ea-tgv-ima-ea-eacs +++ /dev/null @@ -1,96 +0,0 @@ -#tb 0: 1/15 -#tb 1: 1/22050 -0, 0, 0, 1, 230400, 0xfbf2581e -1, 0, 0, 1468, 5872, 0x00000000 -1, 1468, 1468, 1468, 5872, 0x00000000 -0, 1, 1, 1, 230400, 0xfbf2581e -1, 2936, 2936, 1468, 5872, 0x00000000 -0, 2, 2, 1, 230400, 0xfbf2581e -1, 4404, 4404, 1468, 5872, 0x00000000 -0, 3, 3, 1, 230400, 0xfbf2581e -1, 5872, 5872, 1468, 5872, 0x00000000 -0, 4, 4, 1, 230400, 0xfbf2581e -1, 7340, 7340, 1468, 5872, 0x00000000 -0, 5, 5, 1, 230400, 0xfbf2581e -1, 8808, 8808, 1468, 5872, 0x00000000 -0, 6, 6, 1, 230400, 0xfbf2581e -1, 10276, 10276, 1468, 5872, 0x00000000 -0, 7, 7, 1, 230400, 0xfbf2581e -1, 11744, 11744, 1468, 5872, 0x00000000 -0, 8, 8, 1, 230400, 0xfbf2581e -1, 13212, 13212, 1468, 5872, 0x00000000 -0, 9, 9, 1, 230400, 0xfbf2581e -1, 14680, 14680, 1468, 5872, 0x00000000 -0, 10, 10, 1, 230400, 0xfbf2581e -1, 16148, 16148, 1468, 5872, 0x00000000 -0, 11, 11, 1, 230400, 0xfbf2581e -1, 17616, 17616, 1468, 5872, 0x00000000 -0, 12, 12, 1, 230400, 0xfbf2581e -1, 19084, 19084, 1468, 5872, 0x00000000 -0, 13, 13, 1, 230400, 0xfbf2581e -1, 20552, 20552, 1468, 5872, 0x00000000 -0, 14, 14, 1, 230400, 0xfbf2581e -1, 22020, 22020, 1468, 5872, 0xc6f64777 -0, 15, 15, 1, 230400, 0xf5a0a21d -1, 23488, 23488, 1468, 5872, 0x7c9e60e8 -0, 16, 16, 1, 230400, 0x909cc039 -1, 24956, 24956, 1468, 5872, 0x46525c54 -0, 17, 17, 1, 230400, 0x14d899dd -1, 26424, 26424, 1468, 5872, 0x842796bb -0, 18, 18, 1, 230400, 0x0d246edf -1, 27892, 27892, 1468, 5872, 0xb1f6cbd5 -0, 19, 19, 1, 230400, 0x5345fe0d -1, 29360, 29360, 1468, 5872, 0x0261a74b -0, 20, 20, 1, 230400, 0x5abdff9a -1, 30828, 30828, 1468, 5872, 0x8218b1f9 -0, 21, 21, 1, 230400, 0x1730d973 -1, 32296, 32296, 1468, 5872, 0xd7a2cae6 -0, 22, 22, 1, 230400, 0xec881be9 -1, 33764, 33764, 1468, 5872, 0x69d34562 -0, 23, 23, 1, 230400, 0xf4216895 -1, 35232, 35232, 1468, 5872, 0x9303ec65 -0, 24, 24, 1, 230400, 0x529d7a52 -1, 36700, 36700, 1468, 5872, 0xd5d963a1 -0, 25, 25, 1, 230400, 0x93b4c7b9 -1, 38168, 38168, 1468, 5872, 0x0557e06f -0, 26, 26, 1, 230400, 0xedc65bcd -1, 39636, 39636, 1468, 5872, 0x1eb48b41 -0, 27, 27, 1, 230400, 0xf0fb54ae -1, 41104, 41104, 1468, 5872, 0x70f5ca3f -0, 28, 28, 1, 230400, 0x27864ce9 -1, 42572, 42572, 1468, 5872, 0xd39e5c5e -0, 29, 29, 1, 230400, 0xcd05012d -1, 44040, 44040, 1468, 5872, 0x29c59140 -0, 30, 30, 1, 230400, 0x019b6d84 -1, 45508, 45508, 1468, 5872, 0x7d95e643 -0, 31, 31, 1, 230400, 0xcc05d416 -1, 46976, 46976, 1468, 5872, 0x45353fd8 -0, 32, 32, 1, 230400, 0xb04c0248 -1, 48444, 48444, 1468, 5872, 0xad7b1b27 -0, 33, 33, 1, 230400, 0x6806eb92 -1, 49912, 49912, 1468, 5872, 0x1f0377b3 -0, 34, 34, 1, 230400, 0x60e9c001 -1, 51380, 51380, 1468, 5872, 0x6074541e -0, 35, 35, 1, 230400, 0x9b040261 -1, 52848, 52848, 1468, 5872, 0xa4f5e892 -0, 36, 36, 1, 230400, 0x6961fb90 -1, 54316, 54316, 1468, 5872, 0x084bc696 -0, 37, 37, 1, 230400, 0xbf67ad24 -1, 55784, 55784, 1468, 5872, 0x67fdafce -0, 38, 38, 1, 230400, 0x2270f328 -1, 57252, 57252, 1468, 5872, 0x8dfd249d -0, 39, 39, 1, 230400, 0xd0c345f6 -1, 58720, 58720, 1468, 5872, 0x514184ee -0, 40, 40, 1, 230400, 0xfd159212 -1, 60188, 60188, 1468, 5872, 0xc0090b0d -0, 41, 41, 1, 230400, 0x085578ff -1, 61656, 61656, 1468, 5872, 0xc1171cc8 -0, 42, 42, 1, 230400, 0xcca8afa6 -1, 63124, 63124, 1468, 5872, 0x7d7dd07e -0, 43, 43, 1, 230400, 0x901ec91c -1, 64592, 64592, 1468, 5872, 0xe6aa619c -0, 44, 44, 1, 230400, 0xf1cb99f3 -1, 66060, 66060, 1468, 5872, 0xd5aac0df -0, 45, 45, 1, 230400, 0x86d98f0c -1, 67528, 67528, 1468, 5872, 0x3b68b390 -0, 46, 46, 1, 230400, 0x52970700 diff --git a/tests/ref/fate/ea-tgv-ima-ea-sead b/tests/ref/fate/ea-tgv-ima-ea-sead deleted file mode 100644 index bfc9cb58fe..0000000000 --- a/tests/ref/fate/ea-tgv-ima-ea-sead +++ /dev/null @@ -1,89 +0,0 @@ -#tb 0: 1/15 -#tb 1: 1/22050 -0, 0, 0, 1, 192000, 0xdfc2f225 -1, 0, 0, 736, 2944, 0x00000000 -1, 736, 736, 1472, 5888, 0x5ae3c2a4 -0, 1, 1, 1, 192000, 0x059b57bd -1, 2208, 2208, 1472, 5888, 0x158fbcb4 -0, 2, 2, 1, 192000, 0x766cb086 -1, 3680, 3680, 1472, 5888, 0x3fc85d35 -0, 3, 3, 1, 192000, 0x459e3bac -1, 5152, 5152, 1472, 5888, 0x4667ec2b -0, 4, 4, 1, 192000, 0x5293e622 -1, 6624, 6624, 1472, 5888, 0x82744494 -0, 5, 5, 1, 192000, 0x898b03f4 -1, 8096, 8096, 1472, 5888, 0x3b0cb86f -0, 6, 6, 1, 192000, 0xb184a627 -1, 9568, 9568, 1472, 5888, 0x29493fbb -0, 7, 7, 1, 192000, 0xa3fc650a -1, 11040, 11040, 1472, 5888, 0xaa2d8595 -0, 8, 8, 1, 192000, 0xea448589 -1, 12512, 12512, 1472, 5888, 0x2e563de6 -0, 9, 9, 1, 192000, 0x700e2b76 -1, 13984, 13984, 1472, 5888, 0x225cca99 -0, 10, 10, 1, 192000, 0xa1a1d66d -1, 15456, 15456, 1472, 5888, 0x2b577599 -0, 11, 11, 1, 192000, 0xd63bc8a1 -1, 16928, 16928, 1472, 5888, 0x3d967f32 -0, 12, 12, 1, 192000, 0x5f08c023 -1, 18400, 18400, 1472, 5888, 0x16639a84 -0, 13, 13, 1, 192000, 0x8b75ec3b -1, 19872, 19872, 1472, 5888, 0x90549ba0 -0, 14, 14, 1, 192000, 0x62728ce4 -1, 21344, 21344, 1472, 5888, 0xf46e6644 -0, 15, 15, 1, 192000, 0xaa007941 -1, 22816, 22816, 1472, 5888, 0x39a073ec -0, 16, 16, 1, 192000, 0x55dc5b3b -1, 24288, 24288, 1472, 5888, 0xb1d7a93a -0, 17, 17, 1, 192000, 0x72d836c2 -1, 25760, 25760, 1472, 5888, 0x25e9795b -0, 18, 18, 1, 192000, 0x1f2de2fc -1, 27232, 27232, 1472, 5888, 0xbbc07644 -0, 19, 19, 1, 192000, 0xb295dfdb -1, 28704, 28704, 1472, 5888, 0x323f6a1b -0, 20, 20, 1, 192000, 0xe5c5f634 -1, 30176, 30176, 1472, 5888, 0x7cae130b -0, 21, 21, 1, 192000, 0x455a0464 -1, 31648, 31648, 1472, 5888, 0xd23bf9c6 -0, 22, 22, 1, 192000, 0x3bf2340d -1, 33120, 33120, 1472, 5888, 0x5f73ef35 -0, 23, 23, 1, 192000, 0xe368f0fc -1, 34592, 34592, 1472, 5888, 0xc66026be -0, 24, 24, 1, 192000, 0xfa7549c0 -1, 36064, 36064, 1472, 5888, 0xc8fdb539 -0, 25, 25, 1, 192000, 0x4dd76f3d -1, 37536, 37536, 1472, 5888, 0x94c6bfbd -0, 26, 26, 1, 192000, 0x50a49f6c -1, 39008, 39008, 1472, 5888, 0xb77e1b83 -0, 27, 27, 1, 192000, 0xb6072f65 -1, 40480, 40480, 1472, 5888, 0x6c6d6693 -0, 28, 28, 1, 192000, 0x093ce1a8 -1, 41952, 41952, 1472, 5888, 0xd9f064d4 -0, 29, 29, 1, 192000, 0x55afe3db -1, 43424, 43424, 1472, 5888, 0x85dd990d -0, 30, 30, 1, 192000, 0x81c3bfab -1, 44896, 44896, 1472, 5888, 0x385e021b -0, 31, 31, 1, 192000, 0x583ebd3d -1, 46368, 46368, 1472, 5888, 0xac09fd02 -0, 32, 32, 1, 192000, 0x2504f003 -1, 47840, 47840, 1472, 5888, 0xc6dcdff2 -0, 33, 33, 1, 192000, 0x44ade2af -1, 49312, 49312, 1472, 5888, 0x86a6944d -0, 34, 34, 1, 192000, 0x77cbcfd8 -1, 50784, 50784, 1472, 5888, 0x8587b964 -0, 35, 35, 1, 192000, 0xac7ddfa1 -1, 52256, 52256, 1472, 5888, 0x2b0355ff -0, 36, 36, 1, 192000, 0x79f7cfe8 -1, 53728, 53728, 1472, 5888, 0xe4148a85 -0, 37, 37, 1, 192000, 0xdf2898fd -1, 55200, 55200, 1472, 5888, 0xdf02ed4f -1, 56672, 56672, 1472, 5888, 0x87a54b15 -1, 58144, 58144, 1472, 5888, 0x3ad2be45 -1, 59616, 59616, 1472, 5888, 0x3a49c2c3 -1, 61088, 61088, 1472, 5888, 0xc2b66404 -1, 62560, 62560, 1472, 5888, 0xac3e234a -1, 64032, 64032, 1472, 5888, 0x5dcf523b -1, 65504, 65504, 1472, 5888, 0x2034b5d6 -1, 66976, 66976, 1472, 5888, 0x96882832 -1, 68448, 68448, 1472, 5888, 0x2be3d534 -1, 69920, 69920, 1472, 5888, 0xa841a49d diff --git a/tests/ref/fate/ea-tqi b/tests/ref/fate/ea-tqi new file mode 100644 index 0000000000..ba0073b1e2 --- /dev/null +++ b/tests/ref/fate/ea-tqi @@ -0,0 +1,27 @@ +#tb 0: 1/90000 +0, 0, 0, 0, 115200, 0x375ec573 +0, 6000, 6000, 0, 115200, 0x375ec573 +0, 12000, 12000, 0, 115200, 0x375ec573 +0, 18000, 18000, 0, 115200, 0x375ec573 +0, 24000, 24000, 0, 115200, 0x375ec573 +0, 30000, 30000, 0, 115200, 0x375ec573 +0, 36000, 36000, 0, 115200, 0x375ec573 +0, 42000, 42000, 0, 115200, 0x375ec573 +0, 48000, 48000, 0, 115200, 0x0b4d31bf +0, 54000, 54000, 0, 115200, 0xdd724598 +0, 60000, 60000, 0, 115200, 0xc3077e75 +0, 66000, 66000, 0, 115200, 0xbf70778a +0, 72000, 72000, 0, 115200, 0x117eb766 +0, 78000, 78000, 0, 115200, 0x4617fbad +0, 84000, 84000, 0, 115200, 0x5f5b02d2 +0, 90000, 90000, 0, 115200, 0x2a9c5325 +0, 96000, 96000, 0, 115200, 0x14a89e2a +0, 102000, 102000, 0, 115200, 0xe69aa994 +0, 108000, 108000, 0, 115200, 0xfbacf589 +0, 114000, 114000, 0, 115200, 0x1d714c6e +0, 120000, 120000, 0, 115200, 0x6eff66cb +0, 126000, 126000, 0, 115200, 0xee21c1cb +0, 132000, 132000, 0, 115200, 0xce714ada +0, 138000, 138000, 0, 115200, 0xf89d56c3 +0, 144000, 144000, 0, 115200, 0x65fd5e60 +0, 150000, 150000, 0, 115200, 0x0c256424 diff --git a/tests/ref/fate/mdec b/tests/ref/fate/mdec new file mode 100644 index 0000000000..b7aab626e9 --- /dev/null +++ b/tests/ref/fate/mdec @@ -0,0 +1,135 @@ +#tb 0: 1/15 +0, 0, 0, 1, 102144, 0x6edc83de +0, 1, 1, 1, 102144, 0xd0534fda +0, 2, 2, 1, 102144, 0x6447911f +0, 3, 3, 1, 102144, 0xf21f3b46 +0, 4, 4, 1, 102144, 0x0975077a +0, 5, 5, 1, 102144, 0xb9a12d8e +0, 6, 6, 1, 102144, 0x17413513 +0, 7, 7, 1, 102144, 0x1e622a04 +0, 8, 8, 1, 102144, 0x7489224e +0, 9, 9, 1, 102144, 0xae14956e +0, 10, 10, 1, 102144, 0x104fd3a0 +0, 11, 11, 1, 102144, 0xea63a940 +0, 12, 12, 1, 102144, 0x0cf81588 +0, 13, 13, 1, 102144, 0xe4a5b2fd +0, 14, 14, 1, 102144, 0x0c9aaf77 +0, 15, 15, 1, 102144, 0x065007d7 +0, 16, 16, 1, 102144, 0x54c0c29b +0, 17, 17, 1, 102144, 0x1114cb8e +0, 18, 18, 1, 102144, 0xe4270462 +0, 19, 19, 1, 102144, 0x61e5b7fd +0, 20, 20, 1, 102144, 0x7cbeaca6 +0, 21, 21, 1, 102144, 0xed92daa4 +0, 22, 22, 1, 102144, 0xd8654d0d +0, 23, 23, 1, 102144, 0x854e842b +0, 24, 24, 1, 102144, 0x56407c3a +0, 25, 25, 1, 102144, 0x17db3f90 +0, 26, 26, 1, 102144, 0x8b133b9a +0, 27, 27, 1, 102144, 0xe4899db9 +0, 28, 28, 1, 102144, 0x579cf092 +0, 29, 29, 1, 102144, 0x19fa5062 +0, 30, 30, 1, 102144, 0x71339792 +0, 31, 31, 1, 102144, 0x970e5c0c +0, 32, 32, 1, 102144, 0x84ee616a +0, 33, 33, 1, 102144, 0x1d6f9a23 +0, 34, 34, 1, 102144, 0xc28e19db +0, 35, 35, 1, 102144, 0x0e898967 +0, 36, 36, 1, 102144, 0x52a8b671 +0, 37, 37, 1, 102144, 0x3f45ea83 +0, 38, 38, 1, 102144, 0x7b0fc603 +0, 39, 39, 1, 102144, 0x14f94469 +0, 40, 40, 1, 102144, 0x5b9f37cc +0, 41, 41, 1, 102144, 0xf902b7c7 +0, 42, 42, 1, 102144, 0x326836e0 +0, 43, 43, 1, 102144, 0x2e4aebba +0, 44, 44, 1, 102144, 0xd10ae58c +0, 45, 45, 1, 102144, 0xbd084ecf +0, 46, 46, 1, 102144, 0xb2157c0a +0, 47, 47, 1, 102144, 0xd7f158d4 +0, 48, 48, 1, 102144, 0x3cf86462 +0, 49, 49, 1, 102144, 0x53ecddab +0, 50, 50, 1, 102144, 0xcdaba8ef +0, 51, 51, 1, 102144, 0xab9ede18 +0, 52, 52, 1, 102144, 0xb6706e79 +0, 53, 53, 1, 102144, 0x76371069 +0, 54, 54, 1, 102144, 0x3a365016 +0, 55, 55, 1, 102144, 0x52177c09 +0, 56, 56, 1, 102144, 0xc33eb4fb +0, 57, 57, 1, 102144, 0x16098436 +0, 58, 58, 1, 102144, 0x715d6a2b +0, 59, 59, 1, 102144, 0xd3abc960 +0, 60, 60, 1, 102144, 0x7f34b0d4 +0, 61, 61, 1, 102144, 0xe3219b9c +0, 62, 62, 1, 102144, 0x5fa54f54 +0, 63, 63, 1, 102144, 0x0fb746cb +0, 64, 64, 1, 102144, 0xa6bd2da2 +0, 65, 65, 1, 102144, 0x04579119 +0, 66, 66, 1, 102144, 0xda818691 +0, 67, 67, 1, 102144, 0xe9d44445 +0, 68, 68, 1, 102144, 0x94868dc9 +0, 69, 69, 1, 102144, 0x3ca52ce6 +0, 70, 70, 1, 102144, 0xd7eb4c4f +0, 71, 71, 1, 102144, 0xfcdfafca +0, 72, 72, 1, 102144, 0x473a4a5a +0, 73, 73, 1, 102144, 0xe5a5f3cb +0, 74, 74, 1, 102144, 0x34070219 +0, 75, 75, 1, 102144, 0x0faa965a +0, 76, 76, 1, 102144, 0xe2c6acda +0, 77, 77, 1, 102144, 0xe22776d5 +0, 78, 78, 1, 102144, 0x80d85602 +0, 79, 79, 1, 102144, 0x2f3fa190 +0, 80, 80, 1, 102144, 0x70b461b1 +0, 81, 81, 1, 102144, 0x366c8b27 +0, 82, 82, 1, 102144, 0x65cc0866 +0, 83, 83, 1, 102144, 0x903beb14 +0, 84, 84, 1, 102144, 0xb6c5f5c7 +0, 85, 85, 1, 102144, 0xaa813725 +0, 86, 86, 1, 102144, 0x014a84a0 +0, 87, 87, 1, 102144, 0xd286ece1 +0, 88, 88, 1, 102144, 0x48b1c27d +0, 89, 89, 1, 102144, 0xa611ef42 +0, 90, 90, 1, 102144, 0x98627584 +0, 91, 91, 1, 102144, 0x43de7c75 +0, 92, 92, 1, 102144, 0xa9e22c68 +0, 93, 93, 1, 102144, 0x84ac34d4 +0, 94, 94, 1, 102144, 0x6abd00ba +0, 95, 95, 1, 102144, 0x5d11066e +0, 96, 96, 1, 102144, 0xb6b083aa +0, 97, 97, 1, 102144, 0x5d152a11 +0, 98, 98, 1, 102144, 0x0c0aec67 +0, 99, 99, 1, 102144, 0xa248bd10 +0, 100, 100, 1, 102144, 0x4e6c12cc +0, 101, 101, 1, 102144, 0xca1d6753 +0, 102, 102, 1, 102144, 0x116310c3 +0, 103, 103, 1, 102144, 0x16903cd0 +0, 104, 104, 1, 102144, 0x239adfed +0, 105, 105, 1, 102144, 0x0970ce49 +0, 106, 106, 1, 102144, 0xb628adc1 +0, 107, 107, 1, 102144, 0x473613f7 +0, 108, 108, 1, 102144, 0x3eef3987 +0, 109, 109, 1, 102144, 0x935b99ca +0, 110, 110, 1, 102144, 0xb9f4d6ee +0, 111, 111, 1, 102144, 0xac811656 +0, 112, 112, 1, 102144, 0xd1f84af0 +0, 113, 113, 1, 102144, 0xf2fd25f4 +0, 114, 114, 1, 102144, 0x935bbed9 +0, 115, 115, 1, 102144, 0x8c8c3e53 +0, 116, 116, 1, 102144, 0x24afc20f +0, 117, 117, 1, 102144, 0xad20a451 +0, 118, 118, 1, 102144, 0xd1a0df13 +0, 119, 119, 1, 102144, 0xb0ee53f8 +0, 120, 120, 1, 102144, 0x08cdb591 +0, 121, 121, 1, 102144, 0x89b985b0 +0, 122, 122, 1, 102144, 0xdd27d51f +0, 123, 123, 1, 102144, 0xa783fce0 +0, 124, 124, 1, 102144, 0xfe5602e8 +0, 125, 125, 1, 102144, 0xfb989934 +0, 126, 126, 1, 102144, 0xf857eb2b +0, 127, 127, 1, 102144, 0x987a7098 +0, 128, 128, 1, 102144, 0xbc749f42 +0, 129, 129, 1, 102144, 0x221e48a6 +0, 130, 130, 1, 102144, 0x4c4b5da2 +0, 131, 131, 1, 102144, 0x32140027 +0, 132, 132, 1, 102144, 0xbeb4bf18 +0, 133, 133, 1, 102144, 0x523012e5 diff --git a/tests/ref/fate/thp b/tests/ref/fate/thp new file mode 100644 index 0000000000..52dd059027 --- /dev/null +++ b/tests/ref/fate/thp @@ -0,0 +1,73 @@ +#tb 0: 524288/15712911 +0, 0, 0, 1, 291840, 0xbd7e0b22 +0, 1, 1, 1, 291840, 0xf6e12ca5 +0, 2, 2, 1, 291840, 0x528c7049 +0, 3, 3, 1, 291840, 0x93055de9 +0, 4, 4, 1, 291840, 0xf95a51c1 +0, 5, 5, 1, 291840, 0x6ad3a65a +0, 6, 6, 1, 291840, 0x494684a7 +0, 7, 7, 1, 291840, 0x74c14eb1 +0, 8, 8, 1, 291840, 0x149fcb7e +0, 9, 9, 1, 291840, 0x25649761 +0, 10, 10, 1, 291840, 0xbc3f9052 +0, 11, 11, 1, 291840, 0x080edfff +0, 12, 12, 1, 291840, 0x6d7ad684 +0, 13, 13, 1, 291840, 0x6d53844d +0, 14, 14, 1, 291840, 0xf7ad5385 +0, 15, 15, 1, 291840, 0x0241b56a +0, 16, 16, 1, 291840, 0x120122c8 +0, 17, 17, 1, 291840, 0x31b0f32a +0, 18, 18, 1, 291840, 0x14068b98 +0, 19, 19, 1, 291840, 0xeeec658b +0, 20, 20, 1, 291840, 0x9376374c +0, 21, 21, 1, 291840, 0x091e8c6e +0, 22, 22, 1, 291840, 0x744ad07f +0, 23, 23, 1, 291840, 0xf99c554e +0, 24, 24, 1, 291840, 0xc84bd677 +0, 25, 25, 1, 291840, 0x3898d474 +0, 26, 26, 1, 291840, 0x1e2910c8 +0, 27, 27, 1, 291840, 0xb11f58bc +0, 28, 28, 1, 291840, 0xf89170ee +0, 29, 29, 1, 291840, 0x8f239dc3 +0, 30, 30, 1, 291840, 0x8538c76c +0, 31, 31, 1, 291840, 0x162ee66f +0, 32, 32, 1, 291840, 0x5f8708a5 +0, 33, 33, 1, 291840, 0x95802dfb +0, 34, 34, 1, 291840, 0xc424630d +0, 35, 35, 1, 291840, 0xfb8a8667 +0, 36, 36, 1, 291840, 0xbad79af5 +0, 37, 37, 1, 291840, 0xc733b325 +0, 38, 38, 1, 291840, 0x4bfbcd70 +0, 39, 39, 1, 291840, 0x502cd950 +0, 40, 40, 1, 291840, 0x8461ca2c +0, 41, 41, 1, 291840, 0x00219b0d +0, 42, 42, 1, 291840, 0xa4de45e1 +0, 43, 43, 1, 291840, 0xacd3f4df +0, 44, 44, 1, 291840, 0x2203a369 +0, 45, 45, 1, 291840, 0x0a66effa +0, 46, 46, 1, 291840, 0x7ac1fd91 +0, 47, 47, 1, 291840, 0x84970aa7 +0, 48, 48, 1, 291840, 0x569d145f +0, 49, 49, 1, 291840, 0xe51efe1b +0, 50, 50, 1, 291840, 0x38e2cd78 +0, 51, 51, 1, 291840, 0x93428ea2 +0, 52, 52, 1, 291840, 0x3d3f5b17 +0, 53, 53, 1, 291840, 0x9546127d +0, 54, 54, 1, 291840, 0x4178be54 +0, 55, 55, 1, 291840, 0x0d0f8036 +0, 56, 56, 1, 291840, 0xc20557b9 +0, 57, 57, 1, 291840, 0x6d4b2d64 +0, 58, 58, 1, 291840, 0xa750125d +0, 59, 59, 1, 291840, 0x04623ce3 +0, 60, 60, 1, 291840, 0xc7f2bbc7 +0, 61, 61, 1, 291840, 0x6e271336 +0, 62, 62, 1, 291840, 0xcfbd4246 +0, 63, 63, 1, 291840, 0xe1493be9 +0, 64, 64, 1, 291840, 0x6c731194 +0, 65, 65, 1, 291840, 0x0fc30cc2 +0, 66, 66, 1, 291840, 0x967427f3 +0, 67, 67, 1, 291840, 0x55ae3b00 +0, 68, 68, 1, 291840, 0xbe4f200c +0, 69, 69, 1, 291840, 0xc515e443 +0, 70, 70, 1, 291840, 0xd738bd69 +0, 71, 71, 1, 291840, 0xa8e0ab69 -- cgit v1.2.3 From 63e01c2f19f18ac3fe8caf2c9740fb20a243e52c Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Thu, 26 Apr 2012 12:05:57 +0000 Subject: fate: add convenient shorthands for ea-vp6, libavcodec, libavutil tests Signed-off-by: Mans Rullgard --- tests/fate/libavcodec.mak | 7 +++++-- tests/fate/libavutil.mak | 21 ++++++++++++--------- tests/fate/vpx.mak | 7 +++++-- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/tests/fate/libavcodec.mak b/tests/fate/libavcodec.mak index ec4012ebb6..61b8507a01 100644 --- a/tests/fate/libavcodec.mak +++ b/tests/fate/libavcodec.mak @@ -1,8 +1,11 @@ -FATE_TESTS += fate-golomb +FATE_LIBAVCODEC += fate-golomb fate-golomb: libavcodec/golomb-test$(EXESUF) fate-golomb: CMD = run libavcodec/golomb-test fate-golomb: REF = /dev/null -FATE_TESTS += fate-iirfilter +FATE_LIBAVCODEC += fate-iirfilter fate-iirfilter: libavcodec/iirfilter-test$(EXESUF) fate-iirfilter: CMD = run libavcodec/iirfilter-test + +FATE_TESTS += $(FATE_LIBAVCODEC) +fate-libavcodec: $(FATE_LIBAVCODEC) diff --git a/tests/fate/libavutil.mak b/tests/fate/libavutil.mak index a65b724305..ad03137b73 100644 --- a/tests/fate/libavutil.mak +++ b/tests/fate/libavutil.mak @@ -1,38 +1,41 @@ -FATE_TESTS += fate-adler32 +FATE_LIBAVUTIL += fate-adler32 fate-adler32: libavutil/adler32-test$(EXESUF) fate-adler32: CMD = run libavutil/adler32-test fate-adler32: REF = /dev/null -FATE_TESTS += fate-aes +FATE_LIBAVUTIL += fate-aes fate-aes: libavutil/aes-test$(EXESUF) fate-aes: CMD = run libavutil/aes-test fate-aes: REF = /dev/null -FATE_TESTS += fate-base64 +FATE_LIBAVUTIL += fate-base64 fate-base64: libavutil/base64-test$(EXESUF) fate-base64: CMD = run libavutil/base64-test -FATE_TESTS += fate-crc +FATE_LIBAVUTIL += fate-crc fate-crc: libavutil/crc-test$(EXESUF) fate-crc: CMD = run libavutil/crc-test -FATE_TESTS += fate-des +FATE_LIBAVUTIL += fate-des fate-des: libavutil/des-test$(EXESUF) fate-des: CMD = run libavutil/des-test fate-des: REF = /dev/null -FATE_TESTS += fate-eval +FATE_LIBAVUTIL += fate-eval fate-eval: libavutil/eval-test$(EXESUF) fate-eval: CMD = run libavutil/eval-test -FATE_TESTS += fate-fifo +FATE_LIBAVUTIL += fate-fifo fate-fifo: libavutil/fifo-test$(EXESUF) fate-fifo: CMD = run libavutil/fifo-test -FATE_TESTS += fate-md5 +FATE_LIBAVUTIL += fate-md5 fate-md5: libavutil/md5-test$(EXESUF) fate-md5: CMD = run libavutil/md5-test -FATE_TESTS += fate-sha +FATE_LIBAVUTIL += fate-sha fate-sha: libavutil/sha-test$(EXESUF) fate-sha: CMD = run libavutil/sha-test + +FATE_TESTS += $(FATE_LIBAVUTIL) +fate-libavutil: $(FATE_LIBAVUTIL) diff --git a/tests/fate/vpx.mak b/tests/fate/vpx.mak index d7b2f22dd3..02680d4151 100644 --- a/tests/fate/vpx.mak +++ b/tests/fate/vpx.mak @@ -1,9 +1,12 @@ -FATE_TESTS += fate-ea-vp60 +FATE_EA_VP6 += fate-ea-vp60 fate-ea-vp60: CMD = framecrc -i $(SAMPLES)/ea-vp6/g36.vp6 -FATE_TESTS += fate-ea-vp61 +FATE_EA_VP6 += fate-ea-vp61 fate-ea-vp61: CMD = framecrc -i $(SAMPLES)/ea-vp6/MovieSkirmishGondor.vp6 -t 4 +FATE_TESTS += $(FATE_EA_VP6) +fate-ea-vp6: $(FATE_EA_VP6) + FATE_VP3 += fate-vp31 fate-vp31: CMD = framecrc -i $(SAMPLES)/vp3/vp31.avi -- cgit v1.2.3 From f7c2dca0d9f63caeab7277e64b30fb5d6d3aa071 Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Tue, 8 May 2012 22:07:26 +0100 Subject: fate: improve dependencies This makes only tests actually using avconv depend on it. The remaining tests already depend on what they need. Signed-off-by: Mans Rullgard --- tests/Makefile | 10 +++- tests/fate/aac.mak | 2 +- tests/fate/ac3.mak | 2 +- tests/fate/adpcm.mak | 2 +- tests/fate/als.mak | 2 +- tests/fate/amrnb.mak | 2 +- tests/fate/amrwb.mak | 2 +- tests/fate/atrac.mak | 2 +- tests/fate/audio.mak | 10 ++-- tests/fate/bmp.mak | 2 +- tests/fate/cdxl.mak | 2 +- tests/fate/dct.mak | 2 +- tests/fate/demux.mak | 62 +++++++++++----------- tests/fate/dfa.mak | 2 +- tests/fate/dpcm.mak | 2 +- tests/fate/ea.mak | 14 ++--- tests/fate/fft.mak | 2 +- tests/fate/h264.mak | 2 +- tests/fate/image.mak | 12 ++--- tests/fate/indeo.mak | 2 +- tests/fate/libavcodec.mak | 1 - tests/fate/libavutil.mak | 1 - tests/fate/lossless-audio.mak | 12 ++--- tests/fate/lossless-video.mak | 12 ++--- tests/fate/microsoft.mak | 8 +-- tests/fate/mp3.mak | 2 +- tests/fate/mpc.mak | 2 +- tests/fate/pcm.mak | 2 +- tests/fate/prores.mak | 2 +- tests/fate/qt.mak | 32 ++++++------ tests/fate/qtrle.mak | 2 +- tests/fate/real.mak | 14 ++--- tests/fate/screen.mak | 12 ++--- tests/fate/utvideo.mak | 2 +- tests/fate/video.mak | 116 +++++++++++++++++++++--------------------- tests/fate/voice.mak | 10 ++-- tests/fate/vorbis.mak | 2 +- tests/fate/vpx.mak | 12 ++--- tests/fate/vqf.mak | 4 +- tests/fate/wavpack.mak | 2 +- tests/fate/wma.mak | 6 +-- 41 files changed, 199 insertions(+), 195 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index 56a8bb7df3..1c8d4b6e05 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -79,9 +79,15 @@ FATE = $(FATE_ACODEC) \ $(FATE_LAVF) \ $(FATE_SEEK) \ +FATE_AVCONV += $(FATE_AVCONV-yes) + +FATE-$(CONFIG_AVCODEC) += $(FATE_LIBAVCODEC) FATE-$(CONFIG_AVFILTER) += $(FATE_LAVFI) FATE += $(FATE-yes) +FATE += $(FATE_LIBAVUTIL) + +$(FATE_AVCONV): avconv$(EXESUF) $(filter-out %-aref,$(FATE_ACODEC)): $(AREF) $(filter-out %-vref,$(FATE_VSYNTH1)): fate-vsynth1-vref @@ -105,7 +111,7 @@ fate-lavfi: $(FATE_LAVFI) fate-seek: $(FATE_SEEK) ifdef SAMPLES -FATE += $(FATE_TESTS) $(FATE_TESTS-yes) +FATE += $(FATE_AVCONV) fate-rsync: rsync -vaLW rsync://fate-suite.libav.org/fate-suite/ $(SAMPLES) else @@ -119,7 +125,7 @@ FATE_UTILS = base64 tiny_psnr fate: $(FATE) -$(FATE): avconv$(EXESUF) $(FATE_UTILS:%=tests/%$(HOSTEXESUF)) +$(FATE): $(FATE_UTILS:%=tests/%$(HOSTEXESUF)) @echo "TEST $(@:fate-%=%)" $(Q)$(SRC_PATH)/tests/fate-run.sh $@ "$(SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)' '$(THREAD_TYPE)' '$(CPUFLAGS)' '$(CMP_SHIFT)' '$(CMP_TARGET)' '$(SIZE_TOLERANCE)' diff --git a/tests/fate/aac.mak b/tests/fate/aac.mak index 1975e9eb08..b40daf1b9f 100644 --- a/tests/fate/aac.mak +++ b/tests/fate/aac.mak @@ -71,7 +71,7 @@ FATE_AAC_CT = sbr_bc-ps_i.3gp \ FATE_AAC += $(FATE_AAC_CT:%=fate-aac-ct-%) -FATE_TESTS += $(FATE_AAC) +FATE_AVCONV += $(FATE_AAC) fate-aac: $(FATE_AAC) $(FATE_AAC): CMP = oneoff $(FATE_AAC): FUZZ = 2 diff --git a/tests/fate/ac3.mak b/tests/fate/ac3.mak index ca0704d08d..ed2ce12c0e 100644 --- a/tests/fate/ac3.mak +++ b/tests/fate/ac3.mak @@ -44,5 +44,5 @@ fate-eac3-encode: CMP_SHIFT = -1024 fate-eac3-encode: CMP_TARGET = 514.02 fate-eac3-encode: SIZE_TOLERANCE = 488 -FATE_TESTS += $(FATE_AC3) +FATE_AVCONV += $(FATE_AC3) fate-ac3: $(FATE_AC3) diff --git a/tests/fate/adpcm.mak b/tests/fate/adpcm.mak index 5a12a77e20..16fe69efc6 100644 --- a/tests/fate/adpcm.mak +++ b/tests/fate/adpcm.mak @@ -52,5 +52,5 @@ fate-adpcm-thp: CMD = framecrc -i $(SAMPLES)/thp/pikmin2-opening1-partial.thp -v FATE_ADPCM += fate-adpcm_ms-stereo fate-adpcm_ms-stereo: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-2-16-L-ms02.mov -f s16le -FATE_TESTS += $(FATE_ADPCM) +FATE_AVCONV += $(FATE_ADPCM) fate-adpcm: $(FATE_ADPCM) diff --git a/tests/fate/als.mak b/tests/fate/als.mak index 267403428e..b75dab4853 100644 --- a/tests/fate/als.mak +++ b/tests/fate/als.mak @@ -7,5 +7,5 @@ endef $(foreach N,$(ALS_SUITE),$(eval $(call FATE_ALS_SUITE,$(N)))) -FATE_TESTS += $(FATE_ALS) +FATE_AVCONV += $(FATE_ALS) fate-als: $(FATE_ALS) diff --git a/tests/fate/amrnb.mak b/tests/fate/amrnb.mak index 3545ba86fb..917b81a406 100644 --- a/tests/fate/amrnb.mak +++ b/tests/fate/amrnb.mak @@ -46,5 +46,5 @@ fate-amrnb-12k2: CMP = stddev fate-amrnb-12k2: REF = $(SAMPLES)/amrnb/12.2k.pcm fate-amrnb-12k2: FUZZ = 1 -FATE_TESTS += $(FATE_AMRNB) +FATE_AVCONV += $(FATE_AMRNB) fate-amrnb: $(FATE_AMRNB) diff --git a/tests/fate/amrwb.mak b/tests/fate/amrwb.mak index 8fc7928995..112262940e 100644 --- a/tests/fate/amrwb.mak +++ b/tests/fate/amrwb.mak @@ -58,5 +58,5 @@ fate-amrwb-23k85-2: CMP = stddev fate-amrwb-23k85-2: REF = $(SAMPLES)/amrwb/deus-23k85.pcm fate-amrwb-23k85-2: FUZZ = 1 -FATE_TESTS += $(FATE_AMRWB) +FATE_AVCONV += $(FATE_AMRWB) fate-amrwb: $(FATE_AMRWB) diff --git a/tests/fate/atrac.mak b/tests/fate/atrac.mak index efb1727463..5e6bd95c3b 100644 --- a/tests/fate/atrac.mak +++ b/tests/fate/atrac.mak @@ -18,5 +18,5 @@ fate-atrac3-3: CMD = pcm -i $(SAMPLES)/atrac3/mc_sich_at3_132_small.wav fate-atrac3-3: CMP = oneoff fate-atrac3-3: REF = $(SAMPLES)/atrac3/mc_sich_at3_132_small.pcm -FATE_TESTS += $(FATE_ATRAC) +FATE_AVCONV += $(FATE_ATRAC) fate-atrac: $(FATE_ATRAC) diff --git a/tests/fate/audio.mak b/tests/fate/audio.mak index 32bf75774b..364ebf1581 100644 --- a/tests/fate/audio.mak +++ b/tests/fate/audio.mak @@ -10,23 +10,23 @@ fate-binkaudio-rdft: CMP = oneoff fate-binkaudio-rdft: REF = $(SAMPLES)/bink/binkaudio_rdft.pcm fate-binkaudio-rdft: FUZZ = 2 -FATE_TESTS += $(FATE_BINKAUDIO) +FATE_AVCONV += $(FATE_BINKAUDIO) fate-binkaudio: $(FATE_BINKAUDIO) -FATE_TESTS += fate-dts +FATE_AVCONV += fate-dts fate-dts: CMD = pcm -i $(SAMPLES)/dts/dts.ts fate-dts: CMP = oneoff fate-dts: REF = $(SAMPLES)/dts/dts.pcm -FATE_TESTS += fate-imc +FATE_AVCONV += fate-imc fate-imc: CMD = pcm -i $(SAMPLES)/imc/imc.avi fate-imc: CMP = oneoff fate-imc: REF = $(SAMPLES)/imc/imc.pcm -FATE_TESTS += fate-nellymoser +FATE_AVCONV += fate-nellymoser fate-nellymoser: CMD = pcm -i $(SAMPLES)/nellymoser/nellymoser.flv fate-nellymoser: CMP = oneoff fate-nellymoser: REF = $(SAMPLES)/nellymoser/nellymoser.pcm -FATE_TESTS += fate-ws_snd +FATE_AVCONV += fate-ws_snd fate-ws_snd: CMD = md5 -i $(SAMPLES)/vqa/ws_snd.vqa -f s16le diff --git a/tests/fate/bmp.mak b/tests/fate/bmp.mak index 56b5059a33..4a01bb0e2a 100644 --- a/tests/fate/bmp.mak +++ b/tests/fate/bmp.mak @@ -37,5 +37,5 @@ fate-bmp-rle4: CMD = framecrc -i $(SAMPLES)/bmp/testcompress4.bmp -pix_fmt rgb24 FATE_BMP += fate-bmp-rle8 fate-bmp-rle8: CMD = framecrc -i $(SAMPLES)/bmp/testcompress8.bmp -pix_fmt rgb24 -FATE_TESTS += $(FATE_BMP) +FATE_AVCONV += $(FATE_BMP) fate-bmp: $(FATE_BMP) diff --git a/tests/fate/cdxl.mak b/tests/fate/cdxl.mak index 3a46c5ce50..2cec5d2a59 100644 --- a/tests/fate/cdxl.mak +++ b/tests/fate/cdxl.mak @@ -13,5 +13,5 @@ fate-cdxl-pal8-small: CMD = framecrc -i $(SAMPLES)/cdxl/fruit.cdxl -an -pix_fmt FATE_CDXL += fate-cdxl-bitline-ham6 fate-cdxl-bitline-ham6: CMD = framecrc -i $(SAMPLES)/cdxl/bitline.cdxl -frames:v 10 -FATE_TESTS += $(FATE_CDXL) +FATE_AVCONV += $(FATE_CDXL) fate-cdxl: $(FATE_CDXL) diff --git a/tests/fate/dct.mak b/tests/fate/dct.mak index 8f2ab7a8e0..d79cb9157d 100644 --- a/tests/fate/dct.mak +++ b/tests/fate/dct.mak @@ -1,4 +1,4 @@ -FATE_TESTS += fate-idct8x8 +FATE-yes += fate-idct8x8 fate-idct8x8: libavcodec/dct-test$(EXESUF) fate-idct8x8: CMD = run libavcodec/dct-test -i fate-idct8x8: REF = /dev/null diff --git a/tests/fate/demux.mak b/tests/fate/demux.mak index 0f83c8dfce..86500bb7f7 100644 --- a/tests/fate/demux.mak +++ b/tests/fate/demux.mak @@ -1,92 +1,92 @@ -FATE_TESTS += fate-adts-demux +FATE_AVCONV += fate-adts-demux fate-adts-demux: CMD = crc -i $(SAMPLES)/aac/ct_faac-adts.aac -acodec copy -FATE_TESTS += fate-aea-demux +FATE_AVCONV += fate-aea-demux fate-aea-demux: CMD = crc -i $(SAMPLES)/aea/chirp.aea -acodec copy -FATE_TESTS += fate-bink-demux +FATE_AVCONV += fate-bink-demux fate-bink-demux: CMD = crc -i $(SAMPLES)/bink/Snd0a7d9b58.dee -vn -acodec copy -FATE_TESTS += fate-bmv +FATE_AVCONV += fate-bmv fate-bmv: CMD = framecrc -i $(SAMPLES)/bmv/SURFING-partial.BMV -pix_fmt rgb24 -FATE_TESTS += fate-caf +FATE_AVCONV += fate-caf fate-caf: CMD = crc -i $(SAMPLES)/caf/caf-pcm16.caf -FATE_TESTS += fate-cdxl-demux +FATE_AVCONV += fate-cdxl-demux fate-cdxl-demux: CMD = framecrc -i $(SAMPLES)/cdxl/mirage.cdxl -vcodec copy -acodec copy -FATE_TESTS += fate-cryo-apc +FATE_AVCONV += fate-cryo-apc fate-cryo-apc: CMD = md5 -i $(SAMPLES)/cryo-apc/cine007.APC -f s16le -FATE_TESTS += fate-d-cinema-demux +FATE_AVCONV += fate-d-cinema-demux fate-d-cinema-demux: CMD = framecrc -i $(SAMPLES)/d-cinema/THX_Science_FLT_1920-partial.302 -acodec copy -pix_fmt rgb24 -FATE_TESTS += fate-funcom-iss +FATE_AVCONV += fate-funcom-iss fate-funcom-iss: CMD = md5 -i $(SAMPLES)/funcom-iss/0004010100.iss -f s16le -FATE_TESTS += fate-interplay-mve-16bit +FATE_AVCONV += fate-interplay-mve-16bit fate-interplay-mve-16bit: CMD = framecrc -i $(SAMPLES)/interplay-mve/descent3-level5-16bit-partial.mve -pix_fmt rgb24 -FATE_TESTS += fate-interplay-mve-8bit +FATE_AVCONV += fate-interplay-mve-8bit fate-interplay-mve-8bit: CMD = framecrc -i $(SAMPLES)/interplay-mve/interplay-logo-2MB.mve -pix_fmt rgb24 -FATE_TESTS += fate-iv8-demux +FATE_AVCONV += fate-iv8-demux fate-iv8-demux: CMD = framecrc -i $(SAMPLES)/iv8/zzz-partial.mpg -vcodec copy -FATE_TESTS += fate-lmlm4-demux +FATE_AVCONV += fate-lmlm4-demux fate-lmlm4-demux: CMD = framecrc -i $(SAMPLES)/lmlm4/LMLM4_CIFat30fps.divx -t 3 -acodec copy -vcodec copy -FATE_TESTS += fate-maxis-xa +FATE_AVCONV += fate-maxis-xa fate-maxis-xa: CMD = framecrc -i $(SAMPLES)/maxis-xa/SC2KBUG.XA -frames:a 30 -c:a copy -FATE_TESTS += fate-mtv +FATE_AVCONV += fate-mtv fate-mtv: CMD = framecrc -i $(SAMPLES)/mtv/comedian_auto-partial.mtv -acodec copy -pix_fmt rgb24 -FATE_TESTS += fate-mxf-demux +FATE_AVCONV += fate-mxf-demux fate-mxf-demux: CMD = framecrc -i $(SAMPLES)/mxf/C0023S01.mxf -acodec copy -vcodec copy -FATE_TESTS += fate-nc-demux +FATE_AVCONV += fate-nc-demux fate-nc-demux: CMD = framecrc -i $(SAMPLES)/nc-camera/nc-sample-partial -vcodec copy -FATE_TESTS += fate-nsv-demux +FATE_AVCONV += fate-nsv-demux fate-nsv-demux: CMD = framecrc -i $(SAMPLES)/nsv/witchblade-51kbps.nsv -t 6 -vcodec copy -acodec copy -FATE_TESTS += fate-oma-demux +FATE_AVCONV += fate-oma-demux fate-oma-demux: CMD = crc -i $(SAMPLES)/oma/01-Untitled-partial.oma -acodec copy -FATE_TESTS += fate-psx-str +FATE_AVCONV += fate-psx-str fate-psx-str: CMD = framecrc -i $(SAMPLES)/psx-str/descent-partial.str -FATE_TESTS += fate-psx-str-v3-mdec +FATE_AVCONV += fate-psx-str-v3-mdec fate-psx-str-v3-mdec: CMD = framecrc -i $(SAMPLES)/psx-str/abc000_cut.str -an -FATE_TESTS += fate-pva-demux +FATE_AVCONV += fate-pva-demux fate-pva-demux: CMD = framecrc -idct simple -i $(SAMPLES)/pva/PVA_test-partial.pva -t 0.6 -acodec copy -vn -FATE_TESTS += fate-qcp-demux +FATE_AVCONV += fate-qcp-demux fate-qcp-demux: CMD = crc -i $(SAMPLES)/qcp/0036580847.QCP -acodec copy -FATE_TESTS += fate-redcode-demux +FATE_AVCONV += fate-redcode-demux fate-redcode-demux: CMD = framecrc -i $(SAMPLES)/r3d/4MB-sample.r3d -vcodec copy -acodec copy -FATE_TESTS += fate-sierra-vmd +FATE_AVCONV += fate-sierra-vmd fate-sierra-vmd: CMD = framecrc -i $(SAMPLES)/vmd/12.vmd -pix_fmt rgb24 -FATE_TESTS += fate-siff +FATE_AVCONV += fate-siff fate-siff: CMD = framecrc -i $(SAMPLES)/SIFF/INTRO_B.VB -t 3 -pix_fmt rgb24 -FATE_TESTS += fate-smjpeg +FATE_AVCONV += fate-smjpeg fate-smjpeg: CMD = framecrc -i $(SAMPLES)/smjpeg/scenwin.mjpg -vcodec copy -FATE_TESTS += fate-westwood-aud +FATE_AVCONV += fate-westwood-aud fate-westwood-aud: CMD = md5 -i $(SAMPLES)/westwood-aud/excellent.aud -f s16le -FATE_TESTS += fate-wtv-demux +FATE_AVCONV += fate-wtv-demux fate-wtv-demux: CMD = framecrc -i $(SAMPLES)/wtv/law-and-order-partial.wtv -vcodec copy -acodec copy -FATE_TESTS += fate-xmv-demux +FATE_AVCONV += fate-xmv-demux fate-xmv-demux: CMD = framecrc -i $(SAMPLES)/xmv/logos1p.fmv -vcodec copy -acodec copy -FATE_TESTS += fate-xwma-demux +FATE_AVCONV += fate-xwma-demux fate-xwma-demux: CMD = crc -i $(SAMPLES)/xwma/ergon.xwma -acodec copy diff --git a/tests/fate/dfa.mak b/tests/fate/dfa.mak index 6220c070ef..e83683959b 100644 --- a/tests/fate/dfa.mak +++ b/tests/fate/dfa.mak @@ -31,5 +31,5 @@ fate-dfa10: CMD = framecrc -i $(SAMPLES)/chronomaster-dfa/0009.dfa -pix_fmt rgb2 FATE_DFA += fate-dfa11 fate-dfa11: CMD = framecrc -i $(SAMPLES)/chronomaster-dfa/0010.dfa -pix_fmt rgb24 -FATE_TESTS += $(FATE_DFA) +FATE_AVCONV += $(FATE_DFA) fate-dfa: $(FATE_DFA) diff --git a/tests/fate/dpcm.mak b/tests/fate/dpcm.mak index a8b8b3d8ed..92899cc30a 100644 --- a/tests/fate/dpcm.mak +++ b/tests/fate/dpcm.mak @@ -7,5 +7,5 @@ fate-dpcm-sierra: CMD = md5 -i $(SAMPLES)/sol/lsl7sample.sol -f s16le FATE_DPCM += fate-dpcm-xan fate-dpcm-xan: CMD = md5 -i $(SAMPLES)/wc4-xan/wc4_2.avi -vn -f s16le -FATE_TESTS += $(FATE_DPCM) +FATE_AVCONV += $(FATE_DPCM) fate-dpcm: $(FATE_DPCM) diff --git a/tests/fate/ea.mak b/tests/fate/ea.mak index 4734161630..3d016d20b5 100644 --- a/tests/fate/ea.mak +++ b/tests/fate/ea.mak @@ -1,20 +1,20 @@ -FATE_TESTS += fate-ea-cdata +FATE_AVCONV += fate-ea-cdata fate-ea-cdata: CMD = md5 -i $(SAMPLES)/ea-cdata/166b084d.46410f77.0009b440.24be960c.cdata -f s16le -FATE_TESTS += fate-ea-cmv +FATE_AVCONV += fate-ea-cmv fate-ea-cmv: CMD = framecrc -i $(SAMPLES)/ea-cmv/TITLE.CMV -pix_fmt rgb24 -FATE_TESTS += fate-ea-tgq +FATE_AVCONV += fate-ea-tgq fate-ea-tgq: CMD = framecrc -i $(SAMPLES)/ea-tgq/v27.tgq -an -FATE_TESTS += fate-ea-tqi +FATE_AVCONV += fate-ea-tqi fate-ea-tqi: CMD = framecrc -i $(SAMPLES)/ea-wve/networkBackbone-partial.wve -frames:v 26 -an -FATE_TESTS += fate-ea-mad +FATE_AVCONV += fate-ea-mad fate-ea-mad: CMD = framecrc -i $(SAMPLES)/ea-mad/NFS6LogoE.mad -an -FATE_TESTS += fate-ea-tgv-1 +FATE_AVCONV += fate-ea-tgv-1 fate-ea-tgv-1: CMD = framecrc -i $(SAMPLES)/ea-tgv/INTRO8K-partial.TGV -pix_fmt rgb24 -an -FATE_TESTS += fate-ea-tgv-2 +FATE_AVCONV += fate-ea-tgv-2 fate-ea-tgv-2: CMD = framecrc -i $(SAMPLES)/ea-tgv/INTEL_S.TGV -pix_fmt rgb24 -an diff --git a/tests/fate/fft.mak b/tests/fate/fft.mak index d4199384a4..d3889cc877 100644 --- a/tests/fate/fft.mak +++ b/tests/fate/fft.mak @@ -38,5 +38,5 @@ $(FATE_FFT_FIXED): libavcodec/fft-fixed-test$(EXESUF) $(FATE_FFT_FIXED): CMD = run libavcodec/fft-fixed-test $(CPUFLAGS:%=-c%) $(ARGS) $(FATE_FFT_FIXED): REF = /dev/null -FATE_TESTS += $(FATE_FFT) $(FATE_FFT_FIXED) +FATE-$(CONFIG_FFT) += $(FATE_FFT) $(FATE_FFT_FIXED) fate-fft: $(FATE_FFT) $(FATE_FFT_FIXED) diff --git a/tests/fate/h264.mak b/tests/fate/h264.mak index 4d77617fc3..2e8521af82 100644 --- a/tests/fate/h264.mak +++ b/tests/fate/h264.mak @@ -177,7 +177,7 @@ FATE_H264 := $(FATE_H264:%=fate-h264-conformance-%) \ fate-h264-extreme-plane-pred \ fate-h264-bsf-mp4toannexb \ -FATE_TESTS += $(FATE_H264) +FATE_AVCONV += $(FATE_H264) fate-h264: $(FATE_H264) fate-h264-conformance-aud_mw_e: CMD = framecrc -i $(SAMPLES)/h264-conformance/AUD_MW_E.264 diff --git a/tests/fate/image.mak b/tests/fate/image.mak index dc78302e63..4ea9290acd 100644 --- a/tests/fate/image.mak +++ b/tests/fate/image.mak @@ -1,10 +1,10 @@ -FATE_TESTS += fate-dpx +FATE_AVCONV += fate-dpx fate-dpx: CMD = framecrc -i $(SAMPLES)/dpx/lighthouse_rgb48.dpx -FATE_TESTS += fate-pictor +FATE_AVCONV += fate-pictor fate-pictor: CMD = framecrc -i $(SAMPLES)/pictor/MFISH.PIC -pix_fmt rgb24 -FATE_TESTS += fate-ptx +FATE_AVCONV += fate-ptx fate-ptx: CMD = framecrc -i $(SAMPLES)/ptx/_113kw_pic.ptx -pix_fmt rgb24 FATE_SUNRASTER += fate-sunraster-1bit-raw @@ -28,7 +28,7 @@ fate-sunraster-24bit-raw: CMD = framecrc -i $(SAMPLES)/sunraster/lena-24bit-raw. FATE_SUNRASTER += fate-sunraster-24bit-rle fate-sunraster-24bit-rle: CMD = framecrc -i $(SAMPLES)/sunraster/lena-24bit-rle.sun -FATE_TESTS += $(FATE_SUNRASTER) +FATE_AVCONV += $(FATE_SUNRASTER) fate-sunraster: $(FATE_SUNRASTER) FATE_TARGA = CBW8 \ @@ -45,7 +45,7 @@ FATE_TARGA = CBW8 \ FATE_TARGA := $(FATE_TARGA:%=fate-targa-conformance-%) \ fate-targa-top-to-bottom -FATE_TESTS += $(FATE_TARGA) +FATE_AVCONV += $(FATE_TARGA) fate-targa: $(FATE_TARGA) fate-targa-conformance-CBW8: CMD = framecrc -i $(SAMPLES)/targa-conformance/CBW8.TGA @@ -67,5 +67,5 @@ fate-tiff-fax-g3: CMD = framecrc -i $(SAMPLES)/CCITT_fax/G31D.TIF FATE_TIFF += fate-tiff-fax-g3s fate-tiff-fax-g3s: CMD = framecrc -i $(SAMPLES)/CCITT_fax/G31DS.TIF -FATE_TESTS += $(FATE_TIFF) +FATE_AVCONV += $(FATE_TIFF) fate-tiff: $(FATE_TIFF) diff --git a/tests/fate/indeo.mak b/tests/fate/indeo.mak index cf1625c114..fbffe4a89c 100644 --- a/tests/fate/indeo.mak +++ b/tests/fate/indeo.mak @@ -10,5 +10,5 @@ fate-indeo4: CMD = framecrc -i $(SAMPLES)/iv41/indeo41-partial.avi -an FATE_INDEO += fate-indeo5 fate-indeo5: CMD = framecrc -i $(SAMPLES)/iv50/Educ_Movie_DeadlyForce.avi -an -FATE_TESTS += $(FATE_INDEO) +FATE_AVCONV += $(FATE_INDEO) fate-indeo: $(FATE_INDEO) diff --git a/tests/fate/libavcodec.mak b/tests/fate/libavcodec.mak index 61b8507a01..2aa9596cdd 100644 --- a/tests/fate/libavcodec.mak +++ b/tests/fate/libavcodec.mak @@ -7,5 +7,4 @@ FATE_LIBAVCODEC += fate-iirfilter fate-iirfilter: libavcodec/iirfilter-test$(EXESUF) fate-iirfilter: CMD = run libavcodec/iirfilter-test -FATE_TESTS += $(FATE_LIBAVCODEC) fate-libavcodec: $(FATE_LIBAVCODEC) diff --git a/tests/fate/libavutil.mak b/tests/fate/libavutil.mak index ad03137b73..9993584f32 100644 --- a/tests/fate/libavutil.mak +++ b/tests/fate/libavutil.mak @@ -37,5 +37,4 @@ FATE_LIBAVUTIL += fate-sha fate-sha: libavutil/sha-test$(EXESUF) fate-sha: CMD = run libavutil/sha-test -FATE_TESTS += $(FATE_LIBAVUTIL) fate-libavutil: $(FATE_LIBAVUTIL) diff --git a/tests/fate/lossless-audio.mak b/tests/fate/lossless-audio.mak index 44d6f094d2..18cf9114b3 100644 --- a/tests/fate/lossless-audio.mak +++ b/tests/fate/lossless-audio.mak @@ -1,17 +1,17 @@ -FATE_TESTS += fate-lossless-alac +FATE_AVCONV += fate-lossless-alac fate-lossless-alac: CMD = md5 -i $(SAMPLES)/lossless-audio/inside.m4a -f s16le -FATE_TESTS += fate-lossless-meridianaudio +FATE_AVCONV += fate-lossless-meridianaudio fate-lossless-meridianaudio: CMD = md5 -i $(SAMPLES)/lossless-audio/luckynight-partial.mlp -f s16le -FATE_TESTS += fate-lossless-monkeysaudio +FATE_AVCONV += fate-lossless-monkeysaudio fate-lossless-monkeysaudio: CMD = md5 -i $(SAMPLES)/lossless-audio/luckynight-partial.ape -f s16le -FATE_TESTS += fate-lossless-shorten +FATE_AVCONV += fate-lossless-shorten fate-lossless-shorten: CMD = md5 -i $(SAMPLES)/lossless-audio/luckynight-partial.shn -f s16le -FATE_TESTS += fate-lossless-tta +FATE_AVCONV += fate-lossless-tta fate-lossless-tta: CMD = crc -i $(SAMPLES)/lossless-audio/inside.tta -FATE_TESTS += fate-lossless-wma +FATE_AVCONV += fate-lossless-wma fate-lossless-wma: CMD = md5 -i $(SAMPLES)/lossless-audio/luckynight-partial.wma -f s16le diff --git a/tests/fate/lossless-video.mak b/tests/fate/lossless-video.mak index e0f097e6ab..e5db11aa8c 100644 --- a/tests/fate/lossless-video.mak +++ b/tests/fate/lossless-video.mak @@ -4,20 +4,20 @@ fate-loco-rgb: CMD = framecrc -i $(SAMPLES)/loco/pig-loco-rgb.avi FATE_LOCO += fate-loco-yuy2 fate-loco-yuy2: CMD = framecrc -i $(SAMPLES)/loco/pig-loco-0.avi -FATE_TESTS += $(FATE_LOCO) +FATE_AVCONV += $(FATE_LOCO) fate-loco: $(FATE_LOCO) -FATE_TESTS += fate-msrle-8bit +FATE_AVCONV += fate-msrle-8bit fate-msrle-8bit: CMD = framecrc -i $(SAMPLES)/msrle/Search-RLE.avi -pix_fmt rgb24 -FATE_TESTS += fate-mszh +FATE_AVCONV += fate-mszh fate-mszh: CMD = framecrc -i $(SAMPLES)/lcl/mszh-1frame.avi -FATE_TESTS += fate-vble +FATE_AVCONV += fate-vble fate-vble: CMD = framecrc -i $(SAMPLES)/vble/flowers-partial-2MB.avi -FATE_TESTS += fate-zlib +FATE_AVCONV += fate-zlib fate-zlib: CMD = framecrc -i $(SAMPLES)/lcl/zlib-1frame.avi -FATE_TESTS += fate-zerocodec +FATE_AVCONV += fate-zerocodec fate-zerocodec: CMD = framecrc -i $(SAMPLES)/zerocodec/sample-zeco.avi diff --git a/tests/fate/microsoft.mak b/tests/fate/microsoft.mak index 5bc27b8855..3e55f4066c 100644 --- a/tests/fate/microsoft.mak +++ b/tests/fate/microsoft.mak @@ -1,4 +1,4 @@ -FATE_TESTS += fate-msmpeg4v1 +FATE_AVCONV += fate-msmpeg4v1 fate-msmpeg4v1: CMD = framecrc -flags +bitexact -dct fastint -idct simple -i $(SAMPLES)/msmpeg4v1/mpg4.avi -an FATE_MSVIDEO1 += fate-msvideo1-16bit @@ -7,7 +7,7 @@ fate-msvideo1-16bit: CMD = framecrc -i $(SAMPLES)/cram/clock-cram16.avi -pix_fmt FATE_MSVIDEO1 += fate-msvideo1-8bit fate-msvideo1-8bit: CMD = framecrc -i $(SAMPLES)/cram/skating.avi -t 1 -pix_fmt rgb24 -FATE_TESTS += $(FATE_MSVIDEO1) +FATE_AVCONV += $(FATE_MSVIDEO1) fate-msvideo1: $(FATE_MSVIDEO1) FATE_WMV8_DRM += fate-wmv8-drm @@ -17,7 +17,7 @@ fate-wmv8-drm: CMD = framecrc -cryptokey 137381538c84c068111902a59c5cf6c340247c3 FATE_WMV8_DRM += fate-wmv8-drm-nodec fate-wmv8-drm-nodec: CMD = framecrc -cryptokey 137381538c84c068111902a59c5cf6c340247c39 -i $(SAMPLES)/wmv8/wmv_drm.wmv -acodec copy -vcodec copy -FATE_TESTS += $(FATE_WMV8_DRM) +FATE_AVCONV += $(FATE_WMV8_DRM) fate-wmv8_drm: $(FATE_WMV8_DRM) FATE_VC1 += fate-vc1_sa00040 @@ -35,5 +35,5 @@ fate-vc1_sa20021: CMD = framecrc -i $(SAMPLES)/vc1/SA20021.vc1 FATE_VC1 += fate-vc1-ism fate-vc1-ism: CMD = framecrc -i $(SAMPLES)/isom/vc1-wmapro.ism -an -FATE_TESTS += $(FATE_VC1) +FATE_AVCONV += $(FATE_VC1) fate-vc1: $(FATE_VC1) diff --git a/tests/fate/mp3.mak b/tests/fate/mp3.mak index 4c16cb84e0..26a77d0b9d 100644 --- a/tests/fate/mp3.mak +++ b/tests/fate/mp3.mak @@ -38,7 +38,7 @@ fate-mp3-float-extra_overread: CMD = pcm -c:a mp3float -i $(SAMPLES)/mpegaudio/e fate-mp3-float-extra_overread: CMP = stddev fate-mp3-float-extra_overread: REF = $(SAMPLES)/mpegaudio/extra_overread.pcm -FATE_TESTS += $(FATE_MP3) +FATE_AVCONV += $(FATE_MP3) fate-mp3: $(FATE_MP3) $(FATE_MP3): CMP = stddev $(FATE_MP3): FUZZ = 0.07 diff --git a/tests/fate/mpc.mak b/tests/fate/mpc.mak index 2b263ce6be..4fccea06ff 100644 --- a/tests/fate/mpc.mak +++ b/tests/fate/mpc.mak @@ -10,5 +10,5 @@ fate-musepack7: CMP = oneoff fate-musepack7: REF = $(SAMPLES)/musepack/inside-mp7.pcm fate-musepack7: FUZZ = 1 -FATE_TESTS += $(FATE_MPC) +FATE_AVCONV += $(FATE_MPC) fate-mpc: $(FATE_MPC) diff --git a/tests/fate/pcm.mak b/tests/fate/pcm.mak index 4b271346f6..d0acc23d4f 100644 --- a/tests/fate/pcm.mak +++ b/tests/fate/pcm.mak @@ -30,5 +30,5 @@ fate-dcinema-encode: tests/data/asynth-96000-6.wav fate-dcinema-encode: SRC = tests/data/asynth-96000-6.wav fate-dcinema-encode: CMD = enc_dec_pcm daud md5 s16le $(SRC) -c:a pcm_s24daud -FATE_TESTS += $(FATE_PCM) +FATE_AVCONV += $(FATE_PCM) fate-pcm: $(FATE_PCM) diff --git a/tests/fate/prores.mak b/tests/fate/prores.mak index fb6f6cb8cc..6112e7f54b 100644 --- a/tests/fate/prores.mak +++ b/tests/fate/prores.mak @@ -4,7 +4,7 @@ FATE_PRORES = fate-prores-422 \ fate-prores-422_proxy \ fate-prores-alpha \ -FATE_TESTS += $(FATE_PRORES) +FATE_AVCONV += $(FATE_PRORES) fate-prores: $(FATE_PRORES) fate-prores-422: CMD = framecrc -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_422.mov -pix_fmt yuv422p10le diff --git a/tests/fate/qt.mak b/tests/fate/qt.mak index 9b25306ad0..cab09fefef 100644 --- a/tests/fate/qt.mak +++ b/tests/fate/qt.mak @@ -1,50 +1,50 @@ -FATE_TESTS += fate-8bps +FATE_AVCONV += fate-8bps fate-8bps: CMD = framecrc -i $(SAMPLES)/8bps/full9iron-partial.mov -pix_fmt rgb24 -FATE_TESTS += fate-qdm2 +FATE_AVCONV += fate-qdm2 fate-qdm2: CMD = pcm -i $(SAMPLES)/qt-surge-suite/surge-2-16-B-QDM2.mov fate-qdm2: CMP = oneoff fate-qdm2: REF = $(SAMPLES)/qt-surge-suite/surge-2-16-B-QDM2.pcm fate-qdm2: FUZZ = 2 -FATE_TESTS += fate-qt-alaw-mono +FATE_AVCONV += fate-qt-alaw-mono fate-qt-alaw-mono: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-1-16-B-alaw.mov -f s16le -FATE_TESTS += fate-qt-alaw-stereo +FATE_AVCONV += fate-qt-alaw-stereo fate-qt-alaw-stereo: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-2-16-B-alaw.mov -f s16le -FATE_TESTS += fate-qt-ima4-mono +FATE_AVCONV += fate-qt-ima4-mono fate-qt-ima4-mono: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-1-16-B-ima4.mov -f s16le -FATE_TESTS += fate-qt-ima4-stereo +FATE_AVCONV += fate-qt-ima4-stereo fate-qt-ima4-stereo: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-2-16-B-ima4.mov -f s16le -FATE_TESTS += fate-qt-mac3-mono +FATE_AVCONV += fate-qt-mac3-mono fate-qt-mac3-mono: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-1-8-MAC3.mov -f s16le -FATE_TESTS += fate-qt-mac3-stereo +FATE_AVCONV += fate-qt-mac3-stereo fate-qt-mac3-stereo: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-2-8-MAC3.mov -f s16le -FATE_TESTS += fate-qt-mac6-mono +FATE_AVCONV += fate-qt-mac6-mono fate-qt-mac6-mono: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-1-8-MAC6.mov -f s16le -FATE_TESTS += fate-qt-mac6-stereo +FATE_AVCONV += fate-qt-mac6-stereo fate-qt-mac6-stereo: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-2-8-MAC6.mov -f s16le -FATE_TESTS += fate-qt-ulaw-mono +FATE_AVCONV += fate-qt-ulaw-mono fate-qt-ulaw-mono: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-1-16-B-ulaw.mov -f s16le -FATE_TESTS += fate-qt-ulaw-stereo +FATE_AVCONV += fate-qt-ulaw-stereo fate-qt-ulaw-stereo: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-2-16-B-ulaw.mov -f s16le -FATE_TESTS += fate-quickdraw +FATE_AVCONV += fate-quickdraw fate-quickdraw: CMD = framecrc -i $(SAMPLES)/quickdraw/Airplane.mov -pix_fmt rgb24 -FATE_TESTS += fate-rpza +FATE_AVCONV += fate-rpza fate-rpza: CMD = framecrc -i $(SAMPLES)/rpza/rpza2.mov -t 2 -pix_fmt rgb24 -FATE_TESTS += fate-svq1 +FATE_AVCONV += fate-svq1 fate-svq1: CMD = framecrc -i $(SAMPLES)/svq1/marymary-shackles.mov -an -t 10 -FATE_TESTS += fate-svq3 +FATE_AVCONV += fate-svq3 fate-svq3: CMD = framecrc -i $(SAMPLES)/svq3/Vertical400kbit.sorenson3.mov -t 6 -an diff --git a/tests/fate/qtrle.mak b/tests/fate/qtrle.mak index 0d1e3fcdfc..8e14c3c028 100644 --- a/tests/fate/qtrle.mak +++ b/tests/fate/qtrle.mak @@ -19,5 +19,5 @@ fate-qtrle-24bit: CMD = framecrc -i $(SAMPLES)/qtrle/aletrek-rle.mov FATE_QTRLE += fate-qtrle-32bit fate-qtrle-32bit: CMD = framecrc -i $(SAMPLES)/qtrle/ultra_demo_720_480_32bpp_rle.mov -pix_fmt rgb24 -FATE_TESTS += $(FATE_QTRLE) +FATE_AVCONV += $(FATE_QTRLE) fate-qtrle: $(FATE_QTRLE) diff --git a/tests/fate/real.mak b/tests/fate/real.mak index 64b9c80b93..fdfdcd1460 100644 --- a/tests/fate/real.mak +++ b/tests/fate/real.mak @@ -1,24 +1,24 @@ -FATE_TESTS += fate-real-14_4 +FATE_AVCONV += fate-real-14_4 fate-real-14_4: CMD = md5 -i $(SAMPLES)/real/ra3_in_rm_file.rm -f s16le -FATE_TESTS += fate-ra-288 +FATE_AVCONV += fate-ra-288 fate-ra-288: CMD = pcm -i $(SAMPLES)/real/ra_288.rm fate-ra-288: CMP = oneoff fate-ra-288: REF = $(SAMPLES)/real/ra_288.pcm fate-ra-288: FUZZ = 2 -FATE_TESTS += fate-ra-cook +FATE_AVCONV += fate-ra-cook fate-ra-cook: CMD = pcm -i $(SAMPLES)/real/ra_cook.rm fate-ra-cook: CMP = oneoff fate-ra-cook: REF = $(SAMPLES)/real/ra_cook.pcm -FATE_TESTS += fate-ralf +FATE_AVCONV += fate-ralf fate-ralf: CMD = md5 -i $(SAMPLES)/lossless-audio/luckynight-partial.rmvb -vn -f s16le -FATE_TESTS += fate-rv30 +FATE_AVCONV += fate-rv30 fate-rv30: CMD = framecrc -flags +bitexact -dct fastint -idct simple -i $(SAMPLES)/real/rv30.rm -an -FATE_TESTS += fate-real-rv40 +FATE_AVCONV += fate-real-rv40 fate-real-rv40: CMD = framecrc -i $(SAMPLES)/real/spygames-2MB.rmvb -t 10 -an -vsync 0 FATE_SIPR += fate-sipr-5k0 @@ -41,5 +41,5 @@ fate-sipr-16k: CMD = pcm -i $(SAMPLES)/sipr/sipr_16k.rm fate-sipr-16k: CMP = oneoff fate-sipr-16k: REF = $(SAMPLES)/sipr/sipr_16k.pcm -FATE_TESTS += $(FATE_SIPR) +FATE_AVCONV += $(FATE_SIPR) fate-sipr: $(FATE_SIPR) diff --git a/tests/fate/screen.mak b/tests/fate/screen.mak index e6762ab6f9..2dc04c69a7 100644 --- a/tests/fate/screen.mak +++ b/tests/fate/screen.mak @@ -1,8 +1,8 @@ # FIXME dropped frames in this test because of coarse timebase -FATE_TESTS += fate-cscd +FATE_AVCONV += fate-cscd fate-cscd: CMD = framecrc -i $(SAMPLES)/CSCD/sample_video.avi -an -pix_fmt rgb24 -FATE_TESTS += fate-dxtory +FATE_AVCONV += fate-dxtory fate-dxtory: CMD = framecrc -i $(SAMPLES)/dxtory/dxtory_mic.avi FATE_FRAPS += fate-fraps-v0 @@ -23,7 +23,7 @@ fate-fraps-v4: CMD = framecrc -i $(SAMPLES)/fraps/WoW_2006-11-03_14-58-17-19-nos FATE_FRAPS += fate-fraps-v5 fate-fraps-v5: CMD = framecrc -i $(SAMPLES)/fraps/fraps-v5-bouncing-balls-partial.avi -FATE_TESTS += $(FATE_FRAPS) +FATE_AVCONV += $(FATE_FRAPS) fate-fraps: $(FATE_FRAPS) FATE_TSCC += fate-tscc-15bit @@ -32,7 +32,7 @@ fate-tscc-15bit: CMD = framecrc -i $(SAMPLES)/tscc/oneminute.avi -t 15 -pix_fmt FATE_TSCC += fate-tscc-32bit fate-tscc-32bit: CMD = framecrc -i $(SAMPLES)/tscc/2004-12-17-uebung9-partial.avi -pix_fmt rgb24 -an -FATE_TESTS += $(FATE_TSCC) +FATE_AVCONV += $(FATE_TSCC) fate-tscc: $(FATE_TSCC) FATE_VMNC += fate-vmnc-16bit @@ -41,7 +41,7 @@ fate-vmnc-16bit: CMD = framecrc -i $(SAMPLES)/VMnc/test.avi -pix_fmt rgb24 FATE_VMNC += fate-vmnc-32bit fate-vmnc-32bit: CMD = framecrc -i $(SAMPLES)/VMnc/VS2k5DebugDemo-01-partial.avi -pix_fmt rgb24 -FATE_TESTS += $(FATE_VMNC) +FATE_AVCONV += $(FATE_VMNC) fate-vmnc: $(FATE_VMNC) FATE_ZMBV += fate-zmbv-8bit @@ -56,5 +56,5 @@ fate-zmbv-16bit: CMD = framecrc -i $(SAMPLES)/zmbv/zmbv_16bit.avi -pix_fmt rgb24 FATE_ZMBV += fate-zmbv-32bit fate-zmbv-32bit: CMD = framecrc -i $(SAMPLES)/zmbv/zmbv_32bit.avi -pix_fmt rgb24 -t 25 -FATE_TESTS += $(FATE_ZMBV) +FATE_AVCONV += $(FATE_ZMBV) fate-zmbv: $(FATE_ZMBV) diff --git a/tests/fate/utvideo.mak b/tests/fate/utvideo.mak index 7cf6237b1e..81f631afd9 100644 --- a/tests/fate/utvideo.mak +++ b/tests/fate/utvideo.mak @@ -22,5 +22,5 @@ fate-utvideo_yuv422_left: CMD = framecrc -i $(SAMPLES)/utvideo/utvideo_yuv422_le FATE_UTVIDEO += fate-utvideo_yuv422_median fate-utvideo_yuv422_median: CMD = framecrc -i $(SAMPLES)/utvideo/utvideo_yuv422_median.avi -FATE_TESTS += $(FATE_UTVIDEO) +FATE_AVCONV += $(FATE_UTVIDEO) fate-utvideo: $(FATE_UTVIDEO) diff --git a/tests/fate/video.mak b/tests/fate/video.mak index c07ab628af..56cb4806c4 100644 --- a/tests/fate/video.mak +++ b/tests/fate/video.mak @@ -4,49 +4,49 @@ fate-4xm-1: CMD = framecrc -i $(SAMPLES)/4xm/version1.4xm -pix_fmt rgb24 -an FATE_4XM += fate-4xm-2 fate-4xm-2: CMD = framecrc -i $(SAMPLES)/4xm/version2.4xm -pix_fmt rgb24 -an -FATE_TESTS += $(FATE_4XM) +FATE_AVCONV += $(FATE_4XM) fate-4xm: $(FATE_4XM) -FATE_TESTS += fate-aasc +FATE_AVCONV += fate-aasc fate-aasc: CMD = framecrc -i $(SAMPLES)/aasc/AASC-1.5MB.AVI -pix_fmt rgb24 -FATE_TESTS += fate-alg-mm +FATE_AVCONV += fate-alg-mm fate-alg-mm: CMD = framecrc -i $(SAMPLES)/alg-mm/ibmlogo.mm -an -pix_fmt rgb24 -FATE_TESTS += fate-amv +FATE_AVCONV += fate-amv fate-amv: CMD = framecrc -idct simple -i $(SAMPLES)/amv/MTV_high_res_320x240_sample_Penguin_Joke_MTV_from_WMV.amv -t 10 -FATE_TESTS += fate-ansi +FATE_AVCONV += fate-ansi fate-ansi: CMD = framecrc -chars_per_frame 44100 -i $(SAMPLES)/ansi/TRE-IOM5.ANS -pix_fmt rgb24 -FATE_TESTS += fate-armovie-escape124 +FATE_AVCONV += fate-armovie-escape124 fate-armovie-escape124: CMD = framecrc -i $(SAMPLES)/rpl/ESCAPE.RPL -pix_fmt rgb24 -FATE_TESTS += fate-auravision-v1 +FATE_AVCONV += fate-auravision-v1 fate-auravision-v1: CMD = framecrc -i $(SAMPLES)/auravision/SOUVIDEO.AVI -an -FATE_TESTS += fate-auravision-v2 +FATE_AVCONV += fate-auravision-v2 fate-auravision-v2: CMD = framecrc -i $(SAMPLES)/auravision/salma-hayek-in-ugly-betty-partial-avi -an -FATE_TESTS += fate-bethsoft-vid +FATE_AVCONV += fate-bethsoft-vid fate-bethsoft-vid: CMD = framecrc -i $(SAMPLES)/bethsoft-vid/ANIM0001.VID -t 5 -pix_fmt rgb24 -FATE_TESTS += fate-bfi +FATE_AVCONV += fate-bfi fate-bfi: CMD = framecrc -i $(SAMPLES)/bfi/2287.bfi -pix_fmt rgb24 -FATE_TESTS += fate-bink-video +FATE_AVCONV += fate-bink-video fate-bink-video: CMD = framecrc -i $(SAMPLES)/bink/hol2br.bik -FATE_TESTS += fate-cdgraphics +FATE_AVCONV += fate-cdgraphics fate-cdgraphics: CMD = framecrc -i $(SAMPLES)/cdgraphics/BrotherJohn.cdg -pix_fmt rgb24 -t 1 -FATE_TESTS += fate-cljr +FATE_AVCONV += fate-cljr fate-cljr: CMD = framecrc -i $(SAMPLES)/cljr/testcljr-partial.avi -FATE_TESTS += fate-corepng +FATE_AVCONV += fate-corepng fate-corepng: CMD = framecrc -i $(SAMPLES)/png1/corepng-partial.avi -FATE_TESTS += fate-creatureshock-avs +FATE_AVCONV += fate-creatureshock-avs fate-creatureshock-avs: CMD = framecrc -i $(SAMPLES)/creatureshock-avs/OUTATIME.AVS -pix_fmt rgb24 FATE_CVID += fate-cvid-partial @@ -58,19 +58,19 @@ fate-cvid-palette: CMD = framecrc -i $(SAMPLES)/cvid/catfight-cvid-pal8-partial. FATE_CVID += fate-cvid-grayscale fate-cvid-grayscale: CMD = framecrc -i $(SAMPLES)/cvid/pcitva15.avi -an -FATE_TESTS += $(FATE_CVID) +FATE_AVCONV += $(FATE_CVID) fate-cvid: $(FATE_CVID) -FATE_TESTS += fate-cyberia-c93 +FATE_AVCONV += fate-cyberia-c93 fate-cyberia-c93: CMD = framecrc -i $(SAMPLES)/cyberia-c93/intro1.c93 -t 3 -pix_fmt rgb24 -FATE_TESTS += fate-cyuv +FATE_AVCONV += fate-cyuv fate-cyuv: CMD = framecrc -i $(SAMPLES)/cyuv/cyuv.avi -FATE_TESTS += fate-delphine-cin +FATE_AVCONV += fate-delphine-cin fate-delphine-cin: CMD = framecrc -i $(SAMPLES)/delphine-cin/LOGO-partial.CIN -pix_fmt rgb24 -FATE_TESTS += fate-deluxepaint-anm +FATE_AVCONV += fate-deluxepaint-anm fate-deluxepaint-anm: CMD = framecrc -i $(SAMPLES)/deluxepaint-anm/INTRO1.ANM -pix_fmt rgb24 FATE_TRUEMOTION1 += fate-truemotion1-15 @@ -79,10 +79,10 @@ fate-truemotion1-15: CMD = framecrc -i $(SAMPLES)/duck/phant2-940.duk -pix_fmt r FATE_TRUEMOTION1 += fate-truemotion1-24 fate-truemotion1-24: CMD = framecrc -i $(SAMPLES)/duck/sonic3dblast_intro-partial.avi -pix_fmt rgb24 -FATE_TESTS += $(FATE_TRUEMOTION1) +FATE_AVCONV += $(FATE_TRUEMOTION1) fate-truemotion1: $(FATE_TRUEMOTION1) -FATE_TESTS += fate-truemotion2 +FATE_AVCONV += fate-truemotion2 fate-truemotion2: CMD = framecrc -i $(SAMPLES)/duck/tm20.avi FATE_DXA += fate-dxa-feeble @@ -91,7 +91,7 @@ fate-dxa-feeble: CMD = framecrc -i $(SAMPLES)/dxa/meetsquid.dxa -t 2 -pix_fmt rg FATE_DXA += fate-dxa-scummvm fate-dxa-scummvm: CMD = framecrc -i $(SAMPLES)/dxa/scummvm.dxa -pix_fmt rgb24 -FATE_TESTS += $(FATE_DXA) +FATE_AVCONV += $(FATE_DXA) fate-dxa: $(FATE_DXA) FATE_FLIC += fate-flic-af11-palette-change @@ -103,16 +103,16 @@ fate-flic-af12: CMD = framecrc -i $(SAMPLES)/fli/jj00c2.fli -pix_fmt rgb24 FATE_FLIC += fate-flic-magiccarpet fate-flic-magiccarpet: CMD = framecrc -i $(SAMPLES)/fli/intel.dat -pix_fmt rgb24 -FATE_TESTS += $(FATE_FLIC) +FATE_AVCONV += $(FATE_FLIC) fate-flic: $(FATE_FLIC) -FATE_TESTS += fate-frwu +FATE_AVCONV += fate-frwu fate-frwu: CMD = framecrc -i $(SAMPLES)/frwu/frwu.avi -FATE_TESTS += fate-id-cin-video +FATE_AVCONV += fate-id-cin-video fate-id-cin-video: CMD = framecrc -i $(SAMPLES)/idcin/idlog-2MB.cin -pix_fmt rgb24 -FATE_TESTS-$(CONFIG_AVFILTER) += fate-idroq-video-encode +FATE_AVCONV-$(CONFIG_AVFILTER) += fate-idroq-video-encode fate-idroq-video-encode: CMD = md5 -f image2 -vcodec pgmyuv -i $(SAMPLES)/ffmpeg-synthetic/vsynth1/%02d.pgm -sws_flags +bitexact -vf pad=512:512:80:112 -f RoQ -t 0.2 FATE_IFF += fate-iff-byterun1 @@ -124,62 +124,62 @@ fate-iff-fibonacci: CMD = md5 -i $(SAMPLES)/iff/dasboot-in-compressed -f s16le FATE_IFF += fate-iff-ilbm fate-iff-ilbm: CMD = framecrc -i $(SAMPLES)/iff/lms-matriks.ilbm -pix_fmt rgb24 -FATE_TESTS += $(FATE_IFF) +FATE_AVCONV += $(FATE_IFF) fate-iff: $(FATE_IFF) -FATE_TESTS += fate-kgv1 +FATE_AVCONV += fate-kgv1 fate-kgv1: CMD = framecrc -i $(SAMPLES)/kega/kgv1.avi -pix_fmt rgb555le -an -FATE_TESTS += fate-kmvc +FATE_AVCONV += fate-kmvc fate-kmvc: CMD = framecrc -i $(SAMPLES)/KMVC/LOGO1.AVI -an -t 3 -pix_fmt rgb24 -FATE_TESTS += fate-mdec +FATE_AVCONV += fate-mdec fate-mdec: CMD = framecrc -idct simple -i $(SAMPLES)/ea-dct/NFS2Esprit-partial.dct -an -FATE_TESTS += fate-mimic +FATE_AVCONV += fate-mimic fate-mimic: CMD = framecrc -idct simple -i $(SAMPLES)/mimic/mimic2-womanloveffmpeg.cam -FATE_TESTS += fate-mjpegb +FATE_AVCONV += fate-mjpegb fate-mjpegb: CMD = framecrc -idct simple -flags +bitexact -i $(SAMPLES)/mjpegb/mjpegb_part.mov -an -FATE_TESTS += fate-motionpixels +FATE_AVCONV += fate-motionpixels fate-motionpixels: CMD = framecrc -i $(SAMPLES)/motion-pixels/INTRO-partial.MVI -an -pix_fmt rgb24 -vframes 111 -FATE_TESTS += fate-mpeg2-field-enc +FATE_AVCONV += fate-mpeg2-field-enc fate-mpeg2-field-enc: CMD = framecrc -flags +bitexact -dct fastint -idct simple -i $(SAMPLES)/mpeg2/mpeg2_field_encoding.ts -an # FIXME dropped frames in this test because of coarse timebase -FATE_TESTS += fate-nuv +FATE_AVCONV += fate-nuv fate-nuv: CMD = framecrc -idct simple -i $(SAMPLES)/nuv/Today.nuv -an -FATE_TESTS += fate-qpeg +FATE_AVCONV += fate-qpeg fate-qpeg: CMD = framecrc -i $(SAMPLES)/qpeg/Clock.avi -an -pix_fmt rgb24 -FATE_TESTS += fate-r210 +FATE_AVCONV += fate-r210 fate-r210: CMD = framecrc -i $(SAMPLES)/r210/r210.avi -pix_fmt rgb48le -FATE_TESTS += fate-rl2 +FATE_AVCONV += fate-rl2 fate-rl2: CMD = framecrc -i $(SAMPLES)/rl2/Z4915300.RL2 -pix_fmt rgb24 -an -FATE_TESTS += fate-smacker +FATE_AVCONV += fate-smacker fate-smacker: CMD = framecrc -i $(SAMPLES)/smacker/wetlogo.smk -pix_fmt rgb24 -FATE_TESTS += fate-smc +FATE_AVCONV += fate-smc fate-smc: CMD = framecrc -i $(SAMPLES)/smc/cass_schi.qt -pix_fmt rgb24 -FATE_TESTS += fate-sp5x +FATE_AVCONV += fate-sp5x fate-sp5x: CMD = framecrc -idct simple -i $(SAMPLES)/sp5x/sp5x_problem.avi -FATE_TESTS += fate-sub-srt +FATE_AVCONV += fate-sub-srt fate-sub-srt: CMD = md5 -i $(SAMPLES)/sub/SubRip_capability_tester.srt -f ass -FATE_TESTS += fate-thp +FATE_AVCONV += fate-thp fate-thp: CMD = framecrc -idct simple -i $(SAMPLES)/thp/pikmin2-opening1-partial.thp -an -FATE_TESTS += fate-tiertex-seq +FATE_AVCONV += fate-tiertex-seq fate-tiertex-seq: CMD = framecrc -i $(SAMPLES)/tiertex-seq/Gameover.seq -pix_fmt rgb24 -FATE_TESTS += fate-tmv +FATE_AVCONV += fate-tmv fate-tmv: CMD = framecrc -i $(SAMPLES)/tmv/pop-partial.tmv -pix_fmt rgb24 FATE_TXD += fate-txd-16bpp @@ -188,39 +188,39 @@ fate-txd-16bpp: CMD = framecrc -i $(SAMPLES)/txd/misc.txd -pix_fmt bgra -an FATE_TXD += fate-txd-pal8 fate-txd-pal8: CMD = framecrc -i $(SAMPLES)/txd/outro.txd -pix_fmt rgb24 -an -FATE_TESTS += $(FATE_TXD) +FATE_AVCONV += $(FATE_TXD) fate-txd: $(FATE_TXD) -FATE_TESTS += fate-ulti +FATE_AVCONV += fate-ulti fate-ulti: CMD = framecrc -i $(SAMPLES)/ulti/hit12w.avi -an -FATE_TESTS += fate-v210 +FATE_AVCONV += fate-v210 fate-v210: CMD = framecrc -i $(SAMPLES)/v210/v210_720p-partial.avi -pix_fmt yuv422p16be -an -FATE_TESTS += fate-v410dec +FATE_AVCONV += fate-v410dec fate-v410dec: CMD = framecrc -i $(SAMPLES)/v410/lenav410.mov -pix_fmt yuv444p10le -FATE_TESTS += fate-v410enc +FATE_AVCONV += fate-v410enc fate-v410enc: tests/vsynth1/00.pgm fate-v410enc: CMD = md5 -f image2 -vcodec pgmyuv -i $(TARGET_PATH)/tests/vsynth1/%02d.pgm -flags +bitexact -vcodec v410 -f avi -FATE_TESTS += fate-vcr1 +FATE_AVCONV += fate-vcr1 fate-vcr1: CMD = framecrc -i $(SAMPLES)/vcr1/VCR1test.avi -an -FATE_TESTS += fate-videoxl +FATE_AVCONV += fate-videoxl fate-videoxl: CMD = framecrc -i $(SAMPLES)/vixl/pig-vixl.avi -FATE_TESTS += fate-vqa-cc +FATE_AVCONV += fate-vqa-cc fate-vqa-cc: CMD = framecrc -i $(SAMPLES)/vqa/cc-demo1-partial.vqa -pix_fmt rgb24 -FATE_TESTS += fate-wc3movie-xan +FATE_AVCONV += fate-wc3movie-xan fate-wc3movie-xan: CMD = framecrc -i $(SAMPLES)/wc3movie/SC_32-part.MVE -pix_fmt rgb24 -FATE_TESTS += fate-wnv1 +FATE_AVCONV += fate-wnv1 fate-wnv1: CMD = framecrc -i $(SAMPLES)/wnv1/wnv1-codec.avi -an -FATE_TESTS += fate-yop +FATE_AVCONV += fate-yop fate-yop: CMD = framecrc -i $(SAMPLES)/yop/test1.yop -pix_fmt rgb24 -an -FATE_TESTS += fate-xxan-wc4 +FATE_AVCONV += fate-xxan-wc4 fate-xxan-wc4: CMD = framecrc -i $(SAMPLES)/wc4-xan/wc4trailer-partial.avi -an diff --git a/tests/fate/voice.mak b/tests/fate/voice.mak index 73534afa91..9bfbee6aad 100644 --- a/tests/fate/voice.mak +++ b/tests/fate/voice.mak @@ -6,7 +6,7 @@ fate-g722-encode: tests/data/asynth-16000-1.wav fate-g722-encode: SRC = tests/data/asynth-16000-1.wav fate-g722-encode: CMD = enc_dec_pcm wav md5 s16le $(SRC) -c:a g722 -FATE_TESTS += $(FATE_G722) +FATE_AVCONV += $(FATE_G722) fate-g722: $(FATE_G722) FATE_G726 += fate-g726-encode-2bit @@ -29,7 +29,7 @@ fate-g726-encode-5bit: tests/data/asynth-8000-1.wav fate-g726-encode-5bit: SRC = tests/data/asynth-8000-1.wav fate-g726-encode-5bit: CMD = enc_dec_pcm wav md5 s16le $(SRC) -c:a g726 -b:a 40k -FATE_TESTS += $(FATE_G726) +FATE_AVCONV += $(FATE_G726) fate-g726: $(FATE_G726) FATE_GSM += fate-gsm-ms @@ -38,15 +38,15 @@ fate-gsm-ms: CMD = framecrc -i $(SAMPLES)/gsm/ciao.wav FATE_GSM += fate-gsm-toast fate-gsm-toast: CMD = framecrc -i $(SAMPLES)/gsm/sample-gsm-8000.mov -t 10 -FATE_TESTS += $(FATE_GSM) +FATE_AVCONV += $(FATE_GSM) fate-gsm: $(FATE_GSM) -FATE_TESTS += fate-qcelp +FATE_AVCONV += fate-qcelp fate-qcelp: CMD = pcm -i $(SAMPLES)/qcp/0036580847.QCP fate-qcelp: CMP = oneoff fate-qcelp: REF = $(SAMPLES)/qcp/0036580847.pcm -FATE_TESTS += fate-truespeech +FATE_AVCONV += fate-truespeech fate-truespeech: CMD = pcm -i $(SAMPLES)/truespeech/a6.wav fate-truespeech: CMP = oneoff fate-truespeech: REF = $(SAMPLES)/truespeech/a6.pcm diff --git a/tests/fate/vorbis.mak b/tests/fate/vorbis.mak index 5452b74af5..25a5d89796 100644 --- a/tests/fate/vorbis.mak +++ b/tests/fate/vorbis.mak @@ -75,6 +75,6 @@ FATE_VORBIS += fate-vorbis-19 fate-vorbis-19: CMD = pcm -i $(SAMPLES)/vorbis/test-short2_small.ogg fate-vorbis-19: REF = $(SAMPLES)/vorbis/test-short2_small.pcm -FATE_TESTS += $(FATE_VORBIS) +FATE_AVCONV += $(FATE_VORBIS) fate-vorbis: $(FATE_VORBIS) $(FATE_VORBIS): CMP = oneoff diff --git a/tests/fate/vpx.mak b/tests/fate/vpx.mak index 02680d4151..e18caf9c32 100644 --- a/tests/fate/vpx.mak +++ b/tests/fate/vpx.mak @@ -4,7 +4,7 @@ fate-ea-vp60: CMD = framecrc -i $(SAMPLES)/ea-vp6/g36.vp6 FATE_EA_VP6 += fate-ea-vp61 fate-ea-vp61: CMD = framecrc -i $(SAMPLES)/ea-vp6/MovieSkirmishGondor.vp6 -t 4 -FATE_TESTS += $(FATE_EA_VP6) +FATE_AVCONV += $(FATE_EA_VP6) fate-ea-vp6: $(FATE_EA_VP6) FATE_VP3 += fate-vp31 @@ -13,16 +13,16 @@ fate-vp31: CMD = framecrc -i $(SAMPLES)/vp3/vp31.avi FATE_VP3 += fate-vp3-coeff-level64 fate-vp3-coeff-level64: CMD = framecrc -i $(SAMPLES)/vp3/coeff_level64.mkv -FATE_TESTS += $(FATE_VP3) +FATE_AVCONV += $(FATE_VP3) fate-vp3: $(FATE_VP3) -FATE_TESTS += fate-vp5 +FATE_AVCONV += fate-vp5 fate-vp5: CMD = framecrc -i $(SAMPLES)/vp5/potter512-400-partial.avi -an -FATE_TESTS += fate-vp6a +FATE_AVCONV += fate-vp6a fate-vp6a: CMD = framecrc -i $(SAMPLES)/flash-vp6/300x180-Scr-f8-056alpha.flv -FATE_TESTS += fate-vp6f +FATE_AVCONV += fate-vp6f fate-vp6f: CMD = framecrc -i $(SAMPLES)/flash-vp6/clip1024.flv VP8_SUITE = 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 @@ -49,5 +49,5 @@ endef $(eval $(call FATE_VP8_FULL)) $(eval $(call FATE_VP8_FULL,-emu-edge,-flags +emu_edge)) -FATE_TESTS += $(FATE_VP8) +FATE_AVCONV += $(FATE_VP8) fate-vp8: $(FATE_VP8) diff --git a/tests/fate/vqf.mak b/tests/fate/vqf.mak index 846b1404bb..72303667ad 100644 --- a/tests/fate/vqf.mak +++ b/tests/fate/vqf.mak @@ -1,7 +1,7 @@ -FATE_TESTS += fate-twinvq +FATE_AVCONV += fate-twinvq fate-twinvq: CMD = pcm -i $(SAMPLES)/vqf/achterba.vqf fate-twinvq: CMP = oneoff fate-twinvq: REF = $(SAMPLES)/vqf/achterba.pcm -FATE_TESTS += fate-vqf-demux +FATE_AVCONV += fate-vqf-demux fate-vqf-demux: CMD = md5 -i $(SAMPLES)/vqf/achterba.vqf -acodec copy -f framecrc diff --git a/tests/fate/wavpack.mak b/tests/fate/wavpack.mak index bf18954877..2b64d76cb7 100644 --- a/tests/fate/wavpack.mak +++ b/tests/fate/wavpack.mak @@ -86,5 +86,5 @@ fate-wavpack-falsestereo: CMD = md5 -i $(SAMPLES)/wavpack/special/false_stereo.w FATE_WAVPACK += fate-wavpack-matroskamode fate-wavpack-matroskamode: CMD = md5 -i $(SAMPLES)/wavpack/special/matroska_mode.mka -f s16le -FATE_TESTS += $(FATE_WAVPACK) +FATE_AVCONV += $(FATE_WAVPACK) fate-wavpack: $(FATE_WAVPACK) diff --git a/tests/fate/wma.mak b/tests/fate/wma.mak index 6fd4b38ca7..41b88ae2f1 100644 --- a/tests/fate/wma.mak +++ b/tests/fate/wma.mak @@ -13,7 +13,7 @@ fate-wmapro-ism: CMD = pcm -i $(SAMPLES)/isom/vc1-wmapro.ism -vn fate-wmapro-ism: CMP = oneoff fate-wmapro-ism: REF = $(SAMPLES)/isom/vc1-wmapro.pcm -FATE_TESTS += $(FATE_WMAPRO) +FATE_AVCONV += $(FATE_WMAPRO) fate-wmapro: $(FATE_WMAPRO) FATE_WMAVOICE += fate-wmavoice-7k @@ -34,7 +34,7 @@ fate-wmavoice-19k: CMP = stddev fate-wmavoice-19k: REF = $(SAMPLES)/wmavoice/streaming_CBR-19K.pcm fate-wmavoice-19k: FUZZ = 3 -FATE_TESTS += $(FATE_WMAVOICE) +FATE_AVCONV += $(FATE_WMAVOICE) fate-wmavoice: $(FATE_WMAVOICE) FATE_WMA_ENCODE += fate-wmav1-encode @@ -53,5 +53,5 @@ fate-wmav2-encode: CMP_SHIFT = -8192 fate-wmav2-encode: CMP_TARGET = 258.32 fate-wmav2-encode: SIZE_TOLERANCE = 4632 -FATE_TESTS += $(FATE_WMA_ENCODE) +FATE_AVCONV += $(FATE_WMA_ENCODE) fate-wma-encode: $(FATE_WMA_ENCODE) -- cgit v1.2.3 From b1f9be543687b837069be88428f798ac8ca28e8e Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Wed, 9 May 2012 00:59:40 +0100 Subject: fate: split idroq audio and video into separate tests Signed-off-by: Mans Rullgard --- tests/fate/dpcm.mak | 2 +- tests/fate/video.mak | 3 + tests/ref/fate/dpcm-idroq | 547 ++++++++++++++-------------------------------- tests/ref/fate/roqvideo | 211 ++++++++++++++++++ 4 files changed, 383 insertions(+), 380 deletions(-) create mode 100644 tests/ref/fate/roqvideo diff --git a/tests/fate/dpcm.mak b/tests/fate/dpcm.mak index 92899cc30a..36a33db220 100644 --- a/tests/fate/dpcm.mak +++ b/tests/fate/dpcm.mak @@ -1,5 +1,5 @@ FATE_DPCM += fate-dpcm-idroq -fate-dpcm-idroq: CMD = framecrc -i $(SAMPLES)/idroq/idlogo.roq +fate-dpcm-idroq: CMD = framecrc -i $(SAMPLES)/idroq/idlogo.roq -vn FATE_DPCM += fate-dpcm-sierra fate-dpcm-sierra: CMD = md5 -i $(SAMPLES)/sol/lsl7sample.sol -f s16le diff --git a/tests/fate/video.mak b/tests/fate/video.mak index 56cb4806c4..319eae86b5 100644 --- a/tests/fate/video.mak +++ b/tests/fate/video.mak @@ -161,6 +161,9 @@ fate-r210: CMD = framecrc -i $(SAMPLES)/r210/r210.avi -pix_fmt rgb48le FATE_AVCONV += fate-rl2 fate-rl2: CMD = framecrc -i $(SAMPLES)/rl2/Z4915300.RL2 -pix_fmt rgb24 -an +FATE_AVCONV += fate-roqvideo +fate-roqvideo: CMD = framecrc -i $(SAMPLES)/idroq/idlogo.roq -an + FATE_AVCONV += fate-smacker fate-smacker: CMD = framecrc -i $(SAMPLES)/smacker/wetlogo.smk -pix_fmt rgb24 diff --git a/tests/ref/fate/dpcm-idroq b/tests/ref/fate/dpcm-idroq index 086534387c..85e8efb098 100644 --- a/tests/ref/fate/dpcm-idroq +++ b/tests/ref/fate/dpcm-idroq @@ -1,379 +1,168 @@ -#tb 0: 1/30 -#tb 1: 1/22050 -0, 0, 0, 1, 393216, 0x56995aac -1, 0, 0, 7456, 29824, 0x77e265b7 -0, 1, 1, 1, 393216, 0xf9ed5d6c -0, 2, 2, 1, 393216, 0xd3285d75 -0, 3, 3, 1, 393216, 0x82d15d62 -0, 4, 4, 1, 393216, 0x893e5d6f -0, 5, 5, 1, 393216, 0x82d15d62 -0, 6, 6, 1, 393216, 0x893e5d6f -0, 7, 7, 1, 393216, 0x82d15d62 -0, 8, 8, 1, 393216, 0x893e5d6f -0, 9, 9, 1, 393216, 0x82d15d62 -0, 10, 10, 1, 393216, 0x893e5d6f -1, 7456, 7456, 736, 2944, 0x8dcdf50b -0, 11, 11, 1, 393216, 0x82d15d62 -1, 8192, 8192, 736, 2944, 0xb135cd2a -0, 12, 12, 1, 393216, 0x893e5d6f -1, 8928, 8928, 736, 2944, 0x54a6e73f -0, 13, 13, 1, 393216, 0x82d15d62 -1, 9664, 9664, 736, 2944, 0x050ccd4e -0, 14, 14, 1, 393216, 0x893e5d6f -1, 10400, 10400, 736, 2944, 0x6b68db44 -0, 15, 15, 1, 393216, 0x82d15d62 -1, 11136, 11136, 736, 2944, 0x55d1f308 -0, 16, 16, 1, 393216, 0x2ae39eca -1, 11872, 11872, 736, 2944, 0x7e92f50b -0, 17, 17, 1, 393216, 0x9254be70 -1, 12608, 12608, 736, 2944, 0xe9e91eed -0, 18, 18, 1, 393216, 0x4b2ed384 -1, 13344, 13344, 736, 2944, 0x80af2ce0 -0, 19, 19, 1, 393216, 0xbbd9d8f7 -1, 14080, 14080, 736, 2944, 0xc67ffb07 -0, 20, 20, 1, 393216, 0x1f2be0c3 -1, 14816, 14816, 736, 2944, 0x7aaded27 -0, 21, 21, 1, 393216, 0x2434eb25 -1, 15552, 15552, 736, 2944, 0x14a024fd -0, 22, 22, 1, 393216, 0xa6cced4e -1, 16288, 16288, 736, 2944, 0x26e8df1f -0, 23, 23, 1, 393216, 0xd116f38b -1, 17024, 17024, 736, 2944, 0x2688df44 -0, 24, 24, 1, 393216, 0x6b86f380 -1, 17760, 17760, 736, 2944, 0x4b9cdd33 -0, 25, 25, 1, 393216, 0xc1b3f8e9 -1, 18496, 18496, 736, 2944, 0x10c2f11c -0, 26, 26, 1, 393216, 0x2993fd5d -1, 19232, 19232, 736, 2944, 0xc4e3ad6d -0, 27, 27, 1, 393216, 0xf489fe18 -1, 19968, 19968, 736, 2944, 0xbeb1a78e -0, 28, 28, 1, 393216, 0x9ef10501 -1, 20704, 20704, 736, 2944, 0x283d4e7f -0, 29, 29, 1, 393216, 0x8faf0512 -1, 21440, 21440, 736, 2944, 0x4acf65e0 -0, 30, 30, 1, 393216, 0xa54d0736 -1, 22176, 22176, 736, 2944, 0x0ca29b8c -0, 31, 31, 1, 393216, 0xf4ef01e0 -1, 22912, 22912, 736, 2944, 0x003fae34 -0, 32, 32, 1, 393216, 0xe241ef51 -1, 23648, 23648, 736, 2944, 0x2acfec7e -0, 33, 33, 1, 393216, 0xcc38e51f -1, 24384, 24384, 736, 2944, 0xea6fc6fe -0, 34, 34, 1, 393216, 0xb1345876 -1, 25120, 25120, 736, 2944, 0xf5daec2f -0, 35, 35, 1, 393216, 0xf9b0968b -1, 25856, 25856, 736, 2944, 0x8d33ed7a -0, 36, 36, 1, 393216, 0x6bb1523f -1, 26592, 26592, 736, 2944, 0xc328f984 -0, 37, 37, 1, 393216, 0x83469a05 -1, 27328, 27328, 736, 2944, 0x6e0b58d3 -0, 38, 38, 1, 393216, 0x73e30882 -1, 28064, 28064, 736, 2944, 0xe282dc3f -0, 39, 39, 1, 393216, 0x8673da66 -1, 28800, 28800, 736, 2944, 0xbf9bf3e6 -0, 40, 40, 1, 393216, 0xb67596d3 -1, 29536, 29536, 736, 2944, 0xd7b7d7e3 -0, 41, 41, 1, 393216, 0xf7638710 -1, 30272, 30272, 736, 2944, 0x4e87b6ab -0, 42, 42, 1, 393216, 0x813a8f47 -1, 31008, 31008, 736, 2944, 0x7b8ce8d6 -0, 43, 43, 1, 393216, 0xb3526555 -1, 31744, 31744, 736, 2944, 0xd42991a5 -0, 44, 44, 1, 393216, 0x1b167be3 -1, 32480, 32480, 736, 2944, 0x452c98ca -0, 45, 45, 1, 393216, 0x99114562 -1, 33216, 33216, 736, 2944, 0x6d27832d -0, 46, 46, 1, 393216, 0xfafb0693 -1, 33952, 33952, 736, 2944, 0xa558720e -0, 47, 47, 1, 393216, 0x121d96c8 -1, 34688, 34688, 736, 2944, 0x0a31bec0 -0, 48, 48, 1, 393216, 0xb3c68c5d -1, 35424, 35424, 736, 2944, 0x28431384 -0, 49, 49, 1, 393216, 0x2035b97f -1, 36160, 36160, 736, 2944, 0xd5e9fb3d -0, 50, 50, 1, 393216, 0xfbcaeb62 -1, 36896, 36896, 736, 2944, 0x34f0e9f8 -0, 51, 51, 1, 393216, 0xfd5aea5d -1, 37632, 37632, 736, 2944, 0x979432df -0, 52, 52, 1, 393216, 0x66efbddd -1, 38368, 38368, 736, 2944, 0xb00acd4d -0, 53, 53, 1, 393216, 0xf1e17862 -1, 39104, 39104, 736, 2944, 0x726bffd6 -0, 54, 54, 1, 393216, 0x27fa584d -1, 39840, 39840, 736, 2944, 0xa1f39a6d -0, 55, 55, 1, 393216, 0xe644ec5f -1, 40576, 40576, 736, 2944, 0xf6a8e30e -0, 56, 56, 1, 393216, 0x7e3067ba -1, 41312, 41312, 736, 2944, 0x608e9e06 -0, 57, 57, 1, 393216, 0x1b6ba6fd -1, 42048, 42048, 736, 2944, 0x4ec58bc3 -0, 58, 58, 1, 393216, 0x55bdba34 -1, 42784, 42784, 736, 2944, 0x6d5c8458 -0, 59, 59, 1, 393216, 0xc67db2e4 -1, 43520, 43520, 736, 2944, 0x76a0abbd -0, 60, 60, 1, 393216, 0x359de8a2 -1, 44256, 44256, 736, 2944, 0xf830e8a6 -0, 61, 61, 1, 393216, 0x7b7a32ef -1, 44992, 44992, 736, 2944, 0x1bdd7bec -0, 62, 62, 1, 393216, 0xbe512a66 -1, 45728, 45728, 736, 2944, 0x3c1bd187 -0, 63, 63, 1, 393216, 0x681d82bf -1, 46464, 46464, 736, 2944, 0xf52cf697 -0, 64, 64, 1, 393216, 0xa2320ec5 -1, 47200, 47200, 736, 2944, 0x8f65b773 -0, 65, 65, 1, 393216, 0xcfbd9954 -1, 47936, 47936, 736, 2944, 0xf8b5b598 -0, 66, 66, 1, 393216, 0x7fee9854 -1, 48672, 48672, 736, 2944, 0xcd87d5ed -0, 67, 67, 1, 393216, 0x70eec155 -1, 49408, 49408, 736, 2944, 0x672ac02a -0, 68, 68, 1, 393216, 0x114f684e -1, 50144, 50144, 736, 2944, 0x1d5d13ed -0, 69, 69, 1, 393216, 0xe27f034f -1, 50880, 50880, 736, 2944, 0xe298e3d4 -0, 70, 70, 1, 393216, 0xfbbd89b4 -1, 51616, 51616, 736, 2944, 0x3d2e9c32 -0, 71, 71, 1, 393216, 0xcef4c58a -1, 52352, 52352, 736, 2944, 0xf3a39259 -0, 72, 72, 1, 393216, 0x9eea88e9 -1, 53088, 53088, 736, 2944, 0x930ae8f8 -0, 73, 73, 1, 393216, 0x911cea42 -1, 53824, 53824, 736, 2944, 0x8562aff7 -0, 74, 74, 1, 393216, 0xec5727ea -1, 54560, 54560, 736, 2944, 0x9cd6c6a7 -0, 75, 75, 1, 393216, 0xda998c33 -1, 55296, 55296, 736, 2944, 0x2709dc5c -0, 76, 76, 1, 393216, 0xc82140ed -1, 56032, 56032, 736, 2944, 0xcbe31816 -0, 77, 77, 1, 393216, 0x4caa8591 -1, 56768, 56768, 736, 2944, 0xd7876ec4 -0, 78, 78, 1, 393216, 0x4944206c -1, 57504, 57504, 736, 2944, 0xc2468b6a -0, 79, 79, 1, 393216, 0xd4676a94 -1, 58240, 58240, 736, 2944, 0x76043e84 -0, 80, 80, 1, 393216, 0x9e0340b3 -1, 58976, 58976, 736, 2944, 0xd2c35bf0 -0, 81, 81, 1, 393216, 0xbdef7f94 -1, 59712, 59712, 736, 2944, 0x63de6061 -0, 82, 82, 1, 393216, 0xfac05cb0 -1, 60448, 60448, 736, 2944, 0xd8f6ed1d -0, 83, 83, 1, 393216, 0xfef5a369 -1, 61184, 61184, 736, 2944, 0xe034928a -0, 84, 84, 1, 393216, 0x9fcb3711 -1, 61920, 61920, 736, 2944, 0xa044da74 -0, 85, 85, 1, 393216, 0x6d93f761 -1, 62656, 62656, 736, 2944, 0xee410dba -0, 86, 86, 1, 393216, 0xe95dc1ae -1, 63392, 63392, 736, 2944, 0x8e020c7c -0, 87, 87, 1, 393216, 0x3e561557 -1, 64128, 64128, 736, 2944, 0x73057ddb -0, 88, 88, 1, 393216, 0x0fa7a049 -1, 64864, 64864, 736, 2944, 0xdee5cc18 -0, 89, 89, 1, 393216, 0xf16afb95 -1, 65600, 65600, 736, 2944, 0xf4d31dec -0, 90, 90, 1, 393216, 0xe53a2064 -1, 66336, 66336, 736, 2944, 0xe8131e1c -0, 91, 91, 1, 393216, 0x57f046a4 -1, 67072, 67072, 736, 2944, 0x8ae69c95 -0, 92, 92, 1, 393216, 0xf6f16a0c -1, 67808, 67808, 736, 2944, 0x791c0bf4 -0, 93, 93, 1, 393216, 0xcba0c8b0 -1, 68544, 68544, 736, 2944, 0xd45a10db -0, 94, 94, 1, 393216, 0x5bdbe522 -1, 69280, 69280, 736, 2944, 0x3a72b010 -0, 95, 95, 1, 393216, 0x0fed0151 -1, 70016, 70016, 736, 2944, 0x6a4a0411 -0, 96, 96, 1, 393216, 0xbf86faf8 -1, 70752, 70752, 736, 2944, 0xd77ab7f5 -0, 97, 97, 1, 393216, 0x39854c5f -1, 71488, 71488, 736, 2944, 0xe3bf4fe5 -0, 98, 98, 1, 393216, 0xd9b7760a -1, 72224, 72224, 736, 2944, 0x12db1be8 -0, 99, 99, 1, 393216, 0x8edcc1d9 -1, 72960, 72960, 736, 2944, 0x345210b0 -0, 100, 100, 1, 393216, 0x44ae1435 -1, 73696, 73696, 736, 2944, 0xcfc1f892 -0, 101, 101, 1, 393216, 0xbc3d6d73 -1, 74432, 74432, 736, 2944, 0x5b0a80bb -0, 102, 102, 1, 393216, 0xedd82647 -1, 75168, 75168, 736, 2944, 0x31ab1168 -0, 103, 103, 1, 393216, 0x1c2e5ce3 -1, 75904, 75904, 736, 2944, 0xd4a4bb0a -0, 104, 104, 1, 393216, 0x04e29afe -1, 76640, 76640, 736, 2944, 0x8e211c8f -0, 105, 105, 1, 393216, 0xb191578e -1, 77376, 77376, 736, 2944, 0xcf464d50 -0, 106, 106, 1, 393216, 0x31d75a06 -1, 78112, 78112, 736, 2944, 0xe74ff3d6 -0, 107, 107, 1, 393216, 0xfdb6c56e -1, 78848, 78848, 736, 2944, 0x6274635f -0, 108, 108, 1, 393216, 0xf528f484 -1, 79584, 79584, 736, 2944, 0xc34c9f64 -0, 109, 109, 1, 393216, 0x87af758e -1, 80320, 80320, 736, 2944, 0xbb997537 -0, 110, 110, 1, 393216, 0xc8bdafb7 -1, 81056, 81056, 736, 2944, 0x3600da72 -0, 111, 111, 1, 393216, 0x573afe93 -1, 81792, 81792, 736, 2944, 0x343e15f4 -0, 112, 112, 1, 393216, 0xb03cb8f5 -1, 82528, 82528, 736, 2944, 0x17bc58a8 -0, 113, 113, 1, 393216, 0x6e03ac71 -1, 83264, 83264, 736, 2944, 0x3dcbd3ff -0, 114, 114, 1, 393216, 0xf919164e -1, 84000, 84000, 736, 2944, 0x1d422371 -0, 115, 115, 1, 393216, 0x80059f3c -1, 84736, 84736, 736, 2944, 0xe2b83d9d -0, 116, 116, 1, 393216, 0xf4ea0b1a -1, 85472, 85472, 736, 2944, 0x65388409 -0, 117, 117, 1, 393216, 0xe7720ffb -1, 86208, 86208, 736, 2944, 0xafbca269 -0, 118, 118, 1, 393216, 0x1ec0cd56 -1, 86944, 86944, 736, 2944, 0x2d00c0fb -0, 119, 119, 1, 393216, 0x2bc8cf18 -1, 87680, 87680, 736, 2944, 0xbac9c503 -0, 120, 120, 1, 393216, 0xe0bf17b5 -1, 88416, 88416, 736, 2944, 0x9990768d -0, 121, 121, 1, 393216, 0x660247e1 -1, 89152, 89152, 736, 2944, 0x8ba978be -0, 122, 122, 1, 393216, 0xcf66f2a9 -1, 89888, 89888, 736, 2944, 0x5a44a2f5 -0, 123, 123, 1, 393216, 0x5494d5ab -1, 90624, 90624, 736, 2944, 0xa4b6f3b8 -0, 124, 124, 1, 393216, 0x2c02f2c4 -1, 91360, 91360, 736, 2944, 0x631b6b9f -0, 125, 125, 1, 393216, 0x93fa3783 -1, 92096, 92096, 736, 2944, 0x4c840923 -0, 126, 126, 1, 393216, 0x4cc50633 -1, 92832, 92832, 736, 2944, 0x7c105df3 -0, 127, 127, 1, 393216, 0x3f179386 -1, 93568, 93568, 736, 2944, 0x01bcb213 -0, 128, 128, 1, 393216, 0x2bca9e1b -1, 94304, 94304, 736, 2944, 0x95cffbf7 -0, 129, 129, 1, 393216, 0x3e4af867 -1, 95040, 95040, 736, 2944, 0x170a9c3a -0, 130, 130, 1, 393216, 0x7e7df93c -1, 95776, 95776, 736, 2944, 0x59e09d61 -0, 131, 131, 1, 393216, 0x577e4fb0 -1, 96512, 96512, 736, 2944, 0x3ea0f205 -0, 132, 132, 1, 393216, 0x34487f0a -1, 97248, 97248, 736, 2944, 0xd9ea1a3a -0, 133, 133, 1, 393216, 0x0937bcfc -1, 97984, 97984, 736, 2944, 0xaf32d704 -0, 134, 134, 1, 393216, 0xa9e75a5e -1, 98720, 98720, 736, 2944, 0x2d473392 -0, 135, 135, 1, 393216, 0xf7bc0c89 -1, 99456, 99456, 736, 2944, 0x2a8ec544 -0, 136, 136, 1, 393216, 0x06dacca6 -1, 100192, 100192, 736, 2944, 0x883c8838 -0, 137, 137, 1, 393216, 0x7baaa4bd -1, 100928, 100928, 736, 2944, 0xfaf4d789 -0, 138, 138, 1, 393216, 0x95477f5f -1, 101664, 101664, 736, 2944, 0xcb315b65 -0, 139, 139, 1, 393216, 0x51117526 -1, 102400, 102400, 736, 2944, 0x980c93b0 -0, 140, 140, 1, 393216, 0x69656d03 -1, 103136, 103136, 736, 2944, 0x0819583b -0, 141, 141, 1, 393216, 0xcbd061bb -1, 103872, 103872, 736, 2944, 0xf126e5b5 -0, 142, 142, 1, 393216, 0x8d1d5be2 -1, 104608, 104608, 736, 2944, 0x88836255 -0, 143, 143, 1, 393216, 0x43e55930 -1, 105344, 105344, 736, 2944, 0xc8ae8ca8 -0, 144, 144, 1, 393216, 0xb56f5872 -1, 106080, 106080, 736, 2944, 0xf0750551 -0, 145, 145, 1, 393216, 0x09a255e9 -1, 106816, 106816, 736, 2944, 0x3dfe13a3 -0, 146, 146, 1, 393216, 0xcaaa5456 -1, 107552, 107552, 736, 2944, 0xf2aa957b -0, 147, 147, 1, 393216, 0xd267501f -1, 108288, 108288, 736, 2944, 0xa77b79a3 -0, 148, 148, 1, 393216, 0x7bef4eca -1, 109024, 109024, 736, 2944, 0xb1038284 -0, 149, 149, 1, 393216, 0x9aa94af3 -1, 109760, 109760, 736, 2944, 0xf96be3ba -0, 150, 150, 1, 393216, 0xd39d4a29 -1, 110496, 110496, 736, 2944, 0x1ae6e293 -0, 151, 151, 1, 393216, 0x7a754960 -1, 111232, 111232, 736, 2944, 0x2059d020 -0, 152, 152, 1, 393216, 0x3f004921 -1, 111968, 111968, 736, 2944, 0x7e6c9996 -0, 153, 153, 1, 393216, 0x0f784ca8 -1, 112704, 112704, 736, 2944, 0x3108b540 -0, 154, 154, 1, 393216, 0x2a062c70 -1, 113440, 113440, 736, 2944, 0x75133155 -0, 155, 155, 1, 393216, 0x114ef770 -1, 114176, 114176, 736, 2944, 0x59a19226 -0, 156, 156, 1, 393216, 0xfb7673bf -1, 114912, 114912, 736, 2944, 0x3140c138 -0, 157, 157, 1, 393216, 0xbaea88f7 -1, 115648, 115648, 736, 2944, 0x7570d3be -0, 158, 158, 1, 393216, 0x6fdfe2ec -1, 116384, 116384, 736, 2944, 0x54fd4ff6 -0, 159, 159, 1, 393216, 0xb7b2b398 -1, 117120, 117120, 736, 2944, 0x23bcf6dc -0, 160, 160, 1, 393216, 0x14ba127e -1, 117856, 117856, 736, 2944, 0x2d26489b -0, 161, 161, 1, 393216, 0x660b3041 -1, 118592, 118592, 736, 2944, 0x4b37bf13 -0, 162, 162, 1, 393216, 0xe3f3302a -1, 119328, 119328, 736, 2944, 0x12812ec9 -0, 163, 163, 1, 393216, 0x34c7f1c9 -1, 120064, 120064, 736, 2944, 0xc4a609dd -0, 164, 164, 1, 393216, 0xa8257bf4 -1, 120800, 120800, 736, 2944, 0x5a8c5b20 -0, 165, 165, 1, 393216, 0xd63fc649 -1, 121536, 121536, 736, 2944, 0xd05d110f -0, 166, 166, 1, 393216, 0xf8e5b79c -1, 122272, 122272, 736, 2944, 0xceea6f1f -0, 167, 167, 1, 393216, 0xa67b52ab -1, 123008, 123008, 736, 2944, 0x4033b0a5 -0, 168, 168, 1, 393216, 0xef8f9c74 -1, 123744, 123744, 736, 2944, 0x101895ce -0, 169, 169, 1, 393216, 0x6d3aa6b6 -1, 124480, 124480, 736, 2944, 0xd6c6809f -0, 170, 170, 1, 393216, 0x8c174ee6 -1, 125216, 125216, 736, 2944, 0x197bda7e -0, 171, 171, 1, 393216, 0x2dfbc524 -1, 125952, 125952, 736, 2944, 0x96fb3e4b -0, 172, 172, 1, 393216, 0x7d0808b6 -1, 126688, 126688, 736, 2944, 0x12a6e3de -0, 173, 173, 1, 393216, 0x6cbdf6f5 -1, 127424, 127424, 736, 2944, 0xfb80e466 -0, 174, 174, 1, 393216, 0xfe39bc53 -1, 128160, 128160, 736, 2944, 0xedb8c2fc -0, 175, 175, 1, 393216, 0xa3d869b0 -1, 128896, 128896, 254, 1016, 0x30e56ca5 -0, 176, 176, 1, 393216, 0x09f00057 -0, 177, 177, 1, 393216, 0x6ba56343 -0, 178, 178, 1, 393216, 0xb696ca3e -0, 179, 179, 1, 393216, 0x4eba0225 -0, 180, 180, 1, 393216, 0xdd45464b -0, 181, 181, 1, 393216, 0x2909a9ea -0, 182, 182, 1, 393216, 0x12aa3f85 -0, 183, 183, 1, 393216, 0x59421352 -0, 184, 184, 1, 393216, 0x57ea0313 -0, 185, 185, 1, 393216, 0x4e5f3a38 -0, 186, 186, 1, 393216, 0x55bc932d -0, 187, 187, 1, 393216, 0x666ee55d -0, 188, 188, 1, 393216, 0xb0f84a69 -0, 189, 189, 1, 393216, 0xad3ae63f -0, 190, 190, 1, 393216, 0x970fd47d -0, 191, 191, 1, 393216, 0x86c418e0 -0, 192, 192, 1, 393216, 0x52c9ce50 -0, 193, 193, 1, 393216, 0xd54c98c8 -0, 194, 194, 1, 393216, 0xb40e5fea -0, 195, 195, 1, 393216, 0x2aa74875 -0, 196, 196, 1, 393216, 0x305b251e -0, 197, 197, 1, 393216, 0xab8c0780 -0, 198, 198, 1, 393216, 0x0101dd0e -0, 199, 199, 1, 393216, 0x23739cab -0, 200, 200, 1, 393216, 0xf05196a0 -0, 201, 201, 1, 393216, 0x932d1e00 -0, 202, 202, 1, 393216, 0x932d1e00 -0, 203, 203, 1, 393216, 0x932d1e00 -0, 204, 204, 1, 393216, 0x932d1e00 -0, 205, 205, 1, 393216, 0x932d1e00 -0, 206, 206, 1, 393216, 0x932d1e00 -0, 207, 207, 1, 393216, 0x932d1e00 -0, 208, 208, 1, 393216, 0x932d1e00 -0, 209, 209, 1, 393216, 0x932d1e00 +#tb 0: 1/22050 +0, 0, 0, 7456, 29824, 0x77e265b7 +0, 7456, 7456, 736, 2944, 0x8dcdf50b +0, 8192, 8192, 736, 2944, 0xb135cd2a +0, 8928, 8928, 736, 2944, 0x54a6e73f +0, 9664, 9664, 736, 2944, 0x050ccd4e +0, 10400, 10400, 736, 2944, 0x6b68db44 +0, 11136, 11136, 736, 2944, 0x55d1f308 +0, 11872, 11872, 736, 2944, 0x7e92f50b +0, 12608, 12608, 736, 2944, 0xe9e91eed +0, 13344, 13344, 736, 2944, 0x80af2ce0 +0, 14080, 14080, 736, 2944, 0xc67ffb07 +0, 14816, 14816, 736, 2944, 0x7aaded27 +0, 15552, 15552, 736, 2944, 0x14a024fd +0, 16288, 16288, 736, 2944, 0x26e8df1f +0, 17024, 17024, 736, 2944, 0x2688df44 +0, 17760, 17760, 736, 2944, 0x4b9cdd33 +0, 18496, 18496, 736, 2944, 0x10c2f11c +0, 19232, 19232, 736, 2944, 0xc4e3ad6d +0, 19968, 19968, 736, 2944, 0xbeb1a78e +0, 20704, 20704, 736, 2944, 0x283d4e7f +0, 21440, 21440, 736, 2944, 0x4acf65e0 +0, 22176, 22176, 736, 2944, 0x0ca29b8c +0, 22912, 22912, 736, 2944, 0x003fae34 +0, 23648, 23648, 736, 2944, 0x2acfec7e +0, 24384, 24384, 736, 2944, 0xea6fc6fe +0, 25120, 25120, 736, 2944, 0xf5daec2f +0, 25856, 25856, 736, 2944, 0x8d33ed7a +0, 26592, 26592, 736, 2944, 0xc328f984 +0, 27328, 27328, 736, 2944, 0x6e0b58d3 +0, 28064, 28064, 736, 2944, 0xe282dc3f +0, 28800, 28800, 736, 2944, 0xbf9bf3e6 +0, 29536, 29536, 736, 2944, 0xd7b7d7e3 +0, 30272, 30272, 736, 2944, 0x4e87b6ab +0, 31008, 31008, 736, 2944, 0x7b8ce8d6 +0, 31744, 31744, 736, 2944, 0xd42991a5 +0, 32480, 32480, 736, 2944, 0x452c98ca +0, 33216, 33216, 736, 2944, 0x6d27832d +0, 33952, 33952, 736, 2944, 0xa558720e +0, 34688, 34688, 736, 2944, 0x0a31bec0 +0, 35424, 35424, 736, 2944, 0x28431384 +0, 36160, 36160, 736, 2944, 0xd5e9fb3d +0, 36896, 36896, 736, 2944, 0x34f0e9f8 +0, 37632, 37632, 736, 2944, 0x979432df +0, 38368, 38368, 736, 2944, 0xb00acd4d +0, 39104, 39104, 736, 2944, 0x726bffd6 +0, 39840, 39840, 736, 2944, 0xa1f39a6d +0, 40576, 40576, 736, 2944, 0xf6a8e30e +0, 41312, 41312, 736, 2944, 0x608e9e06 +0, 42048, 42048, 736, 2944, 0x4ec58bc3 +0, 42784, 42784, 736, 2944, 0x6d5c8458 +0, 43520, 43520, 736, 2944, 0x76a0abbd +0, 44256, 44256, 736, 2944, 0xf830e8a6 +0, 44992, 44992, 736, 2944, 0x1bdd7bec +0, 45728, 45728, 736, 2944, 0x3c1bd187 +0, 46464, 46464, 736, 2944, 0xf52cf697 +0, 47200, 47200, 736, 2944, 0x8f65b773 +0, 47936, 47936, 736, 2944, 0xf8b5b598 +0, 48672, 48672, 736, 2944, 0xcd87d5ed +0, 49408, 49408, 736, 2944, 0x672ac02a +0, 50144, 50144, 736, 2944, 0x1d5d13ed +0, 50880, 50880, 736, 2944, 0xe298e3d4 +0, 51616, 51616, 736, 2944, 0x3d2e9c32 +0, 52352, 52352, 736, 2944, 0xf3a39259 +0, 53088, 53088, 736, 2944, 0x930ae8f8 +0, 53824, 53824, 736, 2944, 0x8562aff7 +0, 54560, 54560, 736, 2944, 0x9cd6c6a7 +0, 55296, 55296, 736, 2944, 0x2709dc5c +0, 56032, 56032, 736, 2944, 0xcbe31816 +0, 56768, 56768, 736, 2944, 0xd7876ec4 +0, 57504, 57504, 736, 2944, 0xc2468b6a +0, 58240, 58240, 736, 2944, 0x76043e84 +0, 58976, 58976, 736, 2944, 0xd2c35bf0 +0, 59712, 59712, 736, 2944, 0x63de6061 +0, 60448, 60448, 736, 2944, 0xd8f6ed1d +0, 61184, 61184, 736, 2944, 0xe034928a +0, 61920, 61920, 736, 2944, 0xa044da74 +0, 62656, 62656, 736, 2944, 0xee410dba +0, 63392, 63392, 736, 2944, 0x8e020c7c +0, 64128, 64128, 736, 2944, 0x73057ddb +0, 64864, 64864, 736, 2944, 0xdee5cc18 +0, 65600, 65600, 736, 2944, 0xf4d31dec +0, 66336, 66336, 736, 2944, 0xe8131e1c +0, 67072, 67072, 736, 2944, 0x8ae69c95 +0, 67808, 67808, 736, 2944, 0x791c0bf4 +0, 68544, 68544, 736, 2944, 0xd45a10db +0, 69280, 69280, 736, 2944, 0x3a72b010 +0, 70016, 70016, 736, 2944, 0x6a4a0411 +0, 70752, 70752, 736, 2944, 0xd77ab7f5 +0, 71488, 71488, 736, 2944, 0xe3bf4fe5 +0, 72224, 72224, 736, 2944, 0x12db1be8 +0, 72960, 72960, 736, 2944, 0x345210b0 +0, 73696, 73696, 736, 2944, 0xcfc1f892 +0, 74432, 74432, 736, 2944, 0x5b0a80bb +0, 75168, 75168, 736, 2944, 0x31ab1168 +0, 75904, 75904, 736, 2944, 0xd4a4bb0a +0, 76640, 76640, 736, 2944, 0x8e211c8f +0, 77376, 77376, 736, 2944, 0xcf464d50 +0, 78112, 78112, 736, 2944, 0xe74ff3d6 +0, 78848, 78848, 736, 2944, 0x6274635f +0, 79584, 79584, 736, 2944, 0xc34c9f64 +0, 80320, 80320, 736, 2944, 0xbb997537 +0, 81056, 81056, 736, 2944, 0x3600da72 +0, 81792, 81792, 736, 2944, 0x343e15f4 +0, 82528, 82528, 736, 2944, 0x17bc58a8 +0, 83264, 83264, 736, 2944, 0x3dcbd3ff +0, 84000, 84000, 736, 2944, 0x1d422371 +0, 84736, 84736, 736, 2944, 0xe2b83d9d +0, 85472, 85472, 736, 2944, 0x65388409 +0, 86208, 86208, 736, 2944, 0xafbca269 +0, 86944, 86944, 736, 2944, 0x2d00c0fb +0, 87680, 87680, 736, 2944, 0xbac9c503 +0, 88416, 88416, 736, 2944, 0x9990768d +0, 89152, 89152, 736, 2944, 0x8ba978be +0, 89888, 89888, 736, 2944, 0x5a44a2f5 +0, 90624, 90624, 736, 2944, 0xa4b6f3b8 +0, 91360, 91360, 736, 2944, 0x631b6b9f +0, 92096, 92096, 736, 2944, 0x4c840923 +0, 92832, 92832, 736, 2944, 0x7c105df3 +0, 93568, 93568, 736, 2944, 0x01bcb213 +0, 94304, 94304, 736, 2944, 0x95cffbf7 +0, 95040, 95040, 736, 2944, 0x170a9c3a +0, 95776, 95776, 736, 2944, 0x59e09d61 +0, 96512, 96512, 736, 2944, 0x3ea0f205 +0, 97248, 97248, 736, 2944, 0xd9ea1a3a +0, 97984, 97984, 736, 2944, 0xaf32d704 +0, 98720, 98720, 736, 2944, 0x2d473392 +0, 99456, 99456, 736, 2944, 0x2a8ec544 +0, 100192, 100192, 736, 2944, 0x883c8838 +0, 100928, 100928, 736, 2944, 0xfaf4d789 +0, 101664, 101664, 736, 2944, 0xcb315b65 +0, 102400, 102400, 736, 2944, 0x980c93b0 +0, 103136, 103136, 736, 2944, 0x0819583b +0, 103872, 103872, 736, 2944, 0xf126e5b5 +0, 104608, 104608, 736, 2944, 0x88836255 +0, 105344, 105344, 736, 2944, 0xc8ae8ca8 +0, 106080, 106080, 736, 2944, 0xf0750551 +0, 106816, 106816, 736, 2944, 0x3dfe13a3 +0, 107552, 107552, 736, 2944, 0xf2aa957b +0, 108288, 108288, 736, 2944, 0xa77b79a3 +0, 109024, 109024, 736, 2944, 0xb1038284 +0, 109760, 109760, 736, 2944, 0xf96be3ba +0, 110496, 110496, 736, 2944, 0x1ae6e293 +0, 111232, 111232, 736, 2944, 0x2059d020 +0, 111968, 111968, 736, 2944, 0x7e6c9996 +0, 112704, 112704, 736, 2944, 0x3108b540 +0, 113440, 113440, 736, 2944, 0x75133155 +0, 114176, 114176, 736, 2944, 0x59a19226 +0, 114912, 114912, 736, 2944, 0x3140c138 +0, 115648, 115648, 736, 2944, 0x7570d3be +0, 116384, 116384, 736, 2944, 0x54fd4ff6 +0, 117120, 117120, 736, 2944, 0x23bcf6dc +0, 117856, 117856, 736, 2944, 0x2d26489b +0, 118592, 118592, 736, 2944, 0x4b37bf13 +0, 119328, 119328, 736, 2944, 0x12812ec9 +0, 120064, 120064, 736, 2944, 0xc4a609dd +0, 120800, 120800, 736, 2944, 0x5a8c5b20 +0, 121536, 121536, 736, 2944, 0xd05d110f +0, 122272, 122272, 736, 2944, 0xceea6f1f +0, 123008, 123008, 736, 2944, 0x4033b0a5 +0, 123744, 123744, 736, 2944, 0x101895ce +0, 124480, 124480, 736, 2944, 0xd6c6809f +0, 125216, 125216, 736, 2944, 0x197bda7e +0, 125952, 125952, 736, 2944, 0x96fb3e4b +0, 126688, 126688, 736, 2944, 0x12a6e3de +0, 127424, 127424, 736, 2944, 0xfb80e466 +0, 128160, 128160, 736, 2944, 0xedb8c2fc +0, 128896, 128896, 254, 1016, 0x30e56ca5 diff --git a/tests/ref/fate/roqvideo b/tests/ref/fate/roqvideo new file mode 100644 index 0000000000..9febedba0d --- /dev/null +++ b/tests/ref/fate/roqvideo @@ -0,0 +1,211 @@ +#tb 0: 1/30 +0, 0, 0, 1, 393216, 0x56995aac +0, 1, 1, 1, 393216, 0xf9ed5d6c +0, 2, 2, 1, 393216, 0xd3285d75 +0, 3, 3, 1, 393216, 0x82d15d62 +0, 4, 4, 1, 393216, 0x893e5d6f +0, 5, 5, 1, 393216, 0x82d15d62 +0, 6, 6, 1, 393216, 0x893e5d6f +0, 7, 7, 1, 393216, 0x82d15d62 +0, 8, 8, 1, 393216, 0x893e5d6f +0, 9, 9, 1, 393216, 0x82d15d62 +0, 10, 10, 1, 393216, 0x893e5d6f +0, 11, 11, 1, 393216, 0x82d15d62 +0, 12, 12, 1, 393216, 0x893e5d6f +0, 13, 13, 1, 393216, 0x82d15d62 +0, 14, 14, 1, 393216, 0x893e5d6f +0, 15, 15, 1, 393216, 0x82d15d62 +0, 16, 16, 1, 393216, 0x2ae39eca +0, 17, 17, 1, 393216, 0x9254be70 +0, 18, 18, 1, 393216, 0x4b2ed384 +0, 19, 19, 1, 393216, 0xbbd9d8f7 +0, 20, 20, 1, 393216, 0x1f2be0c3 +0, 21, 21, 1, 393216, 0x2434eb25 +0, 22, 22, 1, 393216, 0xa6cced4e +0, 23, 23, 1, 393216, 0xd116f38b +0, 24, 24, 1, 393216, 0x6b86f380 +0, 25, 25, 1, 393216, 0xc1b3f8e9 +0, 26, 26, 1, 393216, 0x2993fd5d +0, 27, 27, 1, 393216, 0xf489fe18 +0, 28, 28, 1, 393216, 0x9ef10501 +0, 29, 29, 1, 393216, 0x8faf0512 +0, 30, 30, 1, 393216, 0xa54d0736 +0, 31, 31, 1, 393216, 0xf4ef01e0 +0, 32, 32, 1, 393216, 0xe241ef51 +0, 33, 33, 1, 393216, 0xcc38e51f +0, 34, 34, 1, 393216, 0xb1345876 +0, 35, 35, 1, 393216, 0xf9b0968b +0, 36, 36, 1, 393216, 0x6bb1523f +0, 37, 37, 1, 393216, 0x83469a05 +0, 38, 38, 1, 393216, 0x73e30882 +0, 39, 39, 1, 393216, 0x8673da66 +0, 40, 40, 1, 393216, 0xb67596d3 +0, 41, 41, 1, 393216, 0xf7638710 +0, 42, 42, 1, 393216, 0x813a8f47 +0, 43, 43, 1, 393216, 0xb3526555 +0, 44, 44, 1, 393216, 0x1b167be3 +0, 45, 45, 1, 393216, 0x99114562 +0, 46, 46, 1, 393216, 0xfafb0693 +0, 47, 47, 1, 393216, 0x121d96c8 +0, 48, 48, 1, 393216, 0xb3c68c5d +0, 49, 49, 1, 393216, 0x2035b97f +0, 50, 50, 1, 393216, 0xfbcaeb62 +0, 51, 51, 1, 393216, 0xfd5aea5d +0, 52, 52, 1, 393216, 0x66efbddd +0, 53, 53, 1, 393216, 0xf1e17862 +0, 54, 54, 1, 393216, 0x27fa584d +0, 55, 55, 1, 393216, 0xe644ec5f +0, 56, 56, 1, 393216, 0x7e3067ba +0, 57, 57, 1, 393216, 0x1b6ba6fd +0, 58, 58, 1, 393216, 0x55bdba34 +0, 59, 59, 1, 393216, 0xc67db2e4 +0, 60, 60, 1, 393216, 0x359de8a2 +0, 61, 61, 1, 393216, 0x7b7a32ef +0, 62, 62, 1, 393216, 0xbe512a66 +0, 63, 63, 1, 393216, 0x681d82bf +0, 64, 64, 1, 393216, 0xa2320ec5 +0, 65, 65, 1, 393216, 0xcfbd9954 +0, 66, 66, 1, 393216, 0x7fee9854 +0, 67, 67, 1, 393216, 0x70eec155 +0, 68, 68, 1, 393216, 0x114f684e +0, 69, 69, 1, 393216, 0xe27f034f +0, 70, 70, 1, 393216, 0xfbbd89b4 +0, 71, 71, 1, 393216, 0xcef4c58a +0, 72, 72, 1, 393216, 0x9eea88e9 +0, 73, 73, 1, 393216, 0x911cea42 +0, 74, 74, 1, 393216, 0xec5727ea +0, 75, 75, 1, 393216, 0xda998c33 +0, 76, 76, 1, 393216, 0xc82140ed +0, 77, 77, 1, 393216, 0x4caa8591 +0, 78, 78, 1, 393216, 0x4944206c +0, 79, 79, 1, 393216, 0xd4676a94 +0, 80, 80, 1, 393216, 0x9e0340b3 +0, 81, 81, 1, 393216, 0xbdef7f94 +0, 82, 82, 1, 393216, 0xfac05cb0 +0, 83, 83, 1, 393216, 0xfef5a369 +0, 84, 84, 1, 393216, 0x9fcb3711 +0, 85, 85, 1, 393216, 0x6d93f761 +0, 86, 86, 1, 393216, 0xe95dc1ae +0, 87, 87, 1, 393216, 0x3e561557 +0, 88, 88, 1, 393216, 0x0fa7a049 +0, 89, 89, 1, 393216, 0xf16afb95 +0, 90, 90, 1, 393216, 0xe53a2064 +0, 91, 91, 1, 393216, 0x57f046a4 +0, 92, 92, 1, 393216, 0xf6f16a0c +0, 93, 93, 1, 393216, 0xcba0c8b0 +0, 94, 94, 1, 393216, 0x5bdbe522 +0, 95, 95, 1, 393216, 0x0fed0151 +0, 96, 96, 1, 393216, 0xbf86faf8 +0, 97, 97, 1, 393216, 0x39854c5f +0, 98, 98, 1, 393216, 0xd9b7760a +0, 99, 99, 1, 393216, 0x8edcc1d9 +0, 100, 100, 1, 393216, 0x44ae1435 +0, 101, 101, 1, 393216, 0xbc3d6d73 +0, 102, 102, 1, 393216, 0xedd82647 +0, 103, 103, 1, 393216, 0x1c2e5ce3 +0, 104, 104, 1, 393216, 0x04e29afe +0, 105, 105, 1, 393216, 0xb191578e +0, 106, 106, 1, 393216, 0x31d75a06 +0, 107, 107, 1, 393216, 0xfdb6c56e +0, 108, 108, 1, 393216, 0xf528f484 +0, 109, 109, 1, 393216, 0x87af758e +0, 110, 110, 1, 393216, 0xc8bdafb7 +0, 111, 111, 1, 393216, 0x573afe93 +0, 112, 112, 1, 393216, 0xb03cb8f5 +0, 113, 113, 1, 393216, 0x6e03ac71 +0, 114, 114, 1, 393216, 0xf919164e +0, 115, 115, 1, 393216, 0x80059f3c +0, 116, 116, 1, 393216, 0xf4ea0b1a +0, 117, 117, 1, 393216, 0xe7720ffb +0, 118, 118, 1, 393216, 0x1ec0cd56 +0, 119, 119, 1, 393216, 0x2bc8cf18 +0, 120, 120, 1, 393216, 0xe0bf17b5 +0, 121, 121, 1, 393216, 0x660247e1 +0, 122, 122, 1, 393216, 0xcf66f2a9 +0, 123, 123, 1, 393216, 0x5494d5ab +0, 124, 124, 1, 393216, 0x2c02f2c4 +0, 125, 125, 1, 393216, 0x93fa3783 +0, 126, 126, 1, 393216, 0x4cc50633 +0, 127, 127, 1, 393216, 0x3f179386 +0, 128, 128, 1, 393216, 0x2bca9e1b +0, 129, 129, 1, 393216, 0x3e4af867 +0, 130, 130, 1, 393216, 0x7e7df93c +0, 131, 131, 1, 393216, 0x577e4fb0 +0, 132, 132, 1, 393216, 0x34487f0a +0, 133, 133, 1, 393216, 0x0937bcfc +0, 134, 134, 1, 393216, 0xa9e75a5e +0, 135, 135, 1, 393216, 0xf7bc0c89 +0, 136, 136, 1, 393216, 0x06dacca6 +0, 137, 137, 1, 393216, 0x7baaa4bd +0, 138, 138, 1, 393216, 0x95477f5f +0, 139, 139, 1, 393216, 0x51117526 +0, 140, 140, 1, 393216, 0x69656d03 +0, 141, 141, 1, 393216, 0xcbd061bb +0, 142, 142, 1, 393216, 0x8d1d5be2 +0, 143, 143, 1, 393216, 0x43e55930 +0, 144, 144, 1, 393216, 0xb56f5872 +0, 145, 145, 1, 393216, 0x09a255e9 +0, 146, 146, 1, 393216, 0xcaaa5456 +0, 147, 147, 1, 393216, 0xd267501f +0, 148, 148, 1, 393216, 0x7bef4eca +0, 149, 149, 1, 393216, 0x9aa94af3 +0, 150, 150, 1, 393216, 0xd39d4a29 +0, 151, 151, 1, 393216, 0x7a754960 +0, 152, 152, 1, 393216, 0x3f004921 +0, 153, 153, 1, 393216, 0x0f784ca8 +0, 154, 154, 1, 393216, 0x2a062c70 +0, 155, 155, 1, 393216, 0x114ef770 +0, 156, 156, 1, 393216, 0xfb7673bf +0, 157, 157, 1, 393216, 0xbaea88f7 +0, 158, 158, 1, 393216, 0x6fdfe2ec +0, 159, 159, 1, 393216, 0xb7b2b398 +0, 160, 160, 1, 393216, 0x14ba127e +0, 161, 161, 1, 393216, 0x660b3041 +0, 162, 162, 1, 393216, 0xe3f3302a +0, 163, 163, 1, 393216, 0x34c7f1c9 +0, 164, 164, 1, 393216, 0xa8257bf4 +0, 165, 165, 1, 393216, 0xd63fc649 +0, 166, 166, 1, 393216, 0xf8e5b79c +0, 167, 167, 1, 393216, 0xa67b52ab +0, 168, 168, 1, 393216, 0xef8f9c74 +0, 169, 169, 1, 393216, 0x6d3aa6b6 +0, 170, 170, 1, 393216, 0x8c174ee6 +0, 171, 171, 1, 393216, 0x2dfbc524 +0, 172, 172, 1, 393216, 0x7d0808b6 +0, 173, 173, 1, 393216, 0x6cbdf6f5 +0, 174, 174, 1, 393216, 0xfe39bc53 +0, 175, 175, 1, 393216, 0xa3d869b0 +0, 176, 176, 1, 393216, 0x09f00057 +0, 177, 177, 1, 393216, 0x6ba56343 +0, 178, 178, 1, 393216, 0xb696ca3e +0, 179, 179, 1, 393216, 0x4eba0225 +0, 180, 180, 1, 393216, 0xdd45464b +0, 181, 181, 1, 393216, 0x2909a9ea +0, 182, 182, 1, 393216, 0x12aa3f85 +0, 183, 183, 1, 393216, 0x59421352 +0, 184, 184, 1, 393216, 0x57ea0313 +0, 185, 185, 1, 393216, 0x4e5f3a38 +0, 186, 186, 1, 393216, 0x55bc932d +0, 187, 187, 1, 393216, 0x666ee55d +0, 188, 188, 1, 393216, 0xb0f84a69 +0, 189, 189, 1, 393216, 0xad3ae63f +0, 190, 190, 1, 393216, 0x970fd47d +0, 191, 191, 1, 393216, 0x86c418e0 +0, 192, 192, 1, 393216, 0x52c9ce50 +0, 193, 193, 1, 393216, 0xd54c98c8 +0, 194, 194, 1, 393216, 0xb40e5fea +0, 195, 195, 1, 393216, 0x2aa74875 +0, 196, 196, 1, 393216, 0x305b251e +0, 197, 197, 1, 393216, 0xab8c0780 +0, 198, 198, 1, 393216, 0x0101dd0e +0, 199, 199, 1, 393216, 0x23739cab +0, 200, 200, 1, 393216, 0xf05196a0 +0, 201, 201, 1, 393216, 0x932d1e00 +0, 202, 202, 1, 393216, 0x932d1e00 +0, 203, 203, 1, 393216, 0x932d1e00 +0, 204, 204, 1, 393216, 0x932d1e00 +0, 205, 205, 1, 393216, 0x932d1e00 +0, 206, 206, 1, 393216, 0x932d1e00 +0, 207, 207, 1, 393216, 0x932d1e00 +0, 208, 208, 1, 393216, 0x932d1e00 +0, 209, 209, 1, 393216, 0x932d1e00 -- cgit v1.2.3 From 0982b0a431060039517b35af7eae14dbf1c2ce10 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 9 May 2012 06:35:13 +0200 Subject: lavr: make avresample_read() with NULL output discard samples. --- libavresample/avresample.h | 3 ++- libavresample/utils.c | 2 ++ libavresample/version.h | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libavresample/avresample.h b/libavresample/avresample.h index 7350805e41..65d4d2d6e2 100644 --- a/libavresample/avresample.h +++ b/libavresample/avresample.h @@ -274,7 +274,8 @@ int avresample_available(AVAudioResampleContext *avr); * @see avresample_convert() * * @param avr audio resample context - * @param output output data pointers + * @param output output data pointers. May be NULL, in which case + * nb_samples of data is discarded from output FIFO. * @param nb_samples number of samples to read from the FIFO * @return the number of samples written to output */ diff --git a/libavresample/utils.c b/libavresample/utils.c index f54dcc6ae6..e533760abc 100644 --- a/libavresample/utils.c +++ b/libavresample/utils.c @@ -385,6 +385,8 @@ int avresample_available(AVAudioResampleContext *avr) int avresample_read(AVAudioResampleContext *avr, void **output, int nb_samples) { + if (!output) + return av_audio_fifo_drain(avr->out_fifo, nb_samples); return av_audio_fifo_read(avr->out_fifo, output, nb_samples); } diff --git a/libavresample/version.h b/libavresample/version.h index 47504c9380..6211a56352 100644 --- a/libavresample/version.h +++ b/libavresample/version.h @@ -21,7 +21,7 @@ #define LIBAVRESAMPLE_VERSION_MAJOR 0 #define LIBAVRESAMPLE_VERSION_MINOR 0 -#define LIBAVRESAMPLE_VERSION_MICRO 1 +#define LIBAVRESAMPLE_VERSION_MICRO 2 #define LIBAVRESAMPLE_VERSION_INT AV_VERSION_INT(LIBAVRESAMPLE_VERSION_MAJOR, \ LIBAVRESAMPLE_VERSION_MINOR, \ -- cgit v1.2.3 From 9684341346fd5aad436325529cade47966c4731b Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 9 May 2012 06:36:29 +0200 Subject: lavr: do not try to copy to uninitialized output audio data. This would happen at least when lavr is used as a fifo with no conversion. --- libavresample/utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavresample/utils.c b/libavresample/utils.c index e533760abc..6d4509d7c1 100644 --- a/libavresample/utils.c +++ b/libavresample/utils.c @@ -375,7 +375,8 @@ int avresample_convert(AVAudioResampleContext *avr, void **output, } } - return handle_buffered_output(avr, &output_buffer, current_buffer); + return handle_buffered_output(avr, output ? &output_buffer : NULL, + current_buffer); } int avresample_available(AVAudioResampleContext *avr) -- cgit v1.2.3 From 142e740d1ecc6059556f2748a18757d399ee061f Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 6 May 2012 14:10:38 +0200 Subject: samplefmt: add a function for copying audio samples. --- libavutil/samplefmt.c | 19 +++++++++++++++++++ libavutil/samplefmt.h | 15 +++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/libavutil/samplefmt.c b/libavutil/samplefmt.c index 711afac287..4d94fa69be 100644 --- a/libavutil/samplefmt.c +++ b/libavutil/samplefmt.c @@ -185,3 +185,22 @@ int av_samples_alloc(uint8_t **audio_data, int *linesize, int nb_channels, } return 0; } + +int av_samples_copy(uint8_t **dst, uint8_t * const *src, int dst_offset, + int src_offset, int nb_samples, int nb_channels, + enum AVSampleFormat sample_fmt) +{ + int planar = av_sample_fmt_is_planar(sample_fmt); + int planes = planar ? nb_channels : 1; + int block_align = av_get_bytes_per_sample(sample_fmt) * (planar ? 1 : nb_channels); + int data_size = nb_samples * block_align; + int i; + + dst_offset *= block_align; + src_offset *= block_align; + + for (i = 0; i < planes; i++) + memcpy(dst[i] + dst_offset, src[i] + src_offset, data_size); + + return 0; +} diff --git a/libavutil/samplefmt.h b/libavutil/samplefmt.h index 1cb01a357f..9011889e68 100644 --- a/libavutil/samplefmt.h +++ b/libavutil/samplefmt.h @@ -194,4 +194,19 @@ int av_samples_fill_arrays(uint8_t **audio_data, int *linesize, int av_samples_alloc(uint8_t **audio_data, int *linesize, int nb_channels, int nb_samples, enum AVSampleFormat sample_fmt, int align); +/** + * Copy samples from src to dst. + * + * @param dst destination array of pointers to data planes + * @param src source array of pointers to data planes + * @param dst_offset offset in samples at which the data will be written to dst + * @param src_offset offset in samples at which the data will be read from src + * @param nb_samples number of samples to be copied + * @param nb_channels number of audio channels + * @param sample_fmt audio sample format + */ +int av_samples_copy(uint8_t **dst, uint8_t * const *src, int dst_offset, + int src_offset, int nb_samples, int nb_channels, + enum AVSampleFormat sample_fmt); + #endif /* AVUTIL_SAMPLEFMT_H */ -- cgit v1.2.3 From 6d7f61770094cc80ca2d93c4784c0091411d8242 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 8 May 2012 13:56:37 +0200 Subject: samplefmt: add a function for filling a buffer with silence. --- libavutil/samplefmt.c | 19 +++++++++++++++++++ libavutil/samplefmt.h | 12 ++++++++++++ 2 files changed, 31 insertions(+) diff --git a/libavutil/samplefmt.c b/libavutil/samplefmt.c index 4d94fa69be..b6e785cb67 100644 --- a/libavutil/samplefmt.c +++ b/libavutil/samplefmt.c @@ -204,3 +204,22 @@ int av_samples_copy(uint8_t **dst, uint8_t * const *src, int dst_offset, return 0; } + +int av_samples_set_silence(uint8_t **audio_data, int offset, int nb_samples, + int nb_channels, enum AVSampleFormat sample_fmt) +{ + int planar = av_sample_fmt_is_planar(sample_fmt); + int planes = planar ? nb_channels : 1; + int block_align = av_get_bytes_per_sample(sample_fmt) * (planar ? 1 : nb_channels); + int data_size = nb_samples * block_align; + int fill_char = (sample_fmt == AV_SAMPLE_FMT_U8 || + sample_fmt == AV_SAMPLE_FMT_U8P) ? 0x80 : 0x00; + int i; + + offset *= block_align; + + for (i = 0; i < planes; i++) + memset(audio_data[i] + offset, fill_char, data_size); + + return 0; +} diff --git a/libavutil/samplefmt.h b/libavutil/samplefmt.h index 9011889e68..e3aa6a9c36 100644 --- a/libavutil/samplefmt.h +++ b/libavutil/samplefmt.h @@ -209,4 +209,16 @@ int av_samples_copy(uint8_t **dst, uint8_t * const *src, int dst_offset, int src_offset, int nb_samples, int nb_channels, enum AVSampleFormat sample_fmt); +/** + * Fill an audio buffer with silence. + * + * @param audio_data array of pointers to data planes + * @param offset offset in samples at which to start filling + * @param nb_samples number of samples to fill + * @param nb_channels number of audio channels + * @param sample_fmt audio sample format + */ +int av_samples_set_silence(uint8_t **audio_data, int offset, int nb_samples, + int nb_channels, enum AVSampleFormat sample_fmt); + #endif /* AVUTIL_SAMPLEFMT_H */ -- cgit v1.2.3 From a5117a2444f3e636ff824ea467bc828d482c68fc Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 7 May 2012 13:55:03 +0200 Subject: lavc: pad last audio frame with silence when needed. --- avconv.c | 8 ------- doc/APIchanges | 6 +++++ libavcodec/avcodec.h | 10 +++----- libavcodec/internal.h | 6 +++++ libavcodec/utils.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++ libavcodec/version.h | 2 +- 6 files changed, 80 insertions(+), 16 deletions(-) diff --git a/avconv.c b/avconv.c index 33758c12b7..1aed70413b 100644 --- a/avconv.c +++ b/avconv.c @@ -2048,14 +2048,6 @@ static void flush_encoders(void) av_fifo_generic_read(ost->fifo, audio_buf, fifo_bytes, NULL); - /* pad last frame with silence if needed */ - if (!(enc->codec->capabilities & CODEC_CAP_SMALL_LAST_FRAME)) { - frame_bytes = enc->frame_size * enc->channels * - av_get_bytes_per_sample(enc->sample_fmt); - if (allocated_audio_buf_size < frame_bytes) - exit_program(1); - generate_silence(audio_buf+fifo_bytes, enc->sample_fmt, frame_bytes - fifo_bytes); - } encode_audio_frame(os, ost, audio_buf, frame_bytes); } else { /* flush encoder with NULL frames until it is done diff --git a/doc/APIchanges b/doc/APIchanges index 66a0786c68..b6b32f5398 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -13,6 +13,12 @@ libavutil: 2011-04-18 API changes, most recent first: +2012-xx-xx - xxxxxxx - lavc 54.13.1 + For audio formats with fixed frame size, the last frame + no longer needs to be padded with silence, libavcodec + will handle this internally (effectively all encoders + behave as if they had CODEC_CAP_SMALL_LAST_FRAME set). + 2012-xx-xx - xxxxxxx - lavc 54.13.0 - avcodec.h Add sample_rate and channel_layout fields to AVFrame. diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index bec13e7c1a..102df3a7a0 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3860,15 +3860,11 @@ int attribute_deprecated avcodec_encode_audio(AVCodecContext *avctx, * @param[in] frame AVFrame containing the raw audio data to be encoded. * May be NULL when flushing an encoder that has the * CODEC_CAP_DELAY capability set. - * There are 2 codec capabilities that affect the allowed - * values of frame->nb_samples. - * If CODEC_CAP_SMALL_LAST_FRAME is set, then only the final - * frame may be smaller than avctx->frame_size, and all other - * frames must be equal to avctx->frame_size. * If CODEC_CAP_VARIABLE_FRAME_SIZE is set, then each frame * can have any number of samples. - * If neither is set, frame->nb_samples must be equal to - * avctx->frame_size for all frames. + * If it is not set, frame->nb_samples must be equal to + * avctx->frame_size for all frames except the last. + * The final frame may be smaller than avctx->frame_size. * @param[out] got_packet_ptr This field is set to 1 by libavcodec if the * output packet is non-empty, and to 0 if it is * empty. If the function returns an error, the diff --git a/libavcodec/internal.h b/libavcodec/internal.h index bedb2ed85d..57d551d850 100644 --- a/libavcodec/internal.h +++ b/libavcodec/internal.h @@ -70,6 +70,12 @@ typedef struct AVCodecInternal { */ int sample_count; #endif + + /** + * An audio frame with less than required samples has been submitted and + * padded with silence. Reject all subsequent frames. + */ + int last_audio_frame; } AVCodecInternal; struct AVCodecDefault { diff --git a/libavcodec/utils.c b/libavcodec/utils.c index ca386646c3..9631c99899 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -857,11 +857,58 @@ int ff_alloc_packet(AVPacket *avpkt, int size) } } +/** + * Pad last frame with silence. + */ +static int pad_last_frame(AVCodecContext *s, AVFrame **dst, const AVFrame *src) +{ + AVFrame *frame = NULL; + uint8_t *buf = NULL; + int ret; + + if (!(frame = avcodec_alloc_frame())) + return AVERROR(ENOMEM); + *frame = *src; + + if ((ret = av_samples_get_buffer_size(&frame->linesize[0], s->channels, + s->frame_size, s->sample_fmt, 0)) < 0) + goto fail; + + if (!(buf = av_malloc(ret))) { + ret = AVERROR(ENOMEM); + goto fail; + } + + frame->nb_samples = s->frame_size; + if ((ret = avcodec_fill_audio_frame(frame, s->channels, s->sample_fmt, + buf, ret, 0)) < 0) + goto fail; + if ((ret = av_samples_copy(frame->extended_data, src->extended_data, 0, 0, + src->nb_samples, s->channels, s->sample_fmt)) < 0) + goto fail; + if ((ret = av_samples_set_silence(frame->extended_data, src->nb_samples, + frame->nb_samples - src->nb_samples, + s->channels, s->sample_fmt)) < 0) + goto fail; + + *dst = frame; + + return 0; + +fail: + if (frame->extended_data != frame->data) + av_freep(&frame->extended_data); + av_freep(&buf); + av_freep(&frame); + return ret; +} + int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr) { + AVFrame *padded_frame = NULL; int ret; int user_packet = !!avpkt->data; @@ -879,6 +926,16 @@ int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx, if (frame->nb_samples > avctx->frame_size) return AVERROR(EINVAL); } else if (!(avctx->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE)) { + if (frame->nb_samples < avctx->frame_size && + !avctx->internal->last_audio_frame) { + ret = pad_last_frame(avctx, &padded_frame, frame); + if (ret < 0) + return ret; + + frame = padded_frame; + avctx->internal->last_audio_frame = 1; + } + if (frame->nb_samples != avctx->frame_size) return AVERROR(EINVAL); } @@ -919,6 +976,13 @@ int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx, here to simplify things */ avpkt->flags |= AV_PKT_FLAG_KEY; + if (padded_frame) { + av_freep(&padded_frame->data[0]); + if (padded_frame->extended_data != padded_frame->data) + av_freep(&padded_frame->extended_data); + av_freep(&padded_frame); + } + return ret; } diff --git a/libavcodec/version.h b/libavcodec/version.h index be39f4ffca..da7796abb0 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -28,7 +28,7 @@ #define LIBAVCODEC_VERSION_MAJOR 54 #define LIBAVCODEC_VERSION_MINOR 13 -#define LIBAVCODEC_VERSION_MICRO 0 +#define LIBAVCODEC_VERSION_MICRO 1 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \ -- cgit v1.2.3 From c22953b8a3abc1ddd02e2f468845dc2bf0e45253 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 7 May 2012 16:56:20 +0200 Subject: lavc: check that extended_data is properly set in avcodec_encode_audio2(). --- libavcodec/utils.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 9631c99899..9ec4a9e848 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -908,6 +908,7 @@ int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx, const AVFrame *frame, int *got_packet_ptr) { + AVFrame tmp; AVFrame *padded_frame = NULL; int ret; int user_packet = !!avpkt->data; @@ -920,6 +921,22 @@ int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx, return 0; } + /* ensure that extended_data is properly set */ + if (frame && !frame->extended_data) { + if (av_sample_fmt_is_planar(avctx->sample_fmt) && + avctx->channels > AV_NUM_DATA_POINTERS) { + av_log(avctx, AV_LOG_ERROR, "Encoding to a planar sample format, " + "with more than %d channels, but extended_data is not set.\n", + AV_NUM_DATA_POINTERS); + return AVERROR(EINVAL); + } + av_log(avctx, AV_LOG_WARNING, "extended_data is not set.\n"); + + tmp = *frame; + tmp.extended_data = tmp.data; + frame = &tmp; + } + /* check for valid frame size */ if (frame) { if (avctx->codec->capabilities & CODEC_CAP_SMALL_LAST_FRAME) { -- cgit v1.2.3 From 9453c9e1dec6ba44a6bedbfc02b72433e89c03dd Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 16 Apr 2012 14:01:26 +0200 Subject: lavfi: add extended_data to AVFilterBuffer. This is similar to what has previously been done in AVFrame to allow dealing with more than 8 channels. --- libavfilter/avfilter.c | 33 +++++++++++++++++++++++++++++++++ libavfilter/avfilter.h | 32 ++++++++++++++++++++++++++++++++ libavfilter/defaults.c | 2 ++ 3 files changed, 67 insertions(+) diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index f12ca3a097..5973e6b248 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -57,6 +57,7 @@ AVFilterBufferRef *avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask) return NULL; } *ret->video = *ref->video; + ret->extended_data = ret->data; } else if (ref->type == AVMEDIA_TYPE_AUDIO) { ret->audio = av_malloc(sizeof(AVFilterBufferRefAudioProps)); if (!ret->audio) { @@ -64,6 +65,19 @@ AVFilterBufferRef *avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask) return NULL; } *ret->audio = *ref->audio; + + if (ref->extended_data != ref->data) { + int nb_channels = av_get_channel_layout_nb_channels(ref->audio->channel_layout); + if (!(ret->extended_data = av_malloc(sizeof(*ret->extended_data) * + nb_channels))) { + av_freep(&ret->audio); + av_freep(&ret); + return NULL; + } + memcpy(ret->extended_data, ref->extended_data, + sizeof(*ret->extended_data) * nb_channels); + } else + ret->extended_data = ret->data; } ret->perms &= pmask; ret->buf->refcount ++; @@ -76,6 +90,8 @@ void avfilter_unref_buffer(AVFilterBufferRef *ref) return; if (!(--ref->buf->refcount)) ref->buf->free(ref->buf); + if (ref->extended_data != ref->data) + av_freep(&ref->extended_data); av_free(ref->video); av_free(ref->audio); av_free(ref); @@ -338,6 +354,9 @@ avfilter_get_video_buffer_ref_from_arrays(uint8_t *data[4], int linesize[4], int memcpy(picref->data, pic->data, sizeof(picref->data)); memcpy(picref->linesize, pic->linesize, sizeof(picref->linesize)); + pic-> extended_data = pic->data; + picref->extended_data = picref->data; + return picref; fail: @@ -710,6 +729,8 @@ int avfilter_copy_frame_props(AVFilterBufferRef *dst, const AVFrame *src) int avfilter_copy_buf_props(AVFrame *dst, const AVFilterBufferRef *src) { + int planes, nb_channels; + memcpy(dst->data, src->data, sizeof(dst->data)); memcpy(dst->linesize, src->linesize, sizeof(dst->linesize)); @@ -727,6 +748,18 @@ int avfilter_copy_buf_props(AVFrame *dst, const AVFilterBufferRef *src) dst->pict_type = src->video->pict_type; break; case AVMEDIA_TYPE_AUDIO: + nb_channels = av_get_channel_layout_nb_channels(src->audio->channel_layout); + planes = av_sample_fmt_is_planar(src->format) ? nb_channels : 1; + + if (planes > FF_ARRAY_ELEMS(dst->data)) { + dst->extended_data = av_mallocz(planes * sizeof(*dst->extended_data)); + if (!dst->extended_data) + return AVERROR(ENOMEM); + memcpy(dst->extended_data, src->extended_data, + planes * sizeof(dst->extended_data)); + } else + dst->extended_data = dst->data; + dst->sample_rate = src->audio->sample_rate; dst->channel_layout = src->audio->channel_layout; dst->nb_samples = src->audio->nb_samples; diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index ef61a5da6a..8965094b19 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -76,6 +76,22 @@ typedef struct AVFilterBuffer { int format; ///< media format int w, h; ///< width and height of the allocated buffer + + /** + * pointers to the data planes/channels. + * + * For video, this should simply point to data[]. + * + * For planar audio, each channel has a separate data pointer, and + * linesize[0] contains the size of each channel buffer. + * For packed audio, there is just one data pointer, and linesize[0] + * contains the total size of the buffer for all channels. + * + * Note: Both data and extended_data will always be set, but for planar + * audio with more channels that can fit in data, extended_data must be used + * in order to access all channels. + */ + uint8_t **extended_data; } AVFilterBuffer; #define AV_PERM_READ 0x01 ///< can read from the buffer @@ -140,6 +156,22 @@ typedef struct AVFilterBufferRef { enum AVMediaType type; ///< media type of buffer data AVFilterBufferRefVideoProps *video; ///< video buffer specific properties AVFilterBufferRefAudioProps *audio; ///< audio buffer specific properties + + /** + * pointers to the data planes/channels. + * + * For video, this should simply point to data[]. + * + * For planar audio, each channel has a separate data pointer, and + * linesize[0] contains the size of each channel buffer. + * For packed audio, there is just one data pointer, and linesize[0] + * contains the total size of the buffer for all channels. + * + * Note: Both data and extended_data will always be set, but for planar + * audio with more channels that can fit in data, extended_data must be used + * in order to access all channels. + */ + uint8_t **extended_data; } AVFilterBufferRef; /** diff --git a/libavfilter/defaults.c b/libavfilter/defaults.c index 6d9003de37..086fcc0b4c 100644 --- a/libavfilter/defaults.c +++ b/libavfilter/defaults.c @@ -28,6 +28,8 @@ /* TODO: buffer pool. see comment for avfilter_default_get_video_buffer() */ void ff_avfilter_default_free_buffer(AVFilterBuffer *ptr) { + if (ptr->extended_data != ptr->data) + av_freep(&ptr->extended_data); av_free(ptr->data[0]); av_free(ptr); } -- cgit v1.2.3 From 1b8c9271bde8c502fe9829795f8ef96bceb7205e Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Mon, 31 Jan 2011 00:07:41 +0100 Subject: lavfi: add avfilter_get_audio_buffer_ref_from_arrays(). Signed-off-by: Anton Khirnov --- libavfilter/avfilter.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++ libavfilter/avfilter.h | 18 +++++++++++++ 2 files changed, 86 insertions(+) diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 5973e6b248..e535bdab64 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -385,6 +385,74 @@ AVFilterBufferRef *avfilter_get_audio_buffer(AVFilterLink *link, int perms, return ret; } +AVFilterBufferRef *avfilter_get_audio_buffer_ref_from_arrays(uint8_t **data, + int linesize, int perms, + int nb_samples, + enum AVSampleFormat sample_fmt, + uint64_t channel_layout) +{ + int planes; + AVFilterBuffer *samples = av_mallocz(sizeof(*samples)); + AVFilterBufferRef *samplesref = av_mallocz(sizeof(*samplesref)); + + if (!samples || !samplesref) + goto fail; + + samplesref->buf = samples; + samplesref->buf->free = ff_avfilter_default_free_buffer; + if (!(samplesref->audio = av_mallocz(sizeof(*samplesref->audio)))) + goto fail; + + samplesref->audio->nb_samples = nb_samples; + samplesref->audio->channel_layout = channel_layout; + samplesref->audio->planar = av_sample_fmt_is_planar(sample_fmt); + + planes = samplesref->audio->planar ? av_get_channel_layout_nb_channels(channel_layout) : 1; + + /* make sure the buffer gets read permission or it's useless for output */ + samplesref->perms = perms | AV_PERM_READ; + + samples->refcount = 1; + samplesref->type = AVMEDIA_TYPE_AUDIO; + samplesref->format = sample_fmt; + + memcpy(samples->data, data, + FFMIN(FF_ARRAY_ELEMS(samples->data), planes)*sizeof(samples->data[0])); + memcpy(samplesref->data, samples->data, sizeof(samples->data)); + + samples->linesize[0] = samplesref->linesize[0] = linesize; + + if (planes > FF_ARRAY_ELEMS(samples->data)) { + samples-> extended_data = av_mallocz(sizeof(*samples->extended_data) * + planes); + samplesref->extended_data = av_mallocz(sizeof(*samplesref->extended_data) * + planes); + + if (!samples->extended_data || !samplesref->extended_data) + goto fail; + + memcpy(samples-> extended_data, data, sizeof(*data)*planes); + memcpy(samplesref->extended_data, data, sizeof(*data)*planes); + } else { + samples->extended_data = samples->data; + samplesref->extended_data = samplesref->data; + } + + return samplesref; + +fail: + if (samples && samples->extended_data != samples->data) + av_freep(&samples->extended_data); + if (samplesref) { + av_freep(&samplesref->audio); + if (samplesref->extended_data != samplesref->data) + av_freep(&samplesref->extended_data); + } + av_freep(&samplesref); + av_freep(&samples); + return NULL; +} + int avfilter_request_frame(AVFilterLink *link) { FF_DPRINTF_START(NULL, request_frame); ff_dlog_link(NULL, link, 1); diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index 8965094b19..6555744f12 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -700,6 +700,24 @@ AVFilterBufferRef *avfilter_get_audio_buffer(AVFilterLink *link, int perms, enum AVSampleFormat sample_fmt, int size, uint64_t channel_layout, int planar); +/** + * Create an audio buffer reference wrapped around an already + * allocated samples buffer. + * + * @param data pointers to the samples plane buffers + * @param linesize linesize for the samples plane buffers + * @param perms the required access permissions + * @param nb_samples number of samples per channel + * @param sample_fmt the format of each sample in the buffer to allocate + * @param channel_layout the channel layout of the buffer + */ +AVFilterBufferRef *avfilter_get_audio_buffer_ref_from_arrays(uint8_t **data, + int linesize, + int perms, + int nb_samples, + enum AVSampleFormat sample_fmt, + uint64_t channel_layout); + /** * Request an input frame from the filter at the other end of the link. * -- cgit v1.2.3 From 7ac4bde22aa50fe059cebacfcbd513f42ceb3dda Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Thu, 26 Apr 2012 14:55:37 +0200 Subject: fate: Give more consistent names to some RealVideo/RealAudio tests. --- tests/fate/real.mak | 8 +- tests/ref/fate/ra-144 | 1 + tests/ref/fate/real-14_4 | 1 - tests/ref/fate/real-rv40 | 240 ----------------------------------------------- tests/ref/fate/rv40 | 240 +++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 245 insertions(+), 245 deletions(-) create mode 100644 tests/ref/fate/ra-144 delete mode 100644 tests/ref/fate/real-14_4 delete mode 100644 tests/ref/fate/real-rv40 create mode 100644 tests/ref/fate/rv40 diff --git a/tests/fate/real.mak b/tests/fate/real.mak index fdfdcd1460..7893e2f82f 100644 --- a/tests/fate/real.mak +++ b/tests/fate/real.mak @@ -1,5 +1,5 @@ -FATE_AVCONV += fate-real-14_4 -fate-real-14_4: CMD = md5 -i $(SAMPLES)/real/ra3_in_rm_file.rm -f s16le +FATE_AVCONV += fate-ra-144 +fate-ra-144: CMD = md5 -i $(SAMPLES)/real/ra3_in_rm_file.rm -f s16le FATE_AVCONV += fate-ra-288 fate-ra-288: CMD = pcm -i $(SAMPLES)/real/ra_288.rm @@ -18,8 +18,8 @@ fate-ralf: CMD = md5 -i $(SAMPLES)/lossless-audio/luckynight-partial.rmvb -vn -f FATE_AVCONV += fate-rv30 fate-rv30: CMD = framecrc -flags +bitexact -dct fastint -idct simple -i $(SAMPLES)/real/rv30.rm -an -FATE_AVCONV += fate-real-rv40 -fate-real-rv40: CMD = framecrc -i $(SAMPLES)/real/spygames-2MB.rmvb -t 10 -an -vsync 0 +FATE_AVCONV += fate-rv40 +fate-rv40: CMD = framecrc -i $(SAMPLES)/real/spygames-2MB.rmvb -t 10 -an -vsync 0 FATE_SIPR += fate-sipr-5k0 fate-sipr-5k0: CMD = pcm -i $(SAMPLES)/sipr/sipr_5k0.rm diff --git a/tests/ref/fate/ra-144 b/tests/ref/fate/ra-144 new file mode 100644 index 0000000000..4710566d1a --- /dev/null +++ b/tests/ref/fate/ra-144 @@ -0,0 +1 @@ +2da17ae831ea415592c7e6828e3fb69a diff --git a/tests/ref/fate/real-14_4 b/tests/ref/fate/real-14_4 deleted file mode 100644 index 4710566d1a..0000000000 --- a/tests/ref/fate/real-14_4 +++ /dev/null @@ -1 +0,0 @@ -2da17ae831ea415592c7e6828e3fb69a diff --git a/tests/ref/fate/real-rv40 b/tests/ref/fate/real-rv40 deleted file mode 100644 index d5cb265a00..0000000000 --- a/tests/ref/fate/real-rv40 +++ /dev/null @@ -1,240 +0,0 @@ -#tb 0: 1/1000 -0, -41, -41, 0, 276480, 0x5f7a0d4f -0, 42, 42, 0, 276480, 0x5f7a0d4f -0, 83, 83, 0, 276480, 0x5f7a0d4f -0, 125, 125, 0, 276480, 0x5f7a0d4f -0, 167, 167, 0, 276480, 0x5f7a0d4f -0, 209, 209, 0, 276480, 0x5f7a0d4f -0, 250, 250, 0, 276480, 0x5f7a0d4f -0, 292, 292, 0, 276480, 0x5f7a0d4f -0, 334, 334, 0, 276480, 0x5f7a0d4f -0, 375, 375, 0, 276480, 0x5f7a0d4f -0, 417, 417, 0, 276480, 0x5f7a0d4f -0, 459, 459, 0, 276480, 0x5f7a0d4f -0, 501, 501, 0, 276480, 0x5f7a0d4f -0, 542, 542, 0, 276480, 0x5f7a0d4f -0, 584, 584, 0, 276480, 0x5f7a0d4f -0, 626, 626, 0, 276480, 0x5f7a0d4f -0, 667, 667, 0, 276480, 0x5f7a0d4f -0, 709, 709, 0, 276480, 0x5f7a0d4f -0, 751, 751, 0, 276480, 0x5f7a0d4f -0, 792, 792, 0, 276480, 0x5f7a0d4f -0, 834, 834, 0, 276480, 0x5f7a0d4f -0, 876, 876, 0, 276480, 0x5f7a0d4f -0, 918, 918, 0, 276480, 0x5f7a0d4f -0, 959, 959, 0, 276480, 0x5f7a0d4f -0, 1001, 1001, 0, 276480, 0x5f7a0d4f -0, 1043, 1043, 0, 276480, 0x5f7a0d4f -0, 1084, 1084, 0, 276480, 0x5f7a0d4f -0, 1126, 1126, 0, 276480, 0x5f7a0d4f -0, 1168, 1168, 0, 276480, 0x5f7a0d4f -0, 1210, 1210, 0, 276480, 0x5f7a0d4f -0, 1251, 1251, 0, 276480, 0x5f7a0d4f -0, 1293, 1293, 0, 276480, 0x5f7a0d4f -0, 1335, 1335, 0, 276480, 0x5f7a0d4f -0, 1376, 1376, 0, 276480, 0x75641594 -0, 1418, 1418, 0, 276480, 0x32ee3526 -0, 1460, 1460, 0, 276480, 0xcb53479a -0, 1502, 1502, 0, 276480, 0x7ca9658e -0, 1543, 1543, 0, 276480, 0x5ce39368 -0, 1585, 1585, 0, 276480, 0x4ec1e418 -0, 1627, 1627, 0, 276480, 0xb3790499 -0, 1668, 1668, 0, 276480, 0xa9f1506f -0, 1710, 1710, 0, 276480, 0x85cbc3b5 -0, 1752, 1752, 0, 276480, 0x377c7b46 -0, 1793, 1793, 0, 276480, 0x1a61d8db -0, 1835, 1835, 0, 276480, 0xe1de7f0a -0, 1877, 1877, 0, 276480, 0x756a4a2e -0, 1919, 1919, 0, 276480, 0xcb379547 -0, 1960, 1960, 0, 276480, 0xbae14484 -0, 2002, 2002, 0, 276480, 0x8e12331c -0, 2044, 2044, 0, 276480, 0x99c085be -0, 2085, 2085, 0, 276480, 0xe479ffed -0, 2127, 2127, 0, 276480, 0x99c82949 -0, 2169, 2169, 0, 276480, 0xac7672dd -0, 2211, 2211, 0, 276480, 0x1e4fae19 -0, 2252, 2252, 0, 276480, 0x776412ef -0, 2294, 2294, 0, 276480, 0x7d9b579f -0, 2336, 2336, 0, 276480, 0x1cd1ab29 -0, 2377, 2377, 0, 276480, 0x58ce0f38 -0, 2419, 2419, 0, 276480, 0x5ab69b27 -0, 2461, 2461, 0, 276480, 0x0afad610 -0, 2503, 2503, 0, 276480, 0x9eca3f11 -0, 2544, 2544, 0, 276480, 0xc3db9706 -0, 2586, 2586, 0, 276480, 0xc9c57884 -0, 2628, 2628, 0, 276480, 0xd9fbb2cf -0, 2669, 2669, 0, 276480, 0xdc07f3c9 -0, 2711, 2711, 0, 276480, 0x000b5269 -0, 2753, 2753, 0, 276480, 0x27ff7a5d -0, 2794, 2794, 0, 276480, 0xd92e2017 -0, 2836, 2836, 0, 276480, 0x18d4b27d -0, 2878, 2878, 0, 276480, 0x70647530 -0, 2920, 2920, 0, 276480, 0x97612c4b -0, 2961, 2961, 0, 276480, 0xc9d4ac78 -0, 3003, 3003, 0, 276480, 0x4ec4d57f -0, 3045, 3045, 0, 276480, 0xdf4e04d7 -0, 3086, 3086, 0, 276480, 0xbd98f57c -0, 3128, 3128, 0, 276480, 0x7247ea3e -0, 3170, 3170, 0, 276480, 0xa5d670ec -0, 3212, 3212, 0, 276480, 0x5163b29b -0, 3253, 3253, 0, 276480, 0x99170e64 -0, 3295, 3295, 0, 276480, 0x37f4c0b0 -0, 3337, 3337, 0, 276480, 0x7a4f2561 -0, 3378, 3378, 0, 276480, 0x8a4e991f -0, 3420, 3420, 0, 276480, 0x6a45425f -0, 3462, 3462, 0, 276480, 0x1f0e2bb6 -0, 3504, 3504, 0, 276480, 0xd75482c6 -0, 3545, 3545, 0, 276480, 0x7bf6b1ef -0, 3587, 3587, 0, 276480, 0x6de1e34b -0, 3629, 3629, 0, 276480, 0x4526c89b -0, 3670, 3670, 0, 276480, 0xf964e18e -0, 3712, 3712, 0, 276480, 0xdcaaa99a -0, 3754, 3754, 0, 276480, 0xd1e98808 -0, 3795, 3795, 0, 276480, 0x556b2365 -0, 3837, 3837, 0, 276480, 0x0cf65540 -0, 3879, 3879, 0, 276480, 0x6e2d524e -0, 3921, 3921, 0, 276480, 0x22c50a3d -0, 3962, 3962, 0, 276480, 0x293f19af -0, 4004, 4004, 0, 276480, 0xf4b1c461 -0, 4046, 4046, 0, 276480, 0x62b76407 -0, 4087, 4087, 0, 276480, 0x51e9b3eb -0, 4129, 4129, 0, 276480, 0x7b910bc7 -0, 4171, 4171, 0, 276480, 0x6dd14ca6 -0, 4213, 4213, 0, 276480, 0x441f7afd -0, 4254, 4254, 0, 276480, 0xfb01efc6 -0, 4296, 4296, 0, 276480, 0x4f73ccea -0, 4338, 4338, 0, 276480, 0x5ac8e06f -0, 4379, 4379, 0, 276480, 0x294bb441 -0, 4421, 4421, 0, 276480, 0xe04ac45e -0, 4463, 4463, 0, 276480, 0xa7a38d41 -0, 4505, 4505, 0, 276480, 0xf688a3ed -0, 4546, 4546, 0, 276480, 0x58f275ea -0, 4588, 4588, 0, 276480, 0xf0b3b71b -0, 4630, 4630, 0, 276480, 0x3ce773bf -0, 4671, 4671, 0, 276480, 0x01840548 -0, 4713, 4713, 0, 276480, 0x674e34e4 -0, 4755, 4755, 0, 276480, 0x41dda2d9 -0, 4796, 4796, 0, 276480, 0xc5b60838 -0, 4838, 4838, 0, 276480, 0x9b209f41 -0, 4880, 4880, 0, 276480, 0xf46ba7fb -0, 4922, 4922, 0, 276480, 0x28b54815 -0, 4963, 4963, 0, 276480, 0xb605a933 -0, 5005, 5005, 0, 276480, 0x34484aff -0, 5047, 5047, 0, 276480, 0xaf2b5d89 -0, 5088, 5088, 0, 276480, 0x8facba58 -0, 5130, 5130, 0, 276480, 0xbbe3e99f -0, 5172, 5172, 0, 276480, 0x02162c7c -0, 5214, 5214, 0, 276480, 0x28a63236 -0, 5255, 5255, 0, 276480, 0x1ad43fd7 -0, 5297, 5297, 0, 276480, 0xe37883e5 -0, 5339, 5339, 0, 276480, 0x2b8a89c5 -0, 5380, 5380, 0, 276480, 0x71507bd2 -0, 5422, 5422, 0, 276480, 0x35626022 -0, 5464, 5464, 0, 276480, 0x461fc3e7 -0, 5506, 5506, 0, 276480, 0xce5af1ec -0, 5547, 5547, 0, 276480, 0x7c1139b3 -0, 5589, 5589, 0, 276480, 0x7fd73a99 -0, 5631, 5631, 0, 276480, 0x4ae4c3a6 -0, 5672, 5672, 0, 276480, 0xcb60725a -0, 5714, 5714, 0, 276480, 0xb52e1aa2 -0, 5756, 5756, 0, 276480, 0xd6f82cae -0, 5797, 5797, 0, 276480, 0x6310e665 -0, 5839, 5839, 0, 276480, 0xfa88a483 -0, 5881, 5881, 0, 276480, 0xf88f75d4 -0, 5923, 5923, 0, 276480, 0x04a8e3ee -0, 5964, 5964, 0, 276480, 0x54766a12 -0, 6006, 6006, 0, 276480, 0x0b41f0d7 -0, 6048, 6048, 0, 276480, 0xa29f5b01 -0, 6089, 6089, 0, 276480, 0x754ceaf5 -0, 6131, 6131, 0, 276480, 0x150c0423 -0, 6173, 6173, 0, 276480, 0xde084059 -0, 6215, 6215, 0, 276480, 0x5a38b4af -0, 6256, 6256, 0, 276480, 0xfcebc261 -0, 6298, 6298, 0, 276480, 0x0eb9770d -0, 6340, 6340, 0, 276480, 0x046394ae -0, 6381, 6381, 0, 276480, 0x3d3ca985 -0, 6423, 6423, 0, 276480, 0x94a03c75 -0, 6465, 6465, 0, 276480, 0x800eea2d -0, 6507, 6507, 0, 276480, 0x6a841f41 -0, 6548, 6548, 0, 276480, 0x2f98911c -0, 6590, 6590, 0, 276480, 0x923b9937 -0, 6632, 6632, 0, 276480, 0xe82f8e0f -0, 6673, 6673, 0, 276480, 0xee82d657 -0, 6715, 6715, 0, 276480, 0xefab7ffd -0, 6757, 6757, 0, 276480, 0x6b9fbc80 -0, 6798, 6798, 0, 276480, 0x4a1ada47 -0, 6840, 6840, 0, 276480, 0x6d4b49d7 -0, 6882, 6882, 0, 276480, 0xe4bdbd1e -0, 6924, 6924, 0, 276480, 0x225a56c0 -0, 6965, 6965, 0, 276480, 0xd4adadad -0, 7007, 7007, 0, 276480, 0xff4e1a8c -0, 7049, 7049, 0, 276480, 0xf58b1b7c -0, 7090, 7090, 0, 276480, 0xbaffcdcc -0, 7132, 7132, 0, 276480, 0x374f88f0 -0, 7174, 7174, 0, 276480, 0x3d861ae6 -0, 7216, 7216, 0, 276480, 0xeb6eb88f -0, 7257, 7257, 0, 276480, 0xdb753d35 -0, 7299, 7299, 0, 276480, 0x9aa543af -0, 7341, 7341, 0, 276480, 0xb24c8016 -0, 7382, 7382, 0, 276480, 0xea80a82e -0, 7424, 7424, 0, 276480, 0x2aae902a -0, 7466, 7466, 0, 276480, 0x5bba3cfb -0, 7508, 7508, 0, 276480, 0x5c6e97a9 -0, 7549, 7549, 0, 276480, 0x9b9ee961 -0, 7591, 7591, 0, 276480, 0xaa12b6fd -0, 7633, 7633, 0, 276480, 0xe9d2439f -0, 7674, 7674, 0, 276480, 0xbf09053c -0, 7716, 7716, 0, 276480, 0x50c31e73 -0, 7758, 7758, 0, 276480, 0xdd9fb89f -0, 7799, 7799, 0, 276480, 0x3e4e5aec -0, 7841, 7841, 0, 276480, 0x0b752d28 -0, 7883, 7883, 0, 276480, 0xaf82399a -0, 7925, 7925, 0, 276480, 0x7ce5f23c -0, 7966, 7966, 0, 276480, 0xad135d0f -0, 8008, 8008, 0, 276480, 0x55dadd30 -0, 8050, 8050, 0, 276480, 0x5aaa7519 -0, 8091, 8091, 0, 276480, 0xe45a5599 -0, 8133, 8133, 0, 276480, 0xc8e89913 -0, 8175, 8175, 0, 276480, 0x2f447fd3 -0, 8217, 8217, 0, 276480, 0x704411fb -0, 8258, 8258, 0, 276480, 0x9d7430a1 -0, 8300, 8300, 0, 276480, 0x24dd5fd3 -0, 8342, 8342, 0, 276480, 0x51cb657c -0, 8383, 8383, 0, 276480, 0x2c230702 -0, 8425, 8425, 0, 276480, 0x4a4f76cd -0, 8467, 8467, 0, 276480, 0xdcd71e88 -0, 8509, 8509, 0, 276480, 0x87160f99 -0, 8550, 8550, 0, 276480, 0x27f54854 -0, 8592, 8592, 0, 276480, 0x694d76e3 -0, 8634, 8634, 0, 276480, 0xcbe93c19 -0, 8675, 8675, 0, 276480, 0x50742e1b -0, 8717, 8717, 0, 276480, 0x525463e2 -0, 8759, 8759, 0, 276480, 0x819898f9 -0, 8800, 8800, 0, 276480, 0x08fac755 -0, 8842, 8842, 0, 276480, 0x35c46927 -0, 8884, 8884, 0, 276480, 0xeeed00fc -0, 8926, 8926, 0, 276480, 0xb6f99ee3 -0, 8967, 8967, 0, 276480, 0xd87f4c73 -0, 9009, 9009, 0, 276480, 0xde97d9fd -0, 9051, 9051, 0, 276480, 0xefc83107 -0, 9092, 9092, 0, 276480, 0xbb22e024 -0, 9134, 9134, 0, 276480, 0x53a7cfcb -0, 9176, 9176, 0, 276480, 0xbe1fbb19 -0, 9218, 9218, 0, 276480, 0x300f922a -0, 9259, 9259, 0, 276480, 0x826fc3bd -0, 9301, 9301, 0, 276480, 0x679aa57a -0, 9343, 9343, 0, 276480, 0x5497097b -0, 9384, 9384, 0, 276480, 0x679a53f8 -0, 9426, 9426, 0, 276480, 0x976c9e93 -0, 9468, 9468, 0, 276480, 0xe80f87f2 -0, 9510, 9510, 0, 276480, 0xdc2d7c6c -0, 9551, 9551, 0, 276480, 0xb194656e -0, 9593, 9593, 0, 276480, 0xf002c5ca -0, 9635, 9635, 0, 276480, 0x43fc1c64 -0, 9676, 9676, 0, 276480, 0xf62d8581 -0, 9718, 9718, 0, 276480, 0xb243dda5 -0, 9760, 9760, 0, 276480, 0x1700efbb -0, 9801, 9801, 0, 276480, 0x9ebe6ba2 -0, 9843, 9843, 0, 276480, 0x8f316c66 -0, 9885, 9885, 0, 276480, 0x6348ecf5 -0, 9927, 9927, 0, 276480, 0x34b5b78a diff --git a/tests/ref/fate/rv40 b/tests/ref/fate/rv40 new file mode 100644 index 0000000000..d5cb265a00 --- /dev/null +++ b/tests/ref/fate/rv40 @@ -0,0 +1,240 @@ +#tb 0: 1/1000 +0, -41, -41, 0, 276480, 0x5f7a0d4f +0, 42, 42, 0, 276480, 0x5f7a0d4f +0, 83, 83, 0, 276480, 0x5f7a0d4f +0, 125, 125, 0, 276480, 0x5f7a0d4f +0, 167, 167, 0, 276480, 0x5f7a0d4f +0, 209, 209, 0, 276480, 0x5f7a0d4f +0, 250, 250, 0, 276480, 0x5f7a0d4f +0, 292, 292, 0, 276480, 0x5f7a0d4f +0, 334, 334, 0, 276480, 0x5f7a0d4f +0, 375, 375, 0, 276480, 0x5f7a0d4f +0, 417, 417, 0, 276480, 0x5f7a0d4f +0, 459, 459, 0, 276480, 0x5f7a0d4f +0, 501, 501, 0, 276480, 0x5f7a0d4f +0, 542, 542, 0, 276480, 0x5f7a0d4f +0, 584, 584, 0, 276480, 0x5f7a0d4f +0, 626, 626, 0, 276480, 0x5f7a0d4f +0, 667, 667, 0, 276480, 0x5f7a0d4f +0, 709, 709, 0, 276480, 0x5f7a0d4f +0, 751, 751, 0, 276480, 0x5f7a0d4f +0, 792, 792, 0, 276480, 0x5f7a0d4f +0, 834, 834, 0, 276480, 0x5f7a0d4f +0, 876, 876, 0, 276480, 0x5f7a0d4f +0, 918, 918, 0, 276480, 0x5f7a0d4f +0, 959, 959, 0, 276480, 0x5f7a0d4f +0, 1001, 1001, 0, 276480, 0x5f7a0d4f +0, 1043, 1043, 0, 276480, 0x5f7a0d4f +0, 1084, 1084, 0, 276480, 0x5f7a0d4f +0, 1126, 1126, 0, 276480, 0x5f7a0d4f +0, 1168, 1168, 0, 276480, 0x5f7a0d4f +0, 1210, 1210, 0, 276480, 0x5f7a0d4f +0, 1251, 1251, 0, 276480, 0x5f7a0d4f +0, 1293, 1293, 0, 276480, 0x5f7a0d4f +0, 1335, 1335, 0, 276480, 0x5f7a0d4f +0, 1376, 1376, 0, 276480, 0x75641594 +0, 1418, 1418, 0, 276480, 0x32ee3526 +0, 1460, 1460, 0, 276480, 0xcb53479a +0, 1502, 1502, 0, 276480, 0x7ca9658e +0, 1543, 1543, 0, 276480, 0x5ce39368 +0, 1585, 1585, 0, 276480, 0x4ec1e418 +0, 1627, 1627, 0, 276480, 0xb3790499 +0, 1668, 1668, 0, 276480, 0xa9f1506f +0, 1710, 1710, 0, 276480, 0x85cbc3b5 +0, 1752, 1752, 0, 276480, 0x377c7b46 +0, 1793, 1793, 0, 276480, 0x1a61d8db +0, 1835, 1835, 0, 276480, 0xe1de7f0a +0, 1877, 1877, 0, 276480, 0x756a4a2e +0, 1919, 1919, 0, 276480, 0xcb379547 +0, 1960, 1960, 0, 276480, 0xbae14484 +0, 2002, 2002, 0, 276480, 0x8e12331c +0, 2044, 2044, 0, 276480, 0x99c085be +0, 2085, 2085, 0, 276480, 0xe479ffed +0, 2127, 2127, 0, 276480, 0x99c82949 +0, 2169, 2169, 0, 276480, 0xac7672dd +0, 2211, 2211, 0, 276480, 0x1e4fae19 +0, 2252, 2252, 0, 276480, 0x776412ef +0, 2294, 2294, 0, 276480, 0x7d9b579f +0, 2336, 2336, 0, 276480, 0x1cd1ab29 +0, 2377, 2377, 0, 276480, 0x58ce0f38 +0, 2419, 2419, 0, 276480, 0x5ab69b27 +0, 2461, 2461, 0, 276480, 0x0afad610 +0, 2503, 2503, 0, 276480, 0x9eca3f11 +0, 2544, 2544, 0, 276480, 0xc3db9706 +0, 2586, 2586, 0, 276480, 0xc9c57884 +0, 2628, 2628, 0, 276480, 0xd9fbb2cf +0, 2669, 2669, 0, 276480, 0xdc07f3c9 +0, 2711, 2711, 0, 276480, 0x000b5269 +0, 2753, 2753, 0, 276480, 0x27ff7a5d +0, 2794, 2794, 0, 276480, 0xd92e2017 +0, 2836, 2836, 0, 276480, 0x18d4b27d +0, 2878, 2878, 0, 276480, 0x70647530 +0, 2920, 2920, 0, 276480, 0x97612c4b +0, 2961, 2961, 0, 276480, 0xc9d4ac78 +0, 3003, 3003, 0, 276480, 0x4ec4d57f +0, 3045, 3045, 0, 276480, 0xdf4e04d7 +0, 3086, 3086, 0, 276480, 0xbd98f57c +0, 3128, 3128, 0, 276480, 0x7247ea3e +0, 3170, 3170, 0, 276480, 0xa5d670ec +0, 3212, 3212, 0, 276480, 0x5163b29b +0, 3253, 3253, 0, 276480, 0x99170e64 +0, 3295, 3295, 0, 276480, 0x37f4c0b0 +0, 3337, 3337, 0, 276480, 0x7a4f2561 +0, 3378, 3378, 0, 276480, 0x8a4e991f +0, 3420, 3420, 0, 276480, 0x6a45425f +0, 3462, 3462, 0, 276480, 0x1f0e2bb6 +0, 3504, 3504, 0, 276480, 0xd75482c6 +0, 3545, 3545, 0, 276480, 0x7bf6b1ef +0, 3587, 3587, 0, 276480, 0x6de1e34b +0, 3629, 3629, 0, 276480, 0x4526c89b +0, 3670, 3670, 0, 276480, 0xf964e18e +0, 3712, 3712, 0, 276480, 0xdcaaa99a +0, 3754, 3754, 0, 276480, 0xd1e98808 +0, 3795, 3795, 0, 276480, 0x556b2365 +0, 3837, 3837, 0, 276480, 0x0cf65540 +0, 3879, 3879, 0, 276480, 0x6e2d524e +0, 3921, 3921, 0, 276480, 0x22c50a3d +0, 3962, 3962, 0, 276480, 0x293f19af +0, 4004, 4004, 0, 276480, 0xf4b1c461 +0, 4046, 4046, 0, 276480, 0x62b76407 +0, 4087, 4087, 0, 276480, 0x51e9b3eb +0, 4129, 4129, 0, 276480, 0x7b910bc7 +0, 4171, 4171, 0, 276480, 0x6dd14ca6 +0, 4213, 4213, 0, 276480, 0x441f7afd +0, 4254, 4254, 0, 276480, 0xfb01efc6 +0, 4296, 4296, 0, 276480, 0x4f73ccea +0, 4338, 4338, 0, 276480, 0x5ac8e06f +0, 4379, 4379, 0, 276480, 0x294bb441 +0, 4421, 4421, 0, 276480, 0xe04ac45e +0, 4463, 4463, 0, 276480, 0xa7a38d41 +0, 4505, 4505, 0, 276480, 0xf688a3ed +0, 4546, 4546, 0, 276480, 0x58f275ea +0, 4588, 4588, 0, 276480, 0xf0b3b71b +0, 4630, 4630, 0, 276480, 0x3ce773bf +0, 4671, 4671, 0, 276480, 0x01840548 +0, 4713, 4713, 0, 276480, 0x674e34e4 +0, 4755, 4755, 0, 276480, 0x41dda2d9 +0, 4796, 4796, 0, 276480, 0xc5b60838 +0, 4838, 4838, 0, 276480, 0x9b209f41 +0, 4880, 4880, 0, 276480, 0xf46ba7fb +0, 4922, 4922, 0, 276480, 0x28b54815 +0, 4963, 4963, 0, 276480, 0xb605a933 +0, 5005, 5005, 0, 276480, 0x34484aff +0, 5047, 5047, 0, 276480, 0xaf2b5d89 +0, 5088, 5088, 0, 276480, 0x8facba58 +0, 5130, 5130, 0, 276480, 0xbbe3e99f +0, 5172, 5172, 0, 276480, 0x02162c7c +0, 5214, 5214, 0, 276480, 0x28a63236 +0, 5255, 5255, 0, 276480, 0x1ad43fd7 +0, 5297, 5297, 0, 276480, 0xe37883e5 +0, 5339, 5339, 0, 276480, 0x2b8a89c5 +0, 5380, 5380, 0, 276480, 0x71507bd2 +0, 5422, 5422, 0, 276480, 0x35626022 +0, 5464, 5464, 0, 276480, 0x461fc3e7 +0, 5506, 5506, 0, 276480, 0xce5af1ec +0, 5547, 5547, 0, 276480, 0x7c1139b3 +0, 5589, 5589, 0, 276480, 0x7fd73a99 +0, 5631, 5631, 0, 276480, 0x4ae4c3a6 +0, 5672, 5672, 0, 276480, 0xcb60725a +0, 5714, 5714, 0, 276480, 0xb52e1aa2 +0, 5756, 5756, 0, 276480, 0xd6f82cae +0, 5797, 5797, 0, 276480, 0x6310e665 +0, 5839, 5839, 0, 276480, 0xfa88a483 +0, 5881, 5881, 0, 276480, 0xf88f75d4 +0, 5923, 5923, 0, 276480, 0x04a8e3ee +0, 5964, 5964, 0, 276480, 0x54766a12 +0, 6006, 6006, 0, 276480, 0x0b41f0d7 +0, 6048, 6048, 0, 276480, 0xa29f5b01 +0, 6089, 6089, 0, 276480, 0x754ceaf5 +0, 6131, 6131, 0, 276480, 0x150c0423 +0, 6173, 6173, 0, 276480, 0xde084059 +0, 6215, 6215, 0, 276480, 0x5a38b4af +0, 6256, 6256, 0, 276480, 0xfcebc261 +0, 6298, 6298, 0, 276480, 0x0eb9770d +0, 6340, 6340, 0, 276480, 0x046394ae +0, 6381, 6381, 0, 276480, 0x3d3ca985 +0, 6423, 6423, 0, 276480, 0x94a03c75 +0, 6465, 6465, 0, 276480, 0x800eea2d +0, 6507, 6507, 0, 276480, 0x6a841f41 +0, 6548, 6548, 0, 276480, 0x2f98911c +0, 6590, 6590, 0, 276480, 0x923b9937 +0, 6632, 6632, 0, 276480, 0xe82f8e0f +0, 6673, 6673, 0, 276480, 0xee82d657 +0, 6715, 6715, 0, 276480, 0xefab7ffd +0, 6757, 6757, 0, 276480, 0x6b9fbc80 +0, 6798, 6798, 0, 276480, 0x4a1ada47 +0, 6840, 6840, 0, 276480, 0x6d4b49d7 +0, 6882, 6882, 0, 276480, 0xe4bdbd1e +0, 6924, 6924, 0, 276480, 0x225a56c0 +0, 6965, 6965, 0, 276480, 0xd4adadad +0, 7007, 7007, 0, 276480, 0xff4e1a8c +0, 7049, 7049, 0, 276480, 0xf58b1b7c +0, 7090, 7090, 0, 276480, 0xbaffcdcc +0, 7132, 7132, 0, 276480, 0x374f88f0 +0, 7174, 7174, 0, 276480, 0x3d861ae6 +0, 7216, 7216, 0, 276480, 0xeb6eb88f +0, 7257, 7257, 0, 276480, 0xdb753d35 +0, 7299, 7299, 0, 276480, 0x9aa543af +0, 7341, 7341, 0, 276480, 0xb24c8016 +0, 7382, 7382, 0, 276480, 0xea80a82e +0, 7424, 7424, 0, 276480, 0x2aae902a +0, 7466, 7466, 0, 276480, 0x5bba3cfb +0, 7508, 7508, 0, 276480, 0x5c6e97a9 +0, 7549, 7549, 0, 276480, 0x9b9ee961 +0, 7591, 7591, 0, 276480, 0xaa12b6fd +0, 7633, 7633, 0, 276480, 0xe9d2439f +0, 7674, 7674, 0, 276480, 0xbf09053c +0, 7716, 7716, 0, 276480, 0x50c31e73 +0, 7758, 7758, 0, 276480, 0xdd9fb89f +0, 7799, 7799, 0, 276480, 0x3e4e5aec +0, 7841, 7841, 0, 276480, 0x0b752d28 +0, 7883, 7883, 0, 276480, 0xaf82399a +0, 7925, 7925, 0, 276480, 0x7ce5f23c +0, 7966, 7966, 0, 276480, 0xad135d0f +0, 8008, 8008, 0, 276480, 0x55dadd30 +0, 8050, 8050, 0, 276480, 0x5aaa7519 +0, 8091, 8091, 0, 276480, 0xe45a5599 +0, 8133, 8133, 0, 276480, 0xc8e89913 +0, 8175, 8175, 0, 276480, 0x2f447fd3 +0, 8217, 8217, 0, 276480, 0x704411fb +0, 8258, 8258, 0, 276480, 0x9d7430a1 +0, 8300, 8300, 0, 276480, 0x24dd5fd3 +0, 8342, 8342, 0, 276480, 0x51cb657c +0, 8383, 8383, 0, 276480, 0x2c230702 +0, 8425, 8425, 0, 276480, 0x4a4f76cd +0, 8467, 8467, 0, 276480, 0xdcd71e88 +0, 8509, 8509, 0, 276480, 0x87160f99 +0, 8550, 8550, 0, 276480, 0x27f54854 +0, 8592, 8592, 0, 276480, 0x694d76e3 +0, 8634, 8634, 0, 276480, 0xcbe93c19 +0, 8675, 8675, 0, 276480, 0x50742e1b +0, 8717, 8717, 0, 276480, 0x525463e2 +0, 8759, 8759, 0, 276480, 0x819898f9 +0, 8800, 8800, 0, 276480, 0x08fac755 +0, 8842, 8842, 0, 276480, 0x35c46927 +0, 8884, 8884, 0, 276480, 0xeeed00fc +0, 8926, 8926, 0, 276480, 0xb6f99ee3 +0, 8967, 8967, 0, 276480, 0xd87f4c73 +0, 9009, 9009, 0, 276480, 0xde97d9fd +0, 9051, 9051, 0, 276480, 0xefc83107 +0, 9092, 9092, 0, 276480, 0xbb22e024 +0, 9134, 9134, 0, 276480, 0x53a7cfcb +0, 9176, 9176, 0, 276480, 0xbe1fbb19 +0, 9218, 9218, 0, 276480, 0x300f922a +0, 9259, 9259, 0, 276480, 0x826fc3bd +0, 9301, 9301, 0, 276480, 0x679aa57a +0, 9343, 9343, 0, 276480, 0x5497097b +0, 9384, 9384, 0, 276480, 0x679a53f8 +0, 9426, 9426, 0, 276480, 0x976c9e93 +0, 9468, 9468, 0, 276480, 0xe80f87f2 +0, 9510, 9510, 0, 276480, 0xdc2d7c6c +0, 9551, 9551, 0, 276480, 0xb194656e +0, 9593, 9593, 0, 276480, 0xf002c5ca +0, 9635, 9635, 0, 276480, 0x43fc1c64 +0, 9676, 9676, 0, 276480, 0xf62d8581 +0, 9718, 9718, 0, 276480, 0xb243dda5 +0, 9760, 9760, 0, 276480, 0x1700efbb +0, 9801, 9801, 0, 276480, 0x9ebe6ba2 +0, 9843, 9843, 0, 276480, 0x8f316c66 +0, 9885, 9885, 0, 276480, 0x6348ecf5 +0, 9927, 9927, 0, 276480, 0x34b5b78a -- cgit v1.2.3 From 454b1f9b5831ff53d098be737feb7b1e3d73f1d3 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Thu, 26 Apr 2012 15:04:20 +0200 Subject: fate: cosmetics: lowercase some comments --- tests/fate/wavpack.mak | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/fate/wavpack.mak b/tests/fate/wavpack.mak index 2b64d76cb7..d70f713725 100644 --- a/tests/fate/wavpack.mak +++ b/tests/fate/wavpack.mak @@ -1,4 +1,4 @@ -# Lossless +# lossless FATE_WAVPACK += fate-wavpack-lossless-float fate-wavpack-lossless-float: CMD = md5 -i $(SAMPLES)/wavpack/lossless/32bit_float-partial.wv -f f32le @@ -18,7 +18,7 @@ fate-wavpack-lossless-24bit: CMD = md5 -i $(SAMPLES)/wavpack/lossless/24bit-part FATE_WAVPACK += fate-wavpack-lossless-32bit fate-wavpack-lossless-32bit: CMD = md5 -i $(SAMPLES)/wavpack/lossless/32bit_int-partial.wv -f s32le -# Lossy +# lossy FATE_WAVPACK += fate-wavpack-lossy-float fate-wavpack-lossy-float: CMD = md5 -i $(SAMPLES)/wavpack/lossy/2.0_32-bit_float.wv -f f32le @@ -35,7 +35,7 @@ fate-wavpack-lossy-24bit: CMD = md5 -i $(SAMPLES)/wavpack/lossy/4.0_24-bit.wv -f FATE_WAVPACK += fate-wavpack-lossy-32bit fate-wavpack-lossy-32bit: CMD = md5 -i $(SAMPLES)/wavpack/lossy/4.0_32-bit_int.wv -f s32le -# Channel configurations +# channel configurations FATE_WAVPACK += fate-wavpack-channels-monofloat fate-wavpack-channels-monofloat: CMD = md5 -i $(SAMPLES)/wavpack/num_channels/mono_float-partial.wv -f f32le @@ -55,7 +55,7 @@ fate-wavpack-channels-6.1: CMD = md5 -i $(SAMPLES)/wavpack/num_channels/eva_2.22 FATE_WAVPACK += fate-wavpack-channels-7.1 fate-wavpack-channels-7.1: CMD = md5 -i $(SAMPLES)/wavpack/num_channels/panslab_sample_7.1_16bit-partial.wv -f s16le -# Speed modes +# speed modes FATE_WAVPACK += fate-wavpack-speed-default fate-wavpack-speed-default: CMD = md5 -i $(SAMPLES)/wavpack/speed_modes/default-partial.wv -f s16le @@ -69,7 +69,7 @@ fate-wavpack-speed-high: CMD = md5 -i $(SAMPLES)/wavpack/speed_modes/high-partia FATE_WAVPACK += fate-wavpack-speed-vhigh fate-wavpack-speed-vhigh: CMD = md5 -i $(SAMPLES)/wavpack/speed_modes/vhigh-partial.wv -f s16le -# Special Cases +# special cases FATE_WAVPACK += fate-wavpack-cuesheet fate-wavpack-cuesheet: CMD = md5 -i $(SAMPLES)/wavpack/special/cue_sheet.wv -f s16le -- cgit v1.2.3 From 727af82a84999c6fbd30856c42ac1477e8fbe011 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Thu, 19 Apr 2012 14:55:49 +0200 Subject: jpeglsdec: Remove write-only variable in ff_jpegls_decode_lse(). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit libavcodec/jpeglsdec.c:54:9: warning: variable ‘len’ set but not used --- libavcodec/jpeglsdec.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavcodec/jpeglsdec.c b/libavcodec/jpeglsdec.c index 43bf7652b7..25b3c3068f 100644 --- a/libavcodec/jpeglsdec.c +++ b/libavcodec/jpeglsdec.c @@ -51,10 +51,9 @@ */ int ff_jpegls_decode_lse(MJpegDecodeContext *s) { - int len, id; + int id; - /* XXX: verify len field validity */ - len = get_bits(&s->gb, 16); + skip_bits(&s->gb, 16); /* length: FIXME: verify field validity */ id = get_bits(&s->gb, 8); switch(id){ -- cgit v1.2.3 From 5b432d66ce49cbadcac832bffd6e22fda83807d3 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Wed, 11 Apr 2012 01:11:08 +0200 Subject: libxvid: Separate libxvid encoder from libxvid rate control code. This allows compiling the Xvid rate control code without the encoder. --- libavcodec/Makefile | 3 ++- libavcodec/libxvid_rc.c | 41 +++++++++++++++++++++++++++++++++++++++++ libavcodec/libxvidff.c | 39 --------------------------------------- 3 files changed, 43 insertions(+), 40 deletions(-) diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 7ee13fd710..c542f6e20b 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -42,6 +42,7 @@ OBJS-$(CONFIG_GOLOMB) += golomb.o OBJS-$(CONFIG_H264DSP) += h264dsp.o h264idct.o OBJS-$(CONFIG_H264PRED) += h264pred.o OBJS-$(CONFIG_HUFFMAN) += huffman.o +OBJS-$(CONFIG_LIBXVID) += libxvid_rc.o OBJS-$(CONFIG_LPC) += lpc.o OBJS-$(CONFIG_LSP) += lsp.o OBJS-$(CONFIG_MDCT) += mdct_fixed.o mdct_float.o @@ -615,7 +616,7 @@ OBJS-$(CONFIG_LIBVPX_DECODER) += libvpxdec.o OBJS-$(CONFIG_LIBVPX_ENCODER) += libvpxenc.o OBJS-$(CONFIG_LIBX264_ENCODER) += libx264.o OBJS-$(CONFIG_LIBXAVS_ENCODER) += libxavs.o -OBJS-$(CONFIG_LIBXVID) += libxvidff.o libxvid_rc.o +OBJS-$(CONFIG_LIBXVID_ENCODER) += libxvidff.o # parsers OBJS-$(CONFIG_AAC_PARSER) += aac_parser.o aac_ac3_parser.o \ diff --git a/libavcodec/libxvid_rc.c b/libavcodec/libxvid_rc.c index c830767058..959edd49b4 100644 --- a/libavcodec/libxvid_rc.c +++ b/libavcodec/libxvid_rc.c @@ -20,8 +20,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "config.h" #include #include +#if !HAVE_MKSTEMP +#include +#endif + #include "avcodec.h" #include "libxvid_internal.h" //#include "dsputil.h" @@ -30,6 +35,42 @@ #undef NDEBUG #include +/* Wrapper to work around the lack of mkstemp() on mingw. + * Also, tries to create file in /tmp first, if possible. + * *prefix can be a character constant; *filename will be allocated internally. + * @return file descriptor of opened file (or -1 on error) + * and opened file name in **filename. */ +int ff_tempfile(const char *prefix, char **filename) { + int fd=-1; +#if !HAVE_MKSTEMP + *filename = tempnam(".", prefix); +#else + size_t len = strlen(prefix) + 12; /* room for "/tmp/" and "XXXXXX\0" */ + *filename = av_malloc(len); +#endif + /* -----common section-----*/ + if (*filename == NULL) { + av_log(NULL, AV_LOG_ERROR, "ff_tempfile: Cannot allocate file name\n"); + return -1; + } +#if !HAVE_MKSTEMP + fd = open(*filename, O_RDWR | O_BINARY | O_CREAT, 0444); +#else + snprintf(*filename, len, "/tmp/%sXXXXXX", prefix); + fd = mkstemp(*filename); + if (fd < 0) { + snprintf(*filename, len, "./%sXXXXXX", prefix); + fd = mkstemp(*filename); + } +#endif + /* -----common section-----*/ + if (fd < 0) { + av_log(NULL, AV_LOG_ERROR, "ff_tempfile: Cannot open temporary file %s\n", *filename); + return -1; + } + return fd; /* success */ +} + int ff_xvid_rate_control_init(MpegEncContext *s){ char *tmp_name; int fd, i; diff --git a/libavcodec/libxvidff.c b/libavcodec/libxvidff.c index def80b3fac..e95bb7d3b9 100644 --- a/libavcodec/libxvidff.c +++ b/libavcodec/libxvidff.c @@ -33,9 +33,6 @@ #include "libavutil/mathematics.h" #include "libxvid_internal.h" #include "mpegvideo.h" -#if !HAVE_MKSTEMP -#include -#endif /** * Buffer management macros. @@ -83,42 +80,6 @@ struct xvid_ff_pass1 { * rate-control plugin. */ -/* Wrapper to work around the lack of mkstemp() on mingw. - * Also, tries to create file in /tmp first, if possible. - * *prefix can be a character constant; *filename will be allocated internally. - * @return file descriptor of opened file (or -1 on error) - * and opened file name in **filename. */ -int ff_tempfile(const char *prefix, char **filename) { - int fd=-1; -#if !HAVE_MKSTEMP - *filename = tempnam(".", prefix); -#else - size_t len = strlen(prefix) + 12; /* room for "/tmp/" and "XXXXXX\0" */ - *filename = av_malloc(len); -#endif - /* -----common section-----*/ - if (*filename == NULL) { - av_log(NULL, AV_LOG_ERROR, "ff_tempfile: Cannot allocate file name\n"); - return -1; - } -#if !HAVE_MKSTEMP - fd = open(*filename, O_RDWR | O_BINARY | O_CREAT, 0444); -#else - snprintf(*filename, len, "/tmp/%sXXXXXX", prefix); - fd = mkstemp(*filename); - if (fd < 0) { - snprintf(*filename, len, "./%sXXXXXX", prefix); - fd = mkstemp(*filename); - } -#endif - /* -----common section-----*/ - if (fd < 0) { - av_log(NULL, AV_LOG_ERROR, "ff_tempfile: Cannot open temporary file %s\n", *filename); - return -1; - } - return fd; /* success */ -} - /** * Initialize the two-pass plugin and context. * -- cgit v1.2.3 From c8b4a3999bc7f3732a537cdec6475918a65d6e78 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Wed, 9 May 2012 17:20:36 +0200 Subject: libxvid: Give more suitable names to libxvid-related files. --- libavcodec/Makefile | 2 +- libavcodec/libxvid.c | 788 ++++++++++++++++++++++++++++++++++++++++++ libavcodec/libxvid.h | 32 ++ libavcodec/libxvid_internal.h | 32 -- libavcodec/libxvid_rc.c | 2 +- libavcodec/libxvidff.c | 788 ------------------------------------------ 6 files changed, 822 insertions(+), 822 deletions(-) create mode 100644 libavcodec/libxvid.c create mode 100644 libavcodec/libxvid.h delete mode 100644 libavcodec/libxvid_internal.h delete mode 100644 libavcodec/libxvidff.c diff --git a/libavcodec/Makefile b/libavcodec/Makefile index c542f6e20b..da8aa8ac20 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -616,7 +616,7 @@ OBJS-$(CONFIG_LIBVPX_DECODER) += libvpxdec.o OBJS-$(CONFIG_LIBVPX_ENCODER) += libvpxenc.o OBJS-$(CONFIG_LIBX264_ENCODER) += libx264.o OBJS-$(CONFIG_LIBXAVS_ENCODER) += libxavs.o -OBJS-$(CONFIG_LIBXVID_ENCODER) += libxvidff.o +OBJS-$(CONFIG_LIBXVID_ENCODER) += libxvid.o # parsers OBJS-$(CONFIG_AAC_PARSER) += aac_parser.o aac_ac3_parser.o \ diff --git a/libavcodec/libxvid.c b/libavcodec/libxvid.c new file mode 100644 index 0000000000..3d63beaffd --- /dev/null +++ b/libavcodec/libxvid.c @@ -0,0 +1,788 @@ +/* + * Interface to xvidcore for mpeg4 encoding + * Copyright (c) 2004 Adam Thayer + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Interface to xvidcore for MPEG-4 compliant encoding. + * @author Adam Thayer (krevnik@comcast.net) + */ + +#include +#include +#include "avcodec.h" +#include "libavutil/cpu.h" +#include "libavutil/intreadwrite.h" +#include "libavutil/mathematics.h" +#include "libxvid.h" +#include "mpegvideo.h" + +/** + * Buffer management macros. + */ +#define BUFFER_SIZE 1024 +#define BUFFER_REMAINING(x) (BUFFER_SIZE - strlen(x)) +#define BUFFER_CAT(x) (&((x)[strlen(x)])) + +/** + * Structure for the private Xvid context. + * This stores all the private context for the codec. + */ +struct xvid_context { + void *encoder_handle; /**< Handle for Xvid encoder */ + int xsize; /**< Frame x size */ + int ysize; /**< Frame y size */ + int vop_flags; /**< VOP flags for Xvid encoder */ + int vol_flags; /**< VOL flags for Xvid encoder */ + int me_flags; /**< Motion Estimation flags */ + int qscale; /**< Do we use constant scale? */ + int quicktime_format; /**< Are we in a QT-based format? */ + AVFrame encoded_picture; /**< Encoded frame information */ + char *twopassbuffer; /**< Character buffer for two-pass */ + char *old_twopassbuffer; /**< Old character buffer (two-pass) */ + char *twopassfile; /**< second pass temp file name */ + unsigned char *intra_matrix; /**< P-Frame Quant Matrix */ + unsigned char *inter_matrix; /**< I-Frame Quant Matrix */ +}; + +/** + * Structure for the private first-pass plugin. + */ +struct xvid_ff_pass1 { + int version; /**< Xvid version */ + struct xvid_context *context; /**< Pointer to private context */ +}; + +/* + * Xvid 2-Pass Kludge Section + * + * Xvid's default 2-pass doesn't allow us to create data as we need to, so + * this section spends time replacing the first pass plugin so we can write + * statistic information as libavcodec requests in. We have another kludge + * that allows us to pass data to the second pass in Xvid without a custom + * rate-control plugin. + */ + +/** + * Initialize the two-pass plugin and context. + * + * @param param Input construction parameter structure + * @param handle Private context handle + * @return Returns XVID_ERR_xxxx on failure, or 0 on success. + */ +static int xvid_ff_2pass_create(xvid_plg_create_t * param, + void ** handle) { + struct xvid_ff_pass1 *x = (struct xvid_ff_pass1 *)param->param; + char *log = x->context->twopassbuffer; + + /* Do a quick bounds check */ + if( log == NULL ) + return XVID_ERR_FAIL; + + /* We use snprintf() */ + /* This is because we can safely prevent a buffer overflow */ + log[0] = 0; + snprintf(log, BUFFER_REMAINING(log), + "# avconv 2-pass log file, using xvid codec\n"); + snprintf(BUFFER_CAT(log), BUFFER_REMAINING(log), + "# Do not modify. libxvidcore version: %d.%d.%d\n\n", + XVID_VERSION_MAJOR(XVID_VERSION), + XVID_VERSION_MINOR(XVID_VERSION), + XVID_VERSION_PATCH(XVID_VERSION)); + + *handle = x->context; + return 0; +} + +/** + * Destroy the two-pass plugin context. + * + * @param ref Context pointer for the plugin + * @param param Destrooy context + * @return Returns 0, success guaranteed + */ +static int xvid_ff_2pass_destroy(struct xvid_context *ref, + xvid_plg_destroy_t *param) { + /* Currently cannot think of anything to do on destruction */ + /* Still, the framework should be here for reference/use */ + if( ref->twopassbuffer != NULL ) + ref->twopassbuffer[0] = 0; + return 0; +} + +/** + * Enable fast encode mode during the first pass. + * + * @param ref Context pointer for the plugin + * @param param Frame data + * @return Returns 0, success guaranteed + */ +static int xvid_ff_2pass_before(struct xvid_context *ref, + xvid_plg_data_t *param) { + int motion_remove; + int motion_replacements; + int vop_remove; + + /* Nothing to do here, result is changed too much */ + if( param->zone && param->zone->mode == XVID_ZONE_QUANT ) + return 0; + + /* We can implement a 'turbo' first pass mode here */ + param->quant = 2; + + /* Init values */ + motion_remove = ~XVID_ME_CHROMA_PVOP & + ~XVID_ME_CHROMA_BVOP & + ~XVID_ME_EXTSEARCH16 & + ~XVID_ME_ADVANCEDDIAMOND16; + motion_replacements = XVID_ME_FAST_MODEINTERPOLATE | + XVID_ME_SKIP_DELTASEARCH | + XVID_ME_FASTREFINE16 | + XVID_ME_BFRAME_EARLYSTOP; + vop_remove = ~XVID_VOP_MODEDECISION_RD & + ~XVID_VOP_FAST_MODEDECISION_RD & + ~XVID_VOP_TRELLISQUANT & + ~XVID_VOP_INTER4V & + ~XVID_VOP_HQACPRED; + + param->vol_flags &= ~XVID_VOL_GMC; + param->vop_flags &= vop_remove; + param->motion_flags &= motion_remove; + param->motion_flags |= motion_replacements; + + return 0; +} + +/** + * Capture statistic data and write it during first pass. + * + * @param ref Context pointer for the plugin + * @param param Statistic data + * @return Returns XVID_ERR_xxxx on failure, or 0 on success + */ +static int xvid_ff_2pass_after(struct xvid_context *ref, + xvid_plg_data_t *param) { + char *log = ref->twopassbuffer; + const char *frame_types = " ipbs"; + char frame_type; + + /* Quick bounds check */ + if( log == NULL ) + return XVID_ERR_FAIL; + + /* Convert the type given to us into a character */ + if( param->type < 5 && param->type > 0 ) { + frame_type = frame_types[param->type]; + } else { + return XVID_ERR_FAIL; + } + + snprintf(BUFFER_CAT(log), BUFFER_REMAINING(log), + "%c %d %d %d %d %d %d\n", + frame_type, param->stats.quant, param->stats.kblks, param->stats.mblks, + param->stats.ublks, param->stats.length, param->stats.hlength); + + return 0; +} + +/** + * Dispatch function for our custom plugin. + * This handles the dispatch for the Xvid plugin. It passes data + * on to other functions for actual processing. + * + * @param ref Context pointer for the plugin + * @param cmd The task given for us to complete + * @param p1 First parameter (varies) + * @param p2 Second parameter (varies) + * @return Returns XVID_ERR_xxxx on failure, or 0 on success + */ +static int xvid_ff_2pass(void *ref, int cmd, void *p1, void *p2) +{ + switch( cmd ) { + case XVID_PLG_INFO: + case XVID_PLG_FRAME: + return 0; + + case XVID_PLG_BEFORE: + return xvid_ff_2pass_before(ref, p1); + + case XVID_PLG_CREATE: + return xvid_ff_2pass_create(p1, p2); + + case XVID_PLG_AFTER: + return xvid_ff_2pass_after(ref, p1); + + case XVID_PLG_DESTROY: + return xvid_ff_2pass_destroy(ref, p1); + + default: + return XVID_ERR_FAIL; + } +} + +/** + * Routine to create a global VO/VOL header for MP4 container. + * What we do here is extract the header from the Xvid bitstream + * as it is encoded. We also strip the repeated headers from the + * bitstream when a global header is requested for MPEG-4 ISO + * compliance. + * + * @param avctx AVCodecContext pointer to context + * @param frame Pointer to encoded frame data + * @param header_len Length of header to search + * @param frame_len Length of encoded frame data + * @return Returns new length of frame data + */ +static int xvid_strip_vol_header(AVCodecContext *avctx, + AVPacket *pkt, + unsigned int header_len, + unsigned int frame_len) { + int vo_len = 0, i; + + for( i = 0; i < header_len - 3; i++ ) { + if( pkt->data[i] == 0x00 && + pkt->data[i+1] == 0x00 && + pkt->data[i+2] == 0x01 && + pkt->data[i+3] == 0xB6 ) { + vo_len = i; + break; + } + } + + if( vo_len > 0 ) { + /* We need to store the header, so extract it */ + if( avctx->extradata == NULL ) { + avctx->extradata = av_malloc(vo_len); + memcpy(avctx->extradata, pkt->data, vo_len); + avctx->extradata_size = vo_len; + } + /* Less dangerous now, memmove properly copies the two + chunks of overlapping data */ + memmove(pkt->data, &pkt->data[vo_len], frame_len - vo_len); + pkt->size = frame_len - vo_len; + } + return 0; +} + +/** + * Routine to correct a possibly erroneous framerate being fed to us. + * Xvid currently chokes on framerates where the ticks per frame is + * extremely large. This function works to correct problems in this area + * by estimating a new framerate and taking the simpler fraction of + * the two presented. + * + * @param avctx Context that contains the framerate to correct. + */ +static void xvid_correct_framerate(AVCodecContext *avctx) +{ + int frate, fbase; + int est_frate, est_fbase; + int gcd; + float est_fps, fps; + + frate = avctx->time_base.den; + fbase = avctx->time_base.num; + + gcd = av_gcd(frate, fbase); + if( gcd > 1 ) { + frate /= gcd; + fbase /= gcd; + } + + if( frate <= 65000 && fbase <= 65000 ) { + avctx->time_base.den = frate; + avctx->time_base.num = fbase; + return; + } + + fps = (float)frate / (float)fbase; + est_fps = roundf(fps * 1000.0) / 1000.0; + + est_frate = (int)est_fps; + if( est_fps > (int)est_fps ) { + est_frate = (est_frate + 1) * 1000; + est_fbase = (int)roundf((float)est_frate / est_fps); + } else + est_fbase = 1; + + gcd = av_gcd(est_frate, est_fbase); + if( gcd > 1 ) { + est_frate /= gcd; + est_fbase /= gcd; + } + + if( fbase > est_fbase ) { + avctx->time_base.den = est_frate; + avctx->time_base.num = est_fbase; + av_log(avctx, AV_LOG_DEBUG, + "Xvid: framerate re-estimated: %.2f, %.3f%% correction\n", + est_fps, (((est_fps - fps)/fps) * 100.0)); + } else { + avctx->time_base.den = frate; + avctx->time_base.num = fbase; + } +} + +/** + * Create the private context for the encoder. + * All buffers are allocated, settings are loaded from the user, + * and the encoder context created. + * + * @param avctx AVCodecContext pointer to context + * @return Returns 0 on success, -1 on failure + */ +static av_cold int xvid_encode_init(AVCodecContext *avctx) { + int xerr, i; + int xvid_flags = avctx->flags; + struct xvid_context *x = avctx->priv_data; + uint16_t *intra, *inter; + int fd; + + xvid_plugin_single_t single = { 0 }; + struct xvid_ff_pass1 rc2pass1 = { 0 }; + xvid_plugin_2pass2_t rc2pass2 = { 0 }; + xvid_gbl_init_t xvid_gbl_init = { 0 }; + xvid_enc_create_t xvid_enc_create = { 0 }; + xvid_enc_plugin_t plugins[7]; + + /* Bring in VOP flags from avconv command-line */ + x->vop_flags = XVID_VOP_HALFPEL; /* Bare minimum quality */ + if( xvid_flags & CODEC_FLAG_4MV ) + x->vop_flags |= XVID_VOP_INTER4V; /* Level 3 */ + if( avctx->trellis + ) + x->vop_flags |= XVID_VOP_TRELLISQUANT; /* Level 5 */ + if( xvid_flags & CODEC_FLAG_AC_PRED ) + x->vop_flags |= XVID_VOP_HQACPRED; /* Level 6 */ + if( xvid_flags & CODEC_FLAG_GRAY ) + x->vop_flags |= XVID_VOP_GREYSCALE; + + /* Decide which ME quality setting to use */ + x->me_flags = 0; + switch( avctx->me_method ) { + case ME_FULL: /* Quality 6 */ + x->me_flags |= XVID_ME_EXTSEARCH16 + | XVID_ME_EXTSEARCH8; + + case ME_EPZS: /* Quality 4 */ + x->me_flags |= XVID_ME_ADVANCEDDIAMOND8 + | XVID_ME_HALFPELREFINE8 + | XVID_ME_CHROMA_PVOP + | XVID_ME_CHROMA_BVOP; + + case ME_LOG: /* Quality 2 */ + case ME_PHODS: + case ME_X1: + x->me_flags |= XVID_ME_ADVANCEDDIAMOND16 + | XVID_ME_HALFPELREFINE16; + + case ME_ZERO: /* Quality 0 */ + default: + break; + } + + /* Decide how we should decide blocks */ + switch( avctx->mb_decision ) { + case 2: + x->vop_flags |= XVID_VOP_MODEDECISION_RD; + x->me_flags |= XVID_ME_HALFPELREFINE8_RD + | XVID_ME_QUARTERPELREFINE8_RD + | XVID_ME_EXTSEARCH_RD + | XVID_ME_CHECKPREDICTION_RD; + case 1: + if( !(x->vop_flags & XVID_VOP_MODEDECISION_RD) ) + x->vop_flags |= XVID_VOP_FAST_MODEDECISION_RD; + x->me_flags |= XVID_ME_HALFPELREFINE16_RD + | XVID_ME_QUARTERPELREFINE16_RD; + + default: + break; + } + + /* Bring in VOL flags from avconv command-line */ + x->vol_flags = 0; + if( xvid_flags & CODEC_FLAG_GMC ) { + x->vol_flags |= XVID_VOL_GMC; + x->me_flags |= XVID_ME_GME_REFINE; + } + if( xvid_flags & CODEC_FLAG_QPEL ) { + x->vol_flags |= XVID_VOL_QUARTERPEL; + x->me_flags |= XVID_ME_QUARTERPELREFINE16; + if( x->vop_flags & XVID_VOP_INTER4V ) + x->me_flags |= XVID_ME_QUARTERPELREFINE8; + } + + xvid_gbl_init.version = XVID_VERSION; + xvid_gbl_init.debug = 0; + +#if ARCH_PPC + /* Xvid's PPC support is borked, use libavcodec to detect */ +#if HAVE_ALTIVEC + if (av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC) { + xvid_gbl_init.cpu_flags = XVID_CPU_FORCE | XVID_CPU_ALTIVEC; + } else +#endif + xvid_gbl_init.cpu_flags = XVID_CPU_FORCE; +#else + /* Xvid can detect on x86 */ + xvid_gbl_init.cpu_flags = 0; +#endif + + /* Initialize */ + xvid_global(NULL, XVID_GBL_INIT, &xvid_gbl_init, NULL); + + /* Create the encoder reference */ + xvid_enc_create.version = XVID_VERSION; + + /* Store the desired frame size */ + xvid_enc_create.width = x->xsize = avctx->width; + xvid_enc_create.height = x->ysize = avctx->height; + + /* Xvid can determine the proper profile to use */ + /* xvid_enc_create.profile = XVID_PROFILE_S_L3; */ + + /* We don't use zones */ + xvid_enc_create.zones = NULL; + xvid_enc_create.num_zones = 0; + + xvid_enc_create.num_threads = avctx->thread_count; + + xvid_enc_create.plugins = plugins; + xvid_enc_create.num_plugins = 0; + + /* Initialize Buffers */ + x->twopassbuffer = NULL; + x->old_twopassbuffer = NULL; + x->twopassfile = NULL; + + if( xvid_flags & CODEC_FLAG_PASS1 ) { + rc2pass1.version = XVID_VERSION; + rc2pass1.context = x; + x->twopassbuffer = av_malloc(BUFFER_SIZE); + x->old_twopassbuffer = av_malloc(BUFFER_SIZE); + if( x->twopassbuffer == NULL || x->old_twopassbuffer == NULL ) { + av_log(avctx, AV_LOG_ERROR, + "Xvid: Cannot allocate 2-pass log buffers\n"); + return -1; + } + x->twopassbuffer[0] = x->old_twopassbuffer[0] = 0; + + plugins[xvid_enc_create.num_plugins].func = xvid_ff_2pass; + plugins[xvid_enc_create.num_plugins].param = &rc2pass1; + xvid_enc_create.num_plugins++; + } else if( xvid_flags & CODEC_FLAG_PASS2 ) { + rc2pass2.version = XVID_VERSION; + rc2pass2.bitrate = avctx->bit_rate; + + fd = ff_tempfile("xvidff.", &x->twopassfile); + if( fd == -1 ) { + av_log(avctx, AV_LOG_ERROR, + "Xvid: Cannot write 2-pass pipe\n"); + return -1; + } + + if( avctx->stats_in == NULL ) { + av_log(avctx, AV_LOG_ERROR, + "Xvid: No 2-pass information loaded for second pass\n"); + return -1; + } + + if( strlen(avctx->stats_in) > + write(fd, avctx->stats_in, strlen(avctx->stats_in)) ) { + close(fd); + av_log(avctx, AV_LOG_ERROR, + "Xvid: Cannot write to 2-pass pipe\n"); + return -1; + } + + close(fd); + rc2pass2.filename = x->twopassfile; + plugins[xvid_enc_create.num_plugins].func = xvid_plugin_2pass2; + plugins[xvid_enc_create.num_plugins].param = &rc2pass2; + xvid_enc_create.num_plugins++; + } else if( !(xvid_flags & CODEC_FLAG_QSCALE) ) { + /* Single Pass Bitrate Control! */ + single.version = XVID_VERSION; + single.bitrate = avctx->bit_rate; + + plugins[xvid_enc_create.num_plugins].func = xvid_plugin_single; + plugins[xvid_enc_create.num_plugins].param = &single; + xvid_enc_create.num_plugins++; + } + + /* Luminance Masking */ + if( 0.0 != avctx->lumi_masking ) { + plugins[xvid_enc_create.num_plugins].func = xvid_plugin_lumimasking; + plugins[xvid_enc_create.num_plugins].param = NULL; + xvid_enc_create.num_plugins++; + } + + /* Frame Rate and Key Frames */ + xvid_correct_framerate(avctx); + xvid_enc_create.fincr = avctx->time_base.num; + xvid_enc_create.fbase = avctx->time_base.den; + if( avctx->gop_size > 0 ) + xvid_enc_create.max_key_interval = avctx->gop_size; + else + xvid_enc_create.max_key_interval = 240; /* Xvid's best default */ + + /* Quants */ + if( xvid_flags & CODEC_FLAG_QSCALE ) x->qscale = 1; + else x->qscale = 0; + + xvid_enc_create.min_quant[0] = avctx->qmin; + xvid_enc_create.min_quant[1] = avctx->qmin; + xvid_enc_create.min_quant[2] = avctx->qmin; + xvid_enc_create.max_quant[0] = avctx->qmax; + xvid_enc_create.max_quant[1] = avctx->qmax; + xvid_enc_create.max_quant[2] = avctx->qmax; + + /* Quant Matrices */ + x->intra_matrix = x->inter_matrix = NULL; + if( avctx->mpeg_quant ) + x->vol_flags |= XVID_VOL_MPEGQUANT; + if( (avctx->intra_matrix || avctx->inter_matrix) ) { + x->vol_flags |= XVID_VOL_MPEGQUANT; + + if( avctx->intra_matrix ) { + intra = avctx->intra_matrix; + x->intra_matrix = av_malloc(sizeof(unsigned char) * 64); + } else + intra = NULL; + if( avctx->inter_matrix ) { + inter = avctx->inter_matrix; + x->inter_matrix = av_malloc(sizeof(unsigned char) * 64); + } else + inter = NULL; + + for( i = 0; i < 64; i++ ) { + if( intra ) + x->intra_matrix[i] = (unsigned char)intra[i]; + if( inter ) + x->inter_matrix[i] = (unsigned char)inter[i]; + } + } + + /* Misc Settings */ + xvid_enc_create.frame_drop_ratio = 0; + xvid_enc_create.global = 0; + if( xvid_flags & CODEC_FLAG_CLOSED_GOP ) + xvid_enc_create.global |= XVID_GLOBAL_CLOSED_GOP; + + /* Determines which codec mode we are operating in */ + avctx->extradata = NULL; + avctx->extradata_size = 0; + if( xvid_flags & CODEC_FLAG_GLOBAL_HEADER ) { + /* In this case, we are claiming to be MPEG4 */ + x->quicktime_format = 1; + avctx->codec_id = CODEC_ID_MPEG4; + } else { + /* We are claiming to be Xvid */ + x->quicktime_format = 0; + if(!avctx->codec_tag) + avctx->codec_tag = AV_RL32("xvid"); + } + + /* Bframes */ + xvid_enc_create.max_bframes = avctx->max_b_frames; + xvid_enc_create.bquant_offset = 100 * avctx->b_quant_offset; + xvid_enc_create.bquant_ratio = 100 * avctx->b_quant_factor; + if( avctx->max_b_frames > 0 && !x->quicktime_format ) xvid_enc_create.global |= XVID_GLOBAL_PACKED; + + /* Create encoder context */ + xerr = xvid_encore(NULL, XVID_ENC_CREATE, &xvid_enc_create, NULL); + if( xerr ) { + av_log(avctx, AV_LOG_ERROR, "Xvid: Could not create encoder reference\n"); + return -1; + } + + x->encoder_handle = xvid_enc_create.handle; + avctx->coded_frame = &x->encoded_picture; + + return 0; +} + +/** + * Encode a single frame. + * + * @param avctx AVCodecContext pointer to context + * @param frame Pointer to encoded frame buffer + * @param buf_size Size of encoded frame buffer + * @param data Pointer to AVFrame of unencoded frame + * @return Returns 0 on success, -1 on failure + */ +static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt, + const AVFrame *picture, int *got_packet) +{ + int xerr, i, ret, user_packet = !!pkt->data; + char *tmp; + struct xvid_context *x = avctx->priv_data; + AVFrame *p = &x->encoded_picture; + int mb_width = (avctx->width + 15) / 16; + int mb_height = (avctx->height + 15) / 16; + + xvid_enc_frame_t xvid_enc_frame = { 0 }; + xvid_enc_stats_t xvid_enc_stats = { 0 }; + + if (!user_packet && + (ret = av_new_packet(pkt, mb_width*mb_height*MAX_MB_BYTES + FF_MIN_BUFFER_SIZE)) < 0) { + av_log(avctx, AV_LOG_ERROR, "Error getting output packet.\n"); + return ret; + } + + /* Start setting up the frame */ + xvid_enc_frame.version = XVID_VERSION; + xvid_enc_stats.version = XVID_VERSION; + *p = *picture; + + /* Let Xvid know where to put the frame. */ + xvid_enc_frame.bitstream = pkt->data; + xvid_enc_frame.length = pkt->size; + + /* Initialize input image fields */ + if( avctx->pix_fmt != PIX_FMT_YUV420P ) { + av_log(avctx, AV_LOG_ERROR, "Xvid: Color spaces other than 420p not supported\n"); + return -1; + } + + xvid_enc_frame.input.csp = XVID_CSP_PLANAR; /* YUV420P */ + + for( i = 0; i < 4; i++ ) { + xvid_enc_frame.input.plane[i] = picture->data[i]; + xvid_enc_frame.input.stride[i] = picture->linesize[i]; + } + + /* Encoder Flags */ + xvid_enc_frame.vop_flags = x->vop_flags; + xvid_enc_frame.vol_flags = x->vol_flags; + xvid_enc_frame.motion = x->me_flags; + xvid_enc_frame.type = + picture->pict_type == AV_PICTURE_TYPE_I ? XVID_TYPE_IVOP : + picture->pict_type == AV_PICTURE_TYPE_P ? XVID_TYPE_PVOP : + picture->pict_type == AV_PICTURE_TYPE_B ? XVID_TYPE_BVOP : + XVID_TYPE_AUTO; + + /* Pixel aspect ratio setting */ + if (avctx->sample_aspect_ratio.num < 1 || avctx->sample_aspect_ratio.num > 255 || + avctx->sample_aspect_ratio.den < 1 || avctx->sample_aspect_ratio.den > 255) { + av_log(avctx, AV_LOG_ERROR, "Invalid pixel aspect ratio %i/%i\n", + avctx->sample_aspect_ratio.num, avctx->sample_aspect_ratio.den); + return -1; + } + xvid_enc_frame.par = XVID_PAR_EXT; + xvid_enc_frame.par_width = avctx->sample_aspect_ratio.num; + xvid_enc_frame.par_height = avctx->sample_aspect_ratio.den; + + /* Quant Setting */ + if( x->qscale ) xvid_enc_frame.quant = picture->quality / FF_QP2LAMBDA; + else xvid_enc_frame.quant = 0; + + /* Matrices */ + xvid_enc_frame.quant_intra_matrix = x->intra_matrix; + xvid_enc_frame.quant_inter_matrix = x->inter_matrix; + + /* Encode */ + xerr = xvid_encore(x->encoder_handle, XVID_ENC_ENCODE, + &xvid_enc_frame, &xvid_enc_stats); + + /* Two-pass log buffer swapping */ + avctx->stats_out = NULL; + if( x->twopassbuffer ) { + tmp = x->old_twopassbuffer; + x->old_twopassbuffer = x->twopassbuffer; + x->twopassbuffer = tmp; + x->twopassbuffer[0] = 0; + if( x->old_twopassbuffer[0] != 0 ) { + avctx->stats_out = x->old_twopassbuffer; + } + } + + if (xerr > 0) { + *got_packet = 1; + + p->quality = xvid_enc_stats.quant * FF_QP2LAMBDA; + if( xvid_enc_stats.type == XVID_TYPE_PVOP ) + p->pict_type = AV_PICTURE_TYPE_P; + else if( xvid_enc_stats.type == XVID_TYPE_BVOP ) + p->pict_type = AV_PICTURE_TYPE_B; + else if( xvid_enc_stats.type == XVID_TYPE_SVOP ) + p->pict_type = AV_PICTURE_TYPE_S; + else + p->pict_type = AV_PICTURE_TYPE_I; + if( xvid_enc_frame.out_flags & XVID_KEYFRAME ) { + p->key_frame = 1; + pkt->flags |= AV_PKT_FLAG_KEY; + if( x->quicktime_format ) + return xvid_strip_vol_header(avctx, pkt, + xvid_enc_stats.hlength, xerr); + } else + p->key_frame = 0; + + pkt->size = xerr; + + return 0; + } else { + if (!user_packet) + av_free_packet(pkt); + if (!xerr) + return 0; + av_log(avctx, AV_LOG_ERROR, "Xvid: Encoding Error Occurred: %i\n", xerr); + return -1; + } +} + +/** + * Destroy the private context for the encoder. + * All buffers are freed, and the Xvid encoder context is destroyed. + * + * @param avctx AVCodecContext pointer to context + * @return Returns 0, success guaranteed + */ +static av_cold int xvid_encode_close(AVCodecContext *avctx) { + struct xvid_context *x = avctx->priv_data; + + xvid_encore(x->encoder_handle, XVID_ENC_DESTROY, NULL, NULL); + + av_freep(&avctx->extradata); + if( x->twopassbuffer != NULL ) { + av_free(x->twopassbuffer); + av_free(x->old_twopassbuffer); + } + av_free(x->twopassfile); + av_free(x->intra_matrix); + av_free(x->inter_matrix); + + return 0; +} + +/** + * Xvid codec definition for libavcodec. + */ +AVCodec ff_libxvid_encoder = { + .name = "libxvid", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_MPEG4, + .priv_data_size = sizeof(struct xvid_context), + .init = xvid_encode_init, + .encode2 = xvid_encode_frame, + .close = xvid_encode_close, + .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_YUV420P, PIX_FMT_NONE }, + .long_name = NULL_IF_CONFIG_SMALL("libxvidcore MPEG-4 part 2"), +}; diff --git a/libavcodec/libxvid.h b/libavcodec/libxvid.h new file mode 100644 index 0000000000..413d3537f2 --- /dev/null +++ b/libavcodec/libxvid.h @@ -0,0 +1,32 @@ +/* + * copyright (C) 2006 Corey Hickey + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_LIBXVID_H +#define AVCODEC_LIBXVID_H + +/** + * @file + * common functions for use with the Xvid wrappers + */ + + +int ff_tempfile(const char *prefix, char **filename); + +#endif /* AVCODEC_LIBXVID_H */ diff --git a/libavcodec/libxvid_internal.h b/libavcodec/libxvid_internal.h deleted file mode 100644 index a2dc6ef50c..0000000000 --- a/libavcodec/libxvid_internal.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * copyright (C) 2006 Corey Hickey - * - * This file is part of Libav. - * - * Libav is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * Libav is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef AVCODEC_LIBXVID_INTERNAL_H -#define AVCODEC_LIBXVID_INTERNAL_H - -/** - * @file - * common functions for use with the Xvid wrappers - */ - - -int ff_tempfile(const char *prefix, char **filename); - -#endif /* AVCODEC_LIBXVID_INTERNAL_H */ diff --git a/libavcodec/libxvid_rc.c b/libavcodec/libxvid_rc.c index 959edd49b4..bf9f6f0738 100644 --- a/libavcodec/libxvid_rc.c +++ b/libavcodec/libxvid_rc.c @@ -28,7 +28,7 @@ #endif #include "avcodec.h" -#include "libxvid_internal.h" +#include "libxvid.h" //#include "dsputil.h" #include "mpegvideo.h" diff --git a/libavcodec/libxvidff.c b/libavcodec/libxvidff.c deleted file mode 100644 index e95bb7d3b9..0000000000 --- a/libavcodec/libxvidff.c +++ /dev/null @@ -1,788 +0,0 @@ -/* - * Interface to xvidcore for mpeg4 encoding - * Copyright (c) 2004 Adam Thayer - * - * This file is part of Libav. - * - * Libav is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * Libav is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/** - * @file - * Interface to xvidcore for MPEG-4 compliant encoding. - * @author Adam Thayer (krevnik@comcast.net) - */ - -#include -#include -#include "avcodec.h" -#include "libavutil/cpu.h" -#include "libavutil/intreadwrite.h" -#include "libavutil/mathematics.h" -#include "libxvid_internal.h" -#include "mpegvideo.h" - -/** - * Buffer management macros. - */ -#define BUFFER_SIZE 1024 -#define BUFFER_REMAINING(x) (BUFFER_SIZE - strlen(x)) -#define BUFFER_CAT(x) (&((x)[strlen(x)])) - -/** - * Structure for the private Xvid context. - * This stores all the private context for the codec. - */ -struct xvid_context { - void *encoder_handle; /**< Handle for Xvid encoder */ - int xsize; /**< Frame x size */ - int ysize; /**< Frame y size */ - int vop_flags; /**< VOP flags for Xvid encoder */ - int vol_flags; /**< VOL flags for Xvid encoder */ - int me_flags; /**< Motion Estimation flags */ - int qscale; /**< Do we use constant scale? */ - int quicktime_format; /**< Are we in a QT-based format? */ - AVFrame encoded_picture; /**< Encoded frame information */ - char *twopassbuffer; /**< Character buffer for two-pass */ - char *old_twopassbuffer; /**< Old character buffer (two-pass) */ - char *twopassfile; /**< second pass temp file name */ - unsigned char *intra_matrix; /**< P-Frame Quant Matrix */ - unsigned char *inter_matrix; /**< I-Frame Quant Matrix */ -}; - -/** - * Structure for the private first-pass plugin. - */ -struct xvid_ff_pass1 { - int version; /**< Xvid version */ - struct xvid_context *context; /**< Pointer to private context */ -}; - -/* - * Xvid 2-Pass Kludge Section - * - * Xvid's default 2-pass doesn't allow us to create data as we need to, so - * this section spends time replacing the first pass plugin so we can write - * statistic information as libavcodec requests in. We have another kludge - * that allows us to pass data to the second pass in Xvid without a custom - * rate-control plugin. - */ - -/** - * Initialize the two-pass plugin and context. - * - * @param param Input construction parameter structure - * @param handle Private context handle - * @return Returns XVID_ERR_xxxx on failure, or 0 on success. - */ -static int xvid_ff_2pass_create(xvid_plg_create_t * param, - void ** handle) { - struct xvid_ff_pass1 *x = (struct xvid_ff_pass1 *)param->param; - char *log = x->context->twopassbuffer; - - /* Do a quick bounds check */ - if( log == NULL ) - return XVID_ERR_FAIL; - - /* We use snprintf() */ - /* This is because we can safely prevent a buffer overflow */ - log[0] = 0; - snprintf(log, BUFFER_REMAINING(log), - "# avconv 2-pass log file, using xvid codec\n"); - snprintf(BUFFER_CAT(log), BUFFER_REMAINING(log), - "# Do not modify. libxvidcore version: %d.%d.%d\n\n", - XVID_VERSION_MAJOR(XVID_VERSION), - XVID_VERSION_MINOR(XVID_VERSION), - XVID_VERSION_PATCH(XVID_VERSION)); - - *handle = x->context; - return 0; -} - -/** - * Destroy the two-pass plugin context. - * - * @param ref Context pointer for the plugin - * @param param Destrooy context - * @return Returns 0, success guaranteed - */ -static int xvid_ff_2pass_destroy(struct xvid_context *ref, - xvid_plg_destroy_t *param) { - /* Currently cannot think of anything to do on destruction */ - /* Still, the framework should be here for reference/use */ - if( ref->twopassbuffer != NULL ) - ref->twopassbuffer[0] = 0; - return 0; -} - -/** - * Enable fast encode mode during the first pass. - * - * @param ref Context pointer for the plugin - * @param param Frame data - * @return Returns 0, success guaranteed - */ -static int xvid_ff_2pass_before(struct xvid_context *ref, - xvid_plg_data_t *param) { - int motion_remove; - int motion_replacements; - int vop_remove; - - /* Nothing to do here, result is changed too much */ - if( param->zone && param->zone->mode == XVID_ZONE_QUANT ) - return 0; - - /* We can implement a 'turbo' first pass mode here */ - param->quant = 2; - - /* Init values */ - motion_remove = ~XVID_ME_CHROMA_PVOP & - ~XVID_ME_CHROMA_BVOP & - ~XVID_ME_EXTSEARCH16 & - ~XVID_ME_ADVANCEDDIAMOND16; - motion_replacements = XVID_ME_FAST_MODEINTERPOLATE | - XVID_ME_SKIP_DELTASEARCH | - XVID_ME_FASTREFINE16 | - XVID_ME_BFRAME_EARLYSTOP; - vop_remove = ~XVID_VOP_MODEDECISION_RD & - ~XVID_VOP_FAST_MODEDECISION_RD & - ~XVID_VOP_TRELLISQUANT & - ~XVID_VOP_INTER4V & - ~XVID_VOP_HQACPRED; - - param->vol_flags &= ~XVID_VOL_GMC; - param->vop_flags &= vop_remove; - param->motion_flags &= motion_remove; - param->motion_flags |= motion_replacements; - - return 0; -} - -/** - * Capture statistic data and write it during first pass. - * - * @param ref Context pointer for the plugin - * @param param Statistic data - * @return Returns XVID_ERR_xxxx on failure, or 0 on success - */ -static int xvid_ff_2pass_after(struct xvid_context *ref, - xvid_plg_data_t *param) { - char *log = ref->twopassbuffer; - const char *frame_types = " ipbs"; - char frame_type; - - /* Quick bounds check */ - if( log == NULL ) - return XVID_ERR_FAIL; - - /* Convert the type given to us into a character */ - if( param->type < 5 && param->type > 0 ) { - frame_type = frame_types[param->type]; - } else { - return XVID_ERR_FAIL; - } - - snprintf(BUFFER_CAT(log), BUFFER_REMAINING(log), - "%c %d %d %d %d %d %d\n", - frame_type, param->stats.quant, param->stats.kblks, param->stats.mblks, - param->stats.ublks, param->stats.length, param->stats.hlength); - - return 0; -} - -/** - * Dispatch function for our custom plugin. - * This handles the dispatch for the Xvid plugin. It passes data - * on to other functions for actual processing. - * - * @param ref Context pointer for the plugin - * @param cmd The task given for us to complete - * @param p1 First parameter (varies) - * @param p2 Second parameter (varies) - * @return Returns XVID_ERR_xxxx on failure, or 0 on success - */ -static int xvid_ff_2pass(void *ref, int cmd, void *p1, void *p2) -{ - switch( cmd ) { - case XVID_PLG_INFO: - case XVID_PLG_FRAME: - return 0; - - case XVID_PLG_BEFORE: - return xvid_ff_2pass_before(ref, p1); - - case XVID_PLG_CREATE: - return xvid_ff_2pass_create(p1, p2); - - case XVID_PLG_AFTER: - return xvid_ff_2pass_after(ref, p1); - - case XVID_PLG_DESTROY: - return xvid_ff_2pass_destroy(ref, p1); - - default: - return XVID_ERR_FAIL; - } -} - -/** - * Routine to create a global VO/VOL header for MP4 container. - * What we do here is extract the header from the Xvid bitstream - * as it is encoded. We also strip the repeated headers from the - * bitstream when a global header is requested for MPEG-4 ISO - * compliance. - * - * @param avctx AVCodecContext pointer to context - * @param frame Pointer to encoded frame data - * @param header_len Length of header to search - * @param frame_len Length of encoded frame data - * @return Returns new length of frame data - */ -static int xvid_strip_vol_header(AVCodecContext *avctx, - AVPacket *pkt, - unsigned int header_len, - unsigned int frame_len) { - int vo_len = 0, i; - - for( i = 0; i < header_len - 3; i++ ) { - if( pkt->data[i] == 0x00 && - pkt->data[i+1] == 0x00 && - pkt->data[i+2] == 0x01 && - pkt->data[i+3] == 0xB6 ) { - vo_len = i; - break; - } - } - - if( vo_len > 0 ) { - /* We need to store the header, so extract it */ - if( avctx->extradata == NULL ) { - avctx->extradata = av_malloc(vo_len); - memcpy(avctx->extradata, pkt->data, vo_len); - avctx->extradata_size = vo_len; - } - /* Less dangerous now, memmove properly copies the two - chunks of overlapping data */ - memmove(pkt->data, &pkt->data[vo_len], frame_len - vo_len); - pkt->size = frame_len - vo_len; - } - return 0; -} - -/** - * Routine to correct a possibly erroneous framerate being fed to us. - * Xvid currently chokes on framerates where the ticks per frame is - * extremely large. This function works to correct problems in this area - * by estimating a new framerate and taking the simpler fraction of - * the two presented. - * - * @param avctx Context that contains the framerate to correct. - */ -static void xvid_correct_framerate(AVCodecContext *avctx) -{ - int frate, fbase; - int est_frate, est_fbase; - int gcd; - float est_fps, fps; - - frate = avctx->time_base.den; - fbase = avctx->time_base.num; - - gcd = av_gcd(frate, fbase); - if( gcd > 1 ) { - frate /= gcd; - fbase /= gcd; - } - - if( frate <= 65000 && fbase <= 65000 ) { - avctx->time_base.den = frate; - avctx->time_base.num = fbase; - return; - } - - fps = (float)frate / (float)fbase; - est_fps = roundf(fps * 1000.0) / 1000.0; - - est_frate = (int)est_fps; - if( est_fps > (int)est_fps ) { - est_frate = (est_frate + 1) * 1000; - est_fbase = (int)roundf((float)est_frate / est_fps); - } else - est_fbase = 1; - - gcd = av_gcd(est_frate, est_fbase); - if( gcd > 1 ) { - est_frate /= gcd; - est_fbase /= gcd; - } - - if( fbase > est_fbase ) { - avctx->time_base.den = est_frate; - avctx->time_base.num = est_fbase; - av_log(avctx, AV_LOG_DEBUG, - "Xvid: framerate re-estimated: %.2f, %.3f%% correction\n", - est_fps, (((est_fps - fps)/fps) * 100.0)); - } else { - avctx->time_base.den = frate; - avctx->time_base.num = fbase; - } -} - -/** - * Create the private context for the encoder. - * All buffers are allocated, settings are loaded from the user, - * and the encoder context created. - * - * @param avctx AVCodecContext pointer to context - * @return Returns 0 on success, -1 on failure - */ -static av_cold int xvid_encode_init(AVCodecContext *avctx) { - int xerr, i; - int xvid_flags = avctx->flags; - struct xvid_context *x = avctx->priv_data; - uint16_t *intra, *inter; - int fd; - - xvid_plugin_single_t single = { 0 }; - struct xvid_ff_pass1 rc2pass1 = { 0 }; - xvid_plugin_2pass2_t rc2pass2 = { 0 }; - xvid_gbl_init_t xvid_gbl_init = { 0 }; - xvid_enc_create_t xvid_enc_create = { 0 }; - xvid_enc_plugin_t plugins[7]; - - /* Bring in VOP flags from avconv command-line */ - x->vop_flags = XVID_VOP_HALFPEL; /* Bare minimum quality */ - if( xvid_flags & CODEC_FLAG_4MV ) - x->vop_flags |= XVID_VOP_INTER4V; /* Level 3 */ - if( avctx->trellis - ) - x->vop_flags |= XVID_VOP_TRELLISQUANT; /* Level 5 */ - if( xvid_flags & CODEC_FLAG_AC_PRED ) - x->vop_flags |= XVID_VOP_HQACPRED; /* Level 6 */ - if( xvid_flags & CODEC_FLAG_GRAY ) - x->vop_flags |= XVID_VOP_GREYSCALE; - - /* Decide which ME quality setting to use */ - x->me_flags = 0; - switch( avctx->me_method ) { - case ME_FULL: /* Quality 6 */ - x->me_flags |= XVID_ME_EXTSEARCH16 - | XVID_ME_EXTSEARCH8; - - case ME_EPZS: /* Quality 4 */ - x->me_flags |= XVID_ME_ADVANCEDDIAMOND8 - | XVID_ME_HALFPELREFINE8 - | XVID_ME_CHROMA_PVOP - | XVID_ME_CHROMA_BVOP; - - case ME_LOG: /* Quality 2 */ - case ME_PHODS: - case ME_X1: - x->me_flags |= XVID_ME_ADVANCEDDIAMOND16 - | XVID_ME_HALFPELREFINE16; - - case ME_ZERO: /* Quality 0 */ - default: - break; - } - - /* Decide how we should decide blocks */ - switch( avctx->mb_decision ) { - case 2: - x->vop_flags |= XVID_VOP_MODEDECISION_RD; - x->me_flags |= XVID_ME_HALFPELREFINE8_RD - | XVID_ME_QUARTERPELREFINE8_RD - | XVID_ME_EXTSEARCH_RD - | XVID_ME_CHECKPREDICTION_RD; - case 1: - if( !(x->vop_flags & XVID_VOP_MODEDECISION_RD) ) - x->vop_flags |= XVID_VOP_FAST_MODEDECISION_RD; - x->me_flags |= XVID_ME_HALFPELREFINE16_RD - | XVID_ME_QUARTERPELREFINE16_RD; - - default: - break; - } - - /* Bring in VOL flags from avconv command-line */ - x->vol_flags = 0; - if( xvid_flags & CODEC_FLAG_GMC ) { - x->vol_flags |= XVID_VOL_GMC; - x->me_flags |= XVID_ME_GME_REFINE; - } - if( xvid_flags & CODEC_FLAG_QPEL ) { - x->vol_flags |= XVID_VOL_QUARTERPEL; - x->me_flags |= XVID_ME_QUARTERPELREFINE16; - if( x->vop_flags & XVID_VOP_INTER4V ) - x->me_flags |= XVID_ME_QUARTERPELREFINE8; - } - - xvid_gbl_init.version = XVID_VERSION; - xvid_gbl_init.debug = 0; - -#if ARCH_PPC - /* Xvid's PPC support is borked, use libavcodec to detect */ -#if HAVE_ALTIVEC - if (av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC) { - xvid_gbl_init.cpu_flags = XVID_CPU_FORCE | XVID_CPU_ALTIVEC; - } else -#endif - xvid_gbl_init.cpu_flags = XVID_CPU_FORCE; -#else - /* Xvid can detect on x86 */ - xvid_gbl_init.cpu_flags = 0; -#endif - - /* Initialize */ - xvid_global(NULL, XVID_GBL_INIT, &xvid_gbl_init, NULL); - - /* Create the encoder reference */ - xvid_enc_create.version = XVID_VERSION; - - /* Store the desired frame size */ - xvid_enc_create.width = x->xsize = avctx->width; - xvid_enc_create.height = x->ysize = avctx->height; - - /* Xvid can determine the proper profile to use */ - /* xvid_enc_create.profile = XVID_PROFILE_S_L3; */ - - /* We don't use zones */ - xvid_enc_create.zones = NULL; - xvid_enc_create.num_zones = 0; - - xvid_enc_create.num_threads = avctx->thread_count; - - xvid_enc_create.plugins = plugins; - xvid_enc_create.num_plugins = 0; - - /* Initialize Buffers */ - x->twopassbuffer = NULL; - x->old_twopassbuffer = NULL; - x->twopassfile = NULL; - - if( xvid_flags & CODEC_FLAG_PASS1 ) { - rc2pass1.version = XVID_VERSION; - rc2pass1.context = x; - x->twopassbuffer = av_malloc(BUFFER_SIZE); - x->old_twopassbuffer = av_malloc(BUFFER_SIZE); - if( x->twopassbuffer == NULL || x->old_twopassbuffer == NULL ) { - av_log(avctx, AV_LOG_ERROR, - "Xvid: Cannot allocate 2-pass log buffers\n"); - return -1; - } - x->twopassbuffer[0] = x->old_twopassbuffer[0] = 0; - - plugins[xvid_enc_create.num_plugins].func = xvid_ff_2pass; - plugins[xvid_enc_create.num_plugins].param = &rc2pass1; - xvid_enc_create.num_plugins++; - } else if( xvid_flags & CODEC_FLAG_PASS2 ) { - rc2pass2.version = XVID_VERSION; - rc2pass2.bitrate = avctx->bit_rate; - - fd = ff_tempfile("xvidff.", &x->twopassfile); - if( fd == -1 ) { - av_log(avctx, AV_LOG_ERROR, - "Xvid: Cannot write 2-pass pipe\n"); - return -1; - } - - if( avctx->stats_in == NULL ) { - av_log(avctx, AV_LOG_ERROR, - "Xvid: No 2-pass information loaded for second pass\n"); - return -1; - } - - if( strlen(avctx->stats_in) > - write(fd, avctx->stats_in, strlen(avctx->stats_in)) ) { - close(fd); - av_log(avctx, AV_LOG_ERROR, - "Xvid: Cannot write to 2-pass pipe\n"); - return -1; - } - - close(fd); - rc2pass2.filename = x->twopassfile; - plugins[xvid_enc_create.num_plugins].func = xvid_plugin_2pass2; - plugins[xvid_enc_create.num_plugins].param = &rc2pass2; - xvid_enc_create.num_plugins++; - } else if( !(xvid_flags & CODEC_FLAG_QSCALE) ) { - /* Single Pass Bitrate Control! */ - single.version = XVID_VERSION; - single.bitrate = avctx->bit_rate; - - plugins[xvid_enc_create.num_plugins].func = xvid_plugin_single; - plugins[xvid_enc_create.num_plugins].param = &single; - xvid_enc_create.num_plugins++; - } - - /* Luminance Masking */ - if( 0.0 != avctx->lumi_masking ) { - plugins[xvid_enc_create.num_plugins].func = xvid_plugin_lumimasking; - plugins[xvid_enc_create.num_plugins].param = NULL; - xvid_enc_create.num_plugins++; - } - - /* Frame Rate and Key Frames */ - xvid_correct_framerate(avctx); - xvid_enc_create.fincr = avctx->time_base.num; - xvid_enc_create.fbase = avctx->time_base.den; - if( avctx->gop_size > 0 ) - xvid_enc_create.max_key_interval = avctx->gop_size; - else - xvid_enc_create.max_key_interval = 240; /* Xvid's best default */ - - /* Quants */ - if( xvid_flags & CODEC_FLAG_QSCALE ) x->qscale = 1; - else x->qscale = 0; - - xvid_enc_create.min_quant[0] = avctx->qmin; - xvid_enc_create.min_quant[1] = avctx->qmin; - xvid_enc_create.min_quant[2] = avctx->qmin; - xvid_enc_create.max_quant[0] = avctx->qmax; - xvid_enc_create.max_quant[1] = avctx->qmax; - xvid_enc_create.max_quant[2] = avctx->qmax; - - /* Quant Matrices */ - x->intra_matrix = x->inter_matrix = NULL; - if( avctx->mpeg_quant ) - x->vol_flags |= XVID_VOL_MPEGQUANT; - if( (avctx->intra_matrix || avctx->inter_matrix) ) { - x->vol_flags |= XVID_VOL_MPEGQUANT; - - if( avctx->intra_matrix ) { - intra = avctx->intra_matrix; - x->intra_matrix = av_malloc(sizeof(unsigned char) * 64); - } else - intra = NULL; - if( avctx->inter_matrix ) { - inter = avctx->inter_matrix; - x->inter_matrix = av_malloc(sizeof(unsigned char) * 64); - } else - inter = NULL; - - for( i = 0; i < 64; i++ ) { - if( intra ) - x->intra_matrix[i] = (unsigned char)intra[i]; - if( inter ) - x->inter_matrix[i] = (unsigned char)inter[i]; - } - } - - /* Misc Settings */ - xvid_enc_create.frame_drop_ratio = 0; - xvid_enc_create.global = 0; - if( xvid_flags & CODEC_FLAG_CLOSED_GOP ) - xvid_enc_create.global |= XVID_GLOBAL_CLOSED_GOP; - - /* Determines which codec mode we are operating in */ - avctx->extradata = NULL; - avctx->extradata_size = 0; - if( xvid_flags & CODEC_FLAG_GLOBAL_HEADER ) { - /* In this case, we are claiming to be MPEG4 */ - x->quicktime_format = 1; - avctx->codec_id = CODEC_ID_MPEG4; - } else { - /* We are claiming to be Xvid */ - x->quicktime_format = 0; - if(!avctx->codec_tag) - avctx->codec_tag = AV_RL32("xvid"); - } - - /* Bframes */ - xvid_enc_create.max_bframes = avctx->max_b_frames; - xvid_enc_create.bquant_offset = 100 * avctx->b_quant_offset; - xvid_enc_create.bquant_ratio = 100 * avctx->b_quant_factor; - if( avctx->max_b_frames > 0 && !x->quicktime_format ) xvid_enc_create.global |= XVID_GLOBAL_PACKED; - - /* Create encoder context */ - xerr = xvid_encore(NULL, XVID_ENC_CREATE, &xvid_enc_create, NULL); - if( xerr ) { - av_log(avctx, AV_LOG_ERROR, "Xvid: Could not create encoder reference\n"); - return -1; - } - - x->encoder_handle = xvid_enc_create.handle; - avctx->coded_frame = &x->encoded_picture; - - return 0; -} - -/** - * Encode a single frame. - * - * @param avctx AVCodecContext pointer to context - * @param frame Pointer to encoded frame buffer - * @param buf_size Size of encoded frame buffer - * @param data Pointer to AVFrame of unencoded frame - * @return Returns 0 on success, -1 on failure - */ -static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt, - const AVFrame *picture, int *got_packet) -{ - int xerr, i, ret, user_packet = !!pkt->data; - char *tmp; - struct xvid_context *x = avctx->priv_data; - AVFrame *p = &x->encoded_picture; - int mb_width = (avctx->width + 15) / 16; - int mb_height = (avctx->height + 15) / 16; - - xvid_enc_frame_t xvid_enc_frame = { 0 }; - xvid_enc_stats_t xvid_enc_stats = { 0 }; - - if (!user_packet && - (ret = av_new_packet(pkt, mb_width*mb_height*MAX_MB_BYTES + FF_MIN_BUFFER_SIZE)) < 0) { - av_log(avctx, AV_LOG_ERROR, "Error getting output packet.\n"); - return ret; - } - - /* Start setting up the frame */ - xvid_enc_frame.version = XVID_VERSION; - xvid_enc_stats.version = XVID_VERSION; - *p = *picture; - - /* Let Xvid know where to put the frame. */ - xvid_enc_frame.bitstream = pkt->data; - xvid_enc_frame.length = pkt->size; - - /* Initialize input image fields */ - if( avctx->pix_fmt != PIX_FMT_YUV420P ) { - av_log(avctx, AV_LOG_ERROR, "Xvid: Color spaces other than 420p not supported\n"); - return -1; - } - - xvid_enc_frame.input.csp = XVID_CSP_PLANAR; /* YUV420P */ - - for( i = 0; i < 4; i++ ) { - xvid_enc_frame.input.plane[i] = picture->data[i]; - xvid_enc_frame.input.stride[i] = picture->linesize[i]; - } - - /* Encoder Flags */ - xvid_enc_frame.vop_flags = x->vop_flags; - xvid_enc_frame.vol_flags = x->vol_flags; - xvid_enc_frame.motion = x->me_flags; - xvid_enc_frame.type = - picture->pict_type == AV_PICTURE_TYPE_I ? XVID_TYPE_IVOP : - picture->pict_type == AV_PICTURE_TYPE_P ? XVID_TYPE_PVOP : - picture->pict_type == AV_PICTURE_TYPE_B ? XVID_TYPE_BVOP : - XVID_TYPE_AUTO; - - /* Pixel aspect ratio setting */ - if (avctx->sample_aspect_ratio.num < 1 || avctx->sample_aspect_ratio.num > 255 || - avctx->sample_aspect_ratio.den < 1 || avctx->sample_aspect_ratio.den > 255) { - av_log(avctx, AV_LOG_ERROR, "Invalid pixel aspect ratio %i/%i\n", - avctx->sample_aspect_ratio.num, avctx->sample_aspect_ratio.den); - return -1; - } - xvid_enc_frame.par = XVID_PAR_EXT; - xvid_enc_frame.par_width = avctx->sample_aspect_ratio.num; - xvid_enc_frame.par_height = avctx->sample_aspect_ratio.den; - - /* Quant Setting */ - if( x->qscale ) xvid_enc_frame.quant = picture->quality / FF_QP2LAMBDA; - else xvid_enc_frame.quant = 0; - - /* Matrices */ - xvid_enc_frame.quant_intra_matrix = x->intra_matrix; - xvid_enc_frame.quant_inter_matrix = x->inter_matrix; - - /* Encode */ - xerr = xvid_encore(x->encoder_handle, XVID_ENC_ENCODE, - &xvid_enc_frame, &xvid_enc_stats); - - /* Two-pass log buffer swapping */ - avctx->stats_out = NULL; - if( x->twopassbuffer ) { - tmp = x->old_twopassbuffer; - x->old_twopassbuffer = x->twopassbuffer; - x->twopassbuffer = tmp; - x->twopassbuffer[0] = 0; - if( x->old_twopassbuffer[0] != 0 ) { - avctx->stats_out = x->old_twopassbuffer; - } - } - - if (xerr > 0) { - *got_packet = 1; - - p->quality = xvid_enc_stats.quant * FF_QP2LAMBDA; - if( xvid_enc_stats.type == XVID_TYPE_PVOP ) - p->pict_type = AV_PICTURE_TYPE_P; - else if( xvid_enc_stats.type == XVID_TYPE_BVOP ) - p->pict_type = AV_PICTURE_TYPE_B; - else if( xvid_enc_stats.type == XVID_TYPE_SVOP ) - p->pict_type = AV_PICTURE_TYPE_S; - else - p->pict_type = AV_PICTURE_TYPE_I; - if( xvid_enc_frame.out_flags & XVID_KEYFRAME ) { - p->key_frame = 1; - pkt->flags |= AV_PKT_FLAG_KEY; - if( x->quicktime_format ) - return xvid_strip_vol_header(avctx, pkt, - xvid_enc_stats.hlength, xerr); - } else - p->key_frame = 0; - - pkt->size = xerr; - - return 0; - } else { - if (!user_packet) - av_free_packet(pkt); - if (!xerr) - return 0; - av_log(avctx, AV_LOG_ERROR, "Xvid: Encoding Error Occurred: %i\n", xerr); - return -1; - } -} - -/** - * Destroy the private context for the encoder. - * All buffers are freed, and the Xvid encoder context is destroyed. - * - * @param avctx AVCodecContext pointer to context - * @return Returns 0, success guaranteed - */ -static av_cold int xvid_encode_close(AVCodecContext *avctx) { - struct xvid_context *x = avctx->priv_data; - - xvid_encore(x->encoder_handle, XVID_ENC_DESTROY, NULL, NULL); - - av_freep(&avctx->extradata); - if( x->twopassbuffer != NULL ) { - av_free(x->twopassbuffer); - av_free(x->old_twopassbuffer); - } - av_free(x->twopassfile); - av_free(x->intra_matrix); - av_free(x->inter_matrix); - - return 0; -} - -/** - * Xvid codec definition for libavcodec. - */ -AVCodec ff_libxvid_encoder = { - .name = "libxvid", - .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MPEG4, - .priv_data_size = sizeof(struct xvid_context), - .init = xvid_encode_init, - .encode2 = xvid_encode_frame, - .close = xvid_encode_close, - .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_YUV420P, PIX_FMT_NONE }, - .long_name = NULL_IF_CONFIG_SMALL("libxvidcore MPEG-4 part 2"), -}; -- cgit v1.2.3