Merge commit 'd488c3bcbaf7ddda42597e014deb661a7e9e2112'

* commit 'd488c3bcbaf7ddda42597e014deb661a7e9e2112':
  configure: support Bitrig OS
  yuv2rgb: handle line widths that are not a multiple of 4.
  graph2dot: Use the fallback getopt implementation if needed
  tools: Include io.h for open/read/write/close if unistd.h doesn't exist
  testprogs: Remove unused includes
  qt-faststart: Use other seek/tell functions on MSVC than on mingw
  ismindex: Include direct.h for _mkdir on windows
  sdp: Use static const char arrays instead of pointers to strings
  x86: avcodec: Drop silly "_mmx" suffixes from filenames
  x86: avcodec: Drop silly "_sse" suffixes from filenames
  sdp: Include profile-level-id for H264
  utvideoenc: use ff_huff_gen_len_table
  huffman: add ff_huff_gen_len_table
  cllc: simplify/fix swapped data buffer allocation.
  rtpdec_h264: Don't set the pixel format
  h264: Check that the codec isn't null before accessing it
  audio_frame_queue: Define af_queue_log_state before using it

Conflicts:
	libavcodec/audio_frame_queue.c
	libavcodec/h264.c
	libavcodec/huffman.h
	libavcodec/huffyuv.c
	libavcodec/utvideoenc.c
	libavcodec/x86/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-08-29 17:46:10 +02:00
commit 1c66807636
29 changed files with 178 additions and 100 deletions

1
configure vendored
View File

@ -1552,6 +1552,7 @@ eatqi_decoder_select="aandcttables error_resilience mpegvideo"
exr_decoder_select="zlib"
ffv1_decoder_select="golomb rangecoder"
ffv1_encoder_select="rangecoder"
ffvhuff_encoder_select="huffman"
flac_decoder_select="golomb"
flac_encoder_select="golomb lpc"
flashsv_decoder_select="zlib"

View File

@ -40,6 +40,22 @@ void ff_af_queue_close(AudioFrameQueue *afq)
memset(afq, 0, sizeof(*afq));
}
#ifdef DEBUG
static void af_queue_log_state(AudioFrameQueue *afq)
{
AudioFrame *f;
av_dlog(afq->avctx, "remaining delay = %d\n", afq->remaining_delay);
av_dlog(afq->avctx, "remaining samples = %d\n", afq->remaining_samples);
av_dlog(afq->avctx, "frames:\n");
f = afq->frame_queue;
while (f) {
av_dlog(afq->avctx, " [ pts=%9"PRId64" duration=%d ]\n",
f->pts, f->duration);
f = f->next;
}
}
#endif /* DEBUG */
int ff_af_queue_add(AudioFrameQueue *afq, const AVFrame *f)
{
AudioFrame *new = av_fast_realloc(afq->frames, &afq->frame_alloc, sizeof(*afq->frames)*(afq->frame_count+1));
@ -108,4 +124,3 @@ void ff_af_queue_remove(AudioFrameQueue *afq, int nb_samples, int64_t *pts,
if (duration)
*duration = ff_samples_to_time_base(afq->avctx, removed_samples);
}

View File

@ -31,6 +31,63 @@
/* symbol for Huffman tree node */
#define HNODE -1
typedef struct {
uint64_t val;
int name;
} HeapElem;
static void heap_sift(HeapElem *h, int root, int size)
{
while (root * 2 + 1 < size) {
int child = root * 2 + 1;
if (child < size - 1 && h[child].val > h[child+1].val)
child++;
if (h[root].val > h[child].val) {
FFSWAP(HeapElem, h[root], h[child]);
root = child;
} else
break;
}
}
void ff_huff_gen_len_table(uint8_t *dst, const uint64_t *stats)
{
HeapElem h[256];
int up[2*256];
int len[2*256];
int offset, i, next;
int size = 256;
for (offset = 1; ; offset <<= 1) {
for (i=0; i < size; i++) {
h[i].name = i;
h[i].val = (stats[i] << 8) + offset;
}
for (i = size / 2 - 1; i >= 0; i--)
heap_sift(h, i, size);
for (next = size; next < size * 2 - 1; next++) {
// merge the two smallest entries, and put it back in the heap
uint64_t min1v = h[0].val;
up[h[0].name] = next;
h[0].val = INT64_MAX;
heap_sift(h, 0, size);
up[h[0].name] = next;
h[0].name = next;
h[0].val += min1v;
heap_sift(h, 0, size);
}
len[2 * size - 2] = 0;
for (i = 2 * size - 3; i >= size; i--)
len[i] = len[up[i]] + 1;
for (i = 0; i < size; i++) {
dst[i] = len[up[i]] + 1;
if (dst[i] >= 32) break;
}
if (i==size) break;
}
}
static void get_tree_codes(uint32_t *bits, int16_t *lens, uint8_t *xlat,
Node *nodes, int node,
@ -117,60 +174,3 @@ int ff_huff_build_tree(AVCodecContext *avctx, VLC *vlc, int nb_codes,
}
return 0;
}
typedef struct {
uint64_t val;
int name;
} HeapElem;
static void heap_sift(HeapElem *h, int root, int size)
{
while(root*2+1 < size) {
int child = root*2+1;
if(child < size-1 && h[child].val > h[child+1].val)
child++;
if(h[root].val > h[child].val) {
FFSWAP(HeapElem, h[root], h[child]);
root = child;
} else
break;
}
}
void ff_generate_len_table(uint8_t *dst, const uint64_t *stats){
HeapElem h[256];
int up[2*256];
int len[2*256];
int offset, i, next;
int size = 256;
for(offset=1; ; offset<<=1){
for(i=0; i<size; i++){
h[i].name = i;
h[i].val = (stats[i] << 8) + offset;
}
for(i=size/2-1; i>=0; i--)
heap_sift(h, i, size);
for(next=size; next<size*2-1; next++){
// merge the two smallest entries, and put it back in the heap
uint64_t min1v = h[0].val;
up[h[0].name] = next;
h[0].val = INT64_MAX;
heap_sift(h, 0, size);
up[h[0].name] = next;
h[0].name = next;
h[0].val += min1v;
heap_sift(h, 0, size);
}
len[2*size-2] = 0;
for(i=2*size-3; i>=size; i--)
len[i] = len[up[i]] + 1;
for(i=0; i<size; i++) {
dst[i] = len[up[i]] + 1;
if(dst[i] >= 32) break;
}
if(i==size) break;
}
}

View File

@ -42,6 +42,6 @@ typedef int (*HuffCmp)(const void *va, const void *vb);
int ff_huff_build_tree(AVCodecContext *avctx, VLC *vlc, int nb_codes,
Node *nodes, HuffCmp cmp, int flags);
void ff_generate_len_table(uint8_t *dst, const uint64_t *stats);
void ff_huff_gen_len_table(uint8_t *dst, const uint64_t *stats);
#endif /* AVCODEC_HUFFMAN_H */

View File

@ -676,7 +676,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
}
for (i = 0; i < 3; i++) {
ff_generate_len_table(s->len[i], s->stats[i]);
ff_huff_gen_len_table(s->len[i], s->stats[i]);
if (generate_bits_table(s->bits[i], s->len[i]) < 0) {
return -1;
@ -1286,7 +1286,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
if (s->context) {
for (i = 0; i < 3; i++) {
ff_generate_len_table(s->len[i], s->stats[i]);
ff_huff_gen_len_table(s->len[i], s->stats[i]);
if (generate_bits_table(s->bits[i], s->len[i]) < 0)
return -1;
size += store_table(s, s->len[i], &pkt->data[size]);

View File

@ -26,8 +26,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/time.h>
#include <unistd.h>
#include "config.h"
#include "dsputil.h"

View File

@ -441,7 +441,7 @@ static int encode_plane(AVCodecContext *avctx, uint8_t *src,
}
/* Calculate huffman lengths */
ff_generate_len_table(lengths, counts);
ff_huff_gen_len_table(lengths, counts);
/*
* Write the plane's header into the output packet:

View File

@ -4,26 +4,26 @@ OBJS-$(CONFIG_VP3DSP) += x86/vp3dsp_init.o
OBJS-$(CONFIG_XMM_CLOBBER_TEST) += x86/w64xmmtest.o
MMX-OBJS += x86/dsputil_mmx.o \
x86/fdct_mmx.o \
x86/fdct.o \
x86/fmtconvert_init.o \
x86/idct_mmx_xvid.o \
x86/idct_sse2_xvid.o \
x86/motion_est_mmx.o \
x86/simple_idct_mmx.o \
x86/motion_est.o \
x86/simple_idct.o \
MMX-OBJS-$(CONFIG_AAC_DECODER) += x86/sbrdsp_init.o
MMX-OBJS-$(CONFIG_AC3DSP) += x86/ac3dsp_init.o
MMX-OBJS-$(CONFIG_CAVS_DECODER) += x86/cavsdsp_mmx.o
MMX-OBJS-$(CONFIG_CAVS_DECODER) += x86/cavsdsp.o
MMX-OBJS-$(CONFIG_DNXHD_ENCODER) += x86/dnxhdenc.o
MMX-OBJS-$(CONFIG_DWT) += x86/snowdsp_mmx.o \
MMX-OBJS-$(CONFIG_DWT) += x86/snowdsp.o \
x86/dwt.o
MMX-OBJS-$(CONFIG_ENCODERS) += x86/dsputilenc_mmx.o
MMX-OBJS-$(CONFIG_FFT) += x86/fft_init.o
MMX-OBJS-$(CONFIG_GPL) += x86/idct_mmx.o
MMX-OBJS-$(CONFIG_H264DSP) += x86/h264dsp_init.o
MMX-OBJS-$(CONFIG_H264PRED) += x86/h264_intrapred_init.o
MMX-OBJS-$(CONFIG_LPC) += x86/lpc_mmx.o
MMX-OBJS-$(CONFIG_MPEGAUDIODSP) += x86/mpegaudiodec_mmx.o
MMX-OBJS-$(CONFIG_LPC) += x86/lpc.o
MMX-OBJS-$(CONFIG_MPEGAUDIODSP) += x86/mpegaudiodec.o
MMX-OBJS-$(CONFIG_MPEGVIDEO) += x86/mpegvideo.o
MMX-OBJS-$(CONFIG_MPEGVIDEOENC) += x86/mpegvideoenc.o
MMX-OBJS-$(CONFIG_PNG_DECODER) += x86/pngdsp_init.o
@ -40,11 +40,11 @@ MMX-OBJS-$(CONFIG_VP8_DECODER) += x86/vp8dsp_init.o
YASM-OBJS-$(CONFIG_AAC_DECODER) += x86/sbrdsp.o
YASM-OBJS-$(CONFIG_AC3DSP) += x86/ac3dsp.o
YASM-OBJS-$(CONFIG_DCT) += x86/dct32_sse.o
YASM-OBJS-$(CONFIG_DCT) += x86/dct32.o
YASM-OBJS-$(CONFIG_DIRAC_DECODER) += x86/diracdsp_mmx.o x86/diracdsp_yasm.o
YASM-OBJS-$(CONFIG_DWT) += x86/dwt_yasm.o
YASM-OBJS-$(CONFIG_ENCODERS) += x86/dsputilenc.o
YASM-OBJS-$(CONFIG_FFT) += x86/fft_mmx.o
YASM-OBJS-$(CONFIG_FFT) += x86/fft.o
YASM-OBJS-$(CONFIG_H264CHROMA) += x86/h264_chromamc.o \
x86/h264_chromamc_10bit.o
YASM-OBJS-$(CONFIG_H264DSP) += x86/h264_deblock.o \
@ -56,7 +56,7 @@ YASM-OBJS-$(CONFIG_H264DSP) += x86/h264_deblock.o \
YASM-OBJS-$(CONFIG_H264PRED) += x86/h264_intrapred.o \
x86/h264_intrapred_10bit.o
YASM-OBJS-$(CONFIG_H264QPEL) += x86/h264_qpel_10bit.o
YASM-OBJS-$(CONFIG_MPEGAUDIODSP) += x86/imdct36_sse.o
YASM-OBJS-$(CONFIG_MPEGAUDIODSP) += x86/imdct36.o
YASM-OBJS-$(CONFIG_PNG_DECODER) += x86/pngdsp.o
YASM-OBJS-$(CONFIG_PRORES_DECODER) += x86/proresdsp.o
YASM-OBJS-$(CONFIG_PRORES_LGPL_DECODER) += x86/proresdsp.o

View File

@ -2101,7 +2101,7 @@ PREFETCH(prefetch_3dnow, prefetch)
#endif /* HAVE_INLINE_ASM */
#include "h264_qpel_mmx.c"
#include "h264_qpel.c"
void ff_put_h264_chroma_mc8_mmx_rnd (uint8_t *dst, uint8_t *src,
int stride, int h, int x, int y);

View File

@ -2,20 +2,20 @@
;* 36 point SSE-optimized IMDCT transform
;* Copyright (c) 2011 Vitor Sessak
;*
;* This file is part of Libav.
;* This file is part of FFmpeg.
;*
;* Libav is free software; you can redistribute it and/or
;* FFmpeg 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,
;* FFmpeg 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
;* License along with FFmpeg; if not, write to the Free Software
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

View File

@ -369,7 +369,6 @@ static int parse_h264_sdp_line(AVFormatContext *s, int st_index,
// set our parameters
codec->width = atoi(buf1);
codec->height = atoi(p + 1); // skip the -
codec->pix_fmt = PIX_FMT_YUV420P;
} else if (av_strstart(p, "fmtp:", &p)) {
return ff_parse_fmtp(stream, h264_data, p, sdp_parse_fmtp_config_h264);
} else if (av_strstart(p, "cliprect:", &p)) {

View File

@ -154,9 +154,11 @@ static char *extradata2psets(AVCodecContext *c)
{
char *psets, *p;
const uint8_t *r;
const char *pset_string = "; sprop-parameter-sets=";
static const char pset_string[] = "; sprop-parameter-sets=";
static const char profile_string[] = "; profile-level-id=";
uint8_t *orig_extradata = NULL;
int orig_extradata_size = 0;
const uint8_t *sps = NULL, *sps_end;
if (c->extradata_size > MAX_EXTRADATA_SIZE) {
av_log(c, AV_LOG_ERROR, "Too much extradata!\n");
@ -210,6 +212,10 @@ static char *extradata2psets(AVCodecContext *c)
*p = ',';
p++;
}
if (!sps) {
sps = r;
sps_end = r1;
}
if (av_base64_encode(p, MAX_PSET_SIZE - (p - psets), r, r1 - r) == NULL) {
av_log(c, AV_LOG_ERROR, "Cannot Base64-encode %td %td!\n", MAX_PSET_SIZE - (p - psets), r1 - r);
av_free(psets);
@ -219,6 +225,12 @@ static char *extradata2psets(AVCodecContext *c)
p += strlen(p);
r = r1;
}
if (sps && sps_end - sps >= 4) {
memcpy(p, profile_string, strlen(profile_string));
p += strlen(p);
ff_data_to_hex(p, sps + 1, 3, 0);
p[6] = '\0';
}
if (orig_extradata) {
av_free(c->extradata);
c->extradata = orig_extradata;

View File

@ -20,7 +20,6 @@
#include <stdio.h>
#include <string.h> /* for memset() */
#include <unistd.h>
#include <stdlib.h>
#include <inttypes.h>

View File

@ -149,15 +149,15 @@ const int *sws_getCoefficients(int colorspace)
while (h_size--) { \
int av_unused U, V, Y; \
#define ENDYUV2RGBLINE(dst_delta) \
pu += 4; \
pv += 4; \
py_1 += 8; \
py_2 += 8; \
dst_1 += dst_delta; \
dst_2 += dst_delta; \
#define ENDYUV2RGBLINE(dst_delta, ss) \
pu += 4 >> ss; \
pv += 4 >> ss; \
py_1 += 8 >> ss; \
py_2 += 8 >> ss; \
dst_1 += dst_delta >> ss; \
dst_2 += dst_delta >> ss; \
} \
if (c->dstW & 4) { \
if (c->dstW & (4 >> ss)) { \
int av_unused Y, U, V; \
#define ENDYUV2RGBFUNC() \
@ -167,7 +167,7 @@ const int *sws_getCoefficients(int colorspace)
}
#define CLOSEYUV2RGBFUNC(dst_delta) \
ENDYUV2RGBLINE(dst_delta) \
ENDYUV2RGBLINE(dst_delta, 0) \
ENDYUV2RGBFUNC()
YUV2RGBFUNC(yuv2rgb_c_48, uint8_t, 0)
@ -186,7 +186,7 @@ YUV2RGBFUNC(yuv2rgb_c_48, uint8_t, 0)
LOADCHROMA(3);
PUTRGB48(dst_2, py_2, 3);
PUTRGB48(dst_1, py_1, 3);
ENDYUV2RGBLINE(48)
ENDYUV2RGBLINE(48, 0)
LOADCHROMA(0);
PUTRGB48(dst_1, py_1, 0);
PUTRGB48(dst_2, py_2, 0);
@ -194,6 +194,10 @@ ENDYUV2RGBLINE(48)
LOADCHROMA(1);
PUTRGB48(dst_2, py_2, 1);
PUTRGB48(dst_1, py_1, 1);
ENDYUV2RGBLINE(48, 1)
LOADCHROMA(0);
PUTRGB48(dst_1, py_1, 0);
PUTRGB48(dst_2, py_2, 0);
ENDYUV2RGBFUNC()
YUV2RGBFUNC(yuv2rgb_c_bgr48, uint8_t, 0)
@ -212,7 +216,7 @@ YUV2RGBFUNC(yuv2rgb_c_bgr48, uint8_t, 0)
LOADCHROMA(3);
PUTBGR48(dst_2, py_2, 3);
PUTBGR48(dst_1, py_1, 3);
ENDYUV2RGBLINE(48)
ENDYUV2RGBLINE(48, 0)
LOADCHROMA(0);
PUTBGR48(dst_1, py_1, 0);
PUTBGR48(dst_2, py_2, 0);
@ -220,6 +224,10 @@ ENDYUV2RGBLINE(48)
LOADCHROMA(1);
PUTBGR48(dst_2, py_2, 1);
PUTBGR48(dst_1, py_1, 1);
ENDYUV2RGBLINE(48, 1)
LOADCHROMA(0);
PUTBGR48(dst_1, py_1, 0);
PUTBGR48(dst_2, py_2, 0);
ENDYUV2RGBFUNC()
YUV2RGBFUNC(yuv2rgb_c_32, uint32_t, 0)
@ -238,7 +246,7 @@ YUV2RGBFUNC(yuv2rgb_c_32, uint32_t, 0)
LOADCHROMA(3);
PUTRGB(dst_2, py_2, 3);
PUTRGB(dst_1, py_1, 3);
ENDYUV2RGBLINE(8)
ENDYUV2RGBLINE(8, 0)
LOADCHROMA(0);
PUTRGB(dst_1, py_1, 0);
PUTRGB(dst_2, py_2, 0);
@ -246,6 +254,10 @@ ENDYUV2RGBLINE(8)
LOADCHROMA(1);
PUTRGB(dst_2, py_2, 1);
PUTRGB(dst_1, py_1, 1);
ENDYUV2RGBLINE(8, 1)
LOADCHROMA(0);
PUTRGB(dst_1, py_1, 0);
PUTRGB(dst_2, py_2, 0);
ENDYUV2RGBFUNC()
YUV2RGBFUNC(yuva2rgba_c, uint32_t, 1)
@ -266,7 +278,7 @@ YUV2RGBFUNC(yuva2rgba_c, uint32_t, 1)
PUTRGBA(dst_1, py_1, pa_2, 3, 24);
pa_1 += 8; \
pa_2 += 8; \
ENDYUV2RGBLINE(8)
ENDYUV2RGBLINE(8, 0)
LOADCHROMA(0);
PUTRGBA(dst_1, py_1, pa_1, 0, 24);
PUTRGBA(dst_2, py_2, pa_2, 0, 24);
@ -274,6 +286,12 @@ ENDYUV2RGBLINE(8)
LOADCHROMA(1);
PUTRGBA(dst_2, py_2, pa_1, 1, 24);
PUTRGBA(dst_1, py_1, pa_2, 1, 24);
pa_1 += 4; \
pa_2 += 4; \
ENDYUV2RGBLINE(8, 1)
LOADCHROMA(0);
PUTRGBA(dst_1, py_1, pa_1, 0, 24);
PUTRGBA(dst_2, py_2, pa_2, 0, 24);
ENDYUV2RGBFUNC()
YUV2RGBFUNC(yuva2argb_c, uint32_t, 1)
@ -294,7 +312,7 @@ YUV2RGBFUNC(yuva2argb_c, uint32_t, 1)
PUTRGBA(dst_1, py_1, pa_1, 3, 0);
pa_1 += 8; \
pa_2 += 8; \
ENDYUV2RGBLINE(8)
ENDYUV2RGBLINE(8, 0)
LOADCHROMA(0);
PUTRGBA(dst_1, py_1, pa_1, 0, 0);
PUTRGBA(dst_2, py_2, pa_2, 0, 0);
@ -302,6 +320,12 @@ ENDYUV2RGBLINE(8)
LOADCHROMA(1);
PUTRGBA(dst_2, py_2, pa_2, 1, 0);
PUTRGBA(dst_1, py_1, pa_1, 1, 0);
pa_1 += 4; \
pa_2 += 4; \
ENDYUV2RGBLINE(8, 1)
LOADCHROMA(0);
PUTRGBA(dst_1, py_1, pa_1, 0, 0);
PUTRGBA(dst_2, py_2, pa_2, 0, 0);
ENDYUV2RGBFUNC()
YUV2RGBFUNC(yuv2rgb_c_24_rgb, uint8_t, 0)
@ -320,7 +344,7 @@ YUV2RGBFUNC(yuv2rgb_c_24_rgb, uint8_t, 0)
LOADCHROMA(3);
PUTRGB24(dst_2, py_2, 3);
PUTRGB24(dst_1, py_1, 3);
ENDYUV2RGBLINE(24)
ENDYUV2RGBLINE(24, 0)
LOADCHROMA(0);
PUTRGB24(dst_1, py_1, 0);
PUTRGB24(dst_2, py_2, 0);
@ -328,6 +352,10 @@ ENDYUV2RGBLINE(24)
LOADCHROMA(1);
PUTRGB24(dst_2, py_2, 1);
PUTRGB24(dst_1, py_1, 1);
ENDYUV2RGBLINE(24, 1)
LOADCHROMA(0);
PUTRGB24(dst_1, py_1, 0);
PUTRGB24(dst_2, py_2, 0);
ENDYUV2RGBFUNC()
// only trivial mods from yuv2rgb_c_24_rgb
@ -347,7 +375,7 @@ YUV2RGBFUNC(yuv2rgb_c_24_bgr, uint8_t, 0)
LOADCHROMA(3);
PUTBGR24(dst_2, py_2, 3);
PUTBGR24(dst_1, py_1, 3);
ENDYUV2RGBLINE(24)
ENDYUV2RGBLINE(24, 0)
LOADCHROMA(0);
PUTBGR24(dst_1, py_1, 0);
PUTBGR24(dst_2, py_2, 0);
@ -355,6 +383,10 @@ ENDYUV2RGBLINE(24)
LOADCHROMA(1);
PUTBGR24(dst_2, py_2, 1);
PUTBGR24(dst_1, py_1, 1);
ENDYUV2RGBLINE(24, 1)
LOADCHROMA(0);
PUTBGR24(dst_1, py_1, 0);
PUTBGR24(dst_2, py_2, 0);
ENDYUV2RGBFUNC()
YUV2RGBFUNC(yuv2rgb_c_16_ordered_dither, uint16_t, 0)

View File

@ -6,11 +6,17 @@
* This utility converts compressed Macromedia Flash files to uncompressed ones.
*/
#include "config.h"
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#if HAVE_IO_H
#include <io.h>
#endif
#include <zlib.h>
#ifdef DEBUG

View File

@ -18,7 +18,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "config.h"
#if HAVE_UNISTD_H
#include <unistd.h> /* getopt */
#endif
#include <stdio.h>
#include <string.h>
@ -27,6 +30,10 @@
#include "libavutil/audioconvert.h"
#include "libavfilter/avfiltergraph.h"
#if !HAVE_GETOPT
#include "compat/getopt.c"
#endif
static void usage(void)
{
printf("Convert a libavfilter graph to a dot file\n");

View File

@ -36,8 +36,8 @@
#include <string.h>
#include <sys/stat.h>
#ifdef _WIN32
#include <io.h>
#define mkdir(a, b) mkdir(a)
#include <direct.h>
#define mkdir(a, b) _mkdir(a)
#endif
#include "libavformat/avformat.h"

View File

@ -18,12 +18,18 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "config.h"
#include <limits.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#if HAVE_IO_H
#include <io.h>
#endif
#include "libavutil/time.h"
#include "libavformat/avformat.h"

View File

@ -32,6 +32,9 @@
#ifdef __MINGW32__
#define fseeko(x, y, z) fseeko64(x, y, z)
#define ftello(x) ftello64(x)
#elif defined(_WIN32)
#define fseeko(x, y, z) _fseeki64(x, y, z)
#define ftello(x) _ftelli64(x)
#endif
#define BE_16(x) ((((uint8_t*)(x))[0] << 8) | ((uint8_t*)(x))[1])