* qatar/master:
build: ppc: drop stray leftover backslash
build: Only clean the architecture subdirectory we build for.
build: drop some unnecessary dependencies from the H.264 parser
build: prettyprinting cosmetics
libavutil: Remove pointless rational test program.
libavutil: Remove broken and pointless lzo test program.
lavf doxy: expand AVStream.codec doxy.
lavf doxy: improve AVStream.time_base doxy.
lavf doxy: add some basic documentation about reading from the demuxer.
lavf doxy: document passing options to demuxers.
lavf doxy: clarify that an AVPacket contains encoded data.
mpegtsenc: allow user triggered PES packet flushing
APIchanges: mark the place where 0.7 was cut.
APIchanges: mark the place where 0.8 was cut.
APIchanges: fill in missing dates and hashes.
smacker: convert palette and header reading to bytestream2.
alac: convert extradata reading to bytestream2.
Conflicts:
doc/APIchanges
libavcodec/smacker.c
libavcodec/x86/Makefile
libavfilter/Makefile
libavutil/Makefile
Merged-by: Michael Niedermayer <michaelni@gmx.at>
... | ... |
@@ -64,9 +64,10 @@ config.h: .config |
64 | 64 |
@-printf '\nWARNING: $(?F) newer than config.h, rerun configure\n\n' |
65 | 65 |
@-tput sgr0 2>/dev/null |
66 | 66 |
|
67 |
-SUBDIR_VARS := OBJS FFLIBS CLEANFILES DIRS TESTPROGS EXAMPLES SKIPHEADERS \ |
|
68 |
- ALTIVEC-OBJS MMX-OBJS NEON-OBJS YASM-OBJS \ |
|
69 |
- HOSTPROGS BUILT_HEADERS TESTOBJS ARCH_HEADERS ARMV6-OBJS TOOLS |
|
67 |
+SUBDIR_VARS := CLEANFILES EXAMPLES FFLIBS HOSTPROGS TESTPROGS TOOLS \ |
|
68 |
+ ARCH_HEADERS BUILT_HEADERS SKIPHEADERS \ |
|
69 |
+ ALTIVEC-OBJS ARMV6-OBJS MMX-OBJS NEON-OBJS YASM-OBJS \ |
|
70 |
+ OBJS TESTOBJS |
|
70 | 71 |
|
71 | 72 |
define RESET |
72 | 73 |
$(1) := |
... | ... |
@@ -1545,7 +1545,7 @@ vda_deps="VideoDecodeAcceleration_VDADecoder_h pthreads" |
1545 | 1545 |
vdpau_deps="vdpau_vdpau_h vdpau_vdpau_x11_h" |
1546 | 1546 |
|
1547 | 1547 |
# parsers |
1548 |
-h264_parser_select="golomb h264chroma h264dsp h264pred h264qpel" |
|
1548 |
+h264_parser_select="golomb h264dsp h264pred" |
|
1549 | 1549 |
|
1550 | 1550 |
# external libraries |
1551 | 1551 |
libaacplus_encoder_deps="libaacplus" |
... | ... |
@@ -38,22 +38,23 @@ API changes, most recent first: |
38 | 38 |
2012-01-24 - xxxxxxx - lavfi 2.60.100 |
39 | 39 |
Add avfilter_graph_dump. |
40 | 40 |
|
41 |
-2012-xx-xx - lavc 54.8.0 |
|
42 |
- xxxxxxx Add av_get_exact_bits_per_sample() |
|
43 |
- xxxxxxx Add av_get_audio_frame_duration() |
|
41 |
+2012-03-05 - lavc 54.8.0 |
|
42 |
+ 6699d07 Add av_get_exact_bits_per_sample() |
|
43 |
+ 9524cf7 Add av_get_audio_frame_duration() |
|
44 | 44 |
|
45 |
-2012-03-xx - xxxxxxx - lavc 54.7.0 - avcodec.h |
|
45 |
+2012-03-04 - 44fe77b - lavc 54.7.0 - avcodec.h |
|
46 | 46 |
Add av_codec_is_encoder/decoder(). |
47 | 47 |
|
48 |
-2012-xx-xx - xxxxxxx - lavc 54.3.0 - avcodec.h |
|
48 |
+2012-03-01 - 442c132 - lavc 54.3.0 - avcodec.h |
|
49 | 49 |
Add av_packet_shrink_side_data. |
50 | 50 |
|
51 |
-2012-xx-xx - xxxxxxx - lavf 54.2.0 - avformat.h |
|
51 |
+2012-02-29 - dd2a4bc - lavf 54.2.0 - avformat.h |
|
52 | 52 |
Add AVStream.attached_pic and AV_DISPOSITION_ATTACHED_PIC, |
53 | 53 |
used for dealing with attached pictures/cover art. |
54 | 54 |
|
55 | 55 |
2012-02-25 - c9bca80 - lavu 51.24.0 - error.h |
56 | 56 |
Add AVERROR_UNKNOWN |
57 |
+ NOTE: this was backported to 0.8 |
|
57 | 58 |
|
58 | 59 |
2012-02-20 - e9cda85 - lavc 54.2.0 |
59 | 60 |
Add duration field to AVCodecParserContext |
... | ... |
@@ -74,13 +75,16 @@ API changes, most recent first: |
74 | 74 |
|
75 | 75 |
2012-01-31 - dd6d3b0 - lavf 54.01.0 |
76 | 76 |
Add avformat_get_riff_video_tags() and avformat_get_riff_audio_tags(). |
77 |
+ NOTE: this was backported to 0.8 |
|
77 | 78 |
|
78 | 79 |
2012-01-31 - af08d9a - lavc 54.01.0 |
79 | 80 |
Add avcodec_is_open() function. |
81 |
+ NOTE: this was backported to 0.8 |
|
80 | 82 |
|
81 | 83 |
2012-01-30 - 8b93312 - lavu 51.22.0 - intfloat.h |
82 | 84 |
Add a new installed header libavutil/intfloat.h with int/float punning |
83 | 85 |
functions. |
86 |
+ NOTE: this was backported to 0.8 |
|
84 | 87 |
|
85 | 88 |
2012-01-25 - lavf 53.22.0 |
86 | 89 |
f1caf01 Allow doing av_write_frame(ctx, NULL) for flushing possible |
... | ... |
@@ -286,9 +290,12 @@ API changes, most recent first: |
286 | 286 |
|
287 | 287 |
2011-07-10 - a67c061 - lavf 53.6.0 |
288 | 288 |
Add avformat_find_stream_info(), deprecate av_find_stream_info(). |
289 |
+ NOTE: this was backported to 0.7 |
|
289 | 290 |
|
290 | 291 |
2011-07-10 - 0b950fe - lavc 53.8.0 |
291 | 292 |
Add avcodec_open2(), deprecate avcodec_open(). |
293 |
+ NOTE: this was backported to 0.7 |
|
294 |
+ |
|
292 | 295 |
Add avcodec_alloc_context3. Deprecate avcodec_alloc_context() and |
293 | 296 |
avcodec_alloc_context2(). |
294 | 297 |
|
... | ... |
@@ -763,8 +763,6 @@ HOSTPROGS = aac_tablegen aacps_tablegen cbrt_tablegen cos_tablegen \ |
763 | 763 |
dv_tablegen motionpixels_tablegen mpegaudio_tablegen \ |
764 | 764 |
pcm_tablegen qdm2_tablegen sinewin_tablegen |
765 | 765 |
|
766 |
-DIRS = alpha arm avr32 bfin mips ppc sh4 sparc x86 |
|
767 |
- |
|
768 | 766 |
CLEANFILES = *_tables.c *_tables.h *_tablegen$(HOSTEXESUF) |
769 | 767 |
|
770 | 768 |
$(SUBDIR)dct-test$(EXESUF): $(SUBDIR)dctref.o |
... | ... |
@@ -602,29 +602,30 @@ buf_alloc_fail: |
602 | 602 |
|
603 | 603 |
static int alac_set_info(ALACContext *alac) |
604 | 604 |
{ |
605 |
- const unsigned char *ptr = alac->avctx->extradata; |
|
605 |
+ GetByteContext gb; |
|
606 | 606 |
|
607 |
- ptr += 4; /* size */ |
|
608 |
- ptr += 4; /* alac */ |
|
609 |
- ptr += 4; /* version */ |
|
607 |
+ bytestream2_init(&gb, alac->avctx->extradata, |
|
608 |
+ alac->avctx->extradata_size); |
|
610 | 609 |
|
611 |
- if(AV_RB32(ptr) >= UINT_MAX/4){ |
|
612 |
- av_log(alac->avctx, AV_LOG_ERROR, "setinfo_max_samples_per_frame too large\n"); |
|
613 |
- return -1; |
|
614 |
- } |
|
610 |
+ bytestream2_skipu(&gb, 12); // size:4, alac:4, version:4 |
|
615 | 611 |
|
616 | 612 |
/* buffer size / 2 ? */ |
617 |
- alac->setinfo_max_samples_per_frame = bytestream_get_be32(&ptr); |
|
618 |
- ptr++; /* compatible version */ |
|
619 |
- alac->setinfo_sample_size = *ptr++; |
|
620 |
- alac->setinfo_rice_historymult = *ptr++; |
|
621 |
- alac->setinfo_rice_initialhistory = *ptr++; |
|
622 |
- alac->setinfo_rice_kmodifier = *ptr++; |
|
623 |
- alac->numchannels = *ptr++; |
|
624 |
- bytestream_get_be16(&ptr); /* maxRun */ |
|
625 |
- bytestream_get_be32(&ptr); /* max coded frame size */ |
|
626 |
- bytestream_get_be32(&ptr); /* average bitrate */ |
|
627 |
- bytestream_get_be32(&ptr); /* samplerate */ |
|
613 |
+ alac->setinfo_max_samples_per_frame = bytestream2_get_be32u(&gb); |
|
614 |
+ if (alac->setinfo_max_samples_per_frame >= UINT_MAX/4){ |
|
615 |
+ av_log(alac->avctx, AV_LOG_ERROR, |
|
616 |
+ "setinfo_max_samples_per_frame too large\n"); |
|
617 |
+ return AVERROR_INVALIDDATA; |
|
618 |
+ } |
|
619 |
+ bytestream2_skipu(&gb, 1); // compatible version |
|
620 |
+ alac->setinfo_sample_size = bytestream2_get_byteu(&gb); |
|
621 |
+ alac->setinfo_rice_historymult = bytestream2_get_byteu(&gb); |
|
622 |
+ alac->setinfo_rice_initialhistory = bytestream2_get_byteu(&gb); |
|
623 |
+ alac->setinfo_rice_kmodifier = bytestream2_get_byteu(&gb); |
|
624 |
+ alac->numchannels = bytestream2_get_byteu(&gb); |
|
625 |
+ bytestream2_get_be16u(&gb); // maxRun |
|
626 |
+ bytestream2_get_be32u(&gb); // max coded frame size |
|
627 |
+ bytestream2_get_be32u(&gb); // average bitrate |
|
628 |
+ bytestream2_get_be32u(&gb); // samplerate |
|
628 | 629 |
|
629 | 630 |
return 0; |
630 | 631 |
} |
... | ... |
@@ -1,6 +1,6 @@ |
1 |
-OBJS += alpha/dsputil_alpha.o \ |
|
2 |
- alpha/dsputil_alpha_asm.o \ |
|
3 |
- alpha/motion_est_alpha.o \ |
|
4 |
- alpha/motion_est_mvi_asm.o \ |
|
5 |
- alpha/mpegvideo_alpha.o \ |
|
6 |
- alpha/simple_idct_alpha.o \ |
|
1 |
+OBJS += alpha/dsputil_alpha.o \ |
|
2 |
+ alpha/dsputil_alpha_asm.o \ |
|
3 |
+ alpha/motion_est_alpha.o \ |
|
4 |
+ alpha/motion_est_mvi_asm.o \ |
|
5 |
+ alpha/mpegvideo_alpha.o \ |
|
6 |
+ alpha/simple_idct_alpha.o \ |
... | ... |
@@ -1,7 +1,7 @@ |
1 |
-OBJS += bfin/dsputil_bfin.o \ |
|
2 |
- bfin/fdct_bfin.o \ |
|
3 |
- bfin/idct_bfin.o \ |
|
4 |
- bfin/mpegvideo_bfin.o \ |
|
5 |
- bfin/pixels_bfin.o \ |
|
6 |
- bfin/vp3_bfin.o \ |
|
7 |
- bfin/vp3_idct_bfin.o \ |
|
1 |
+OBJS += bfin/dsputil_bfin.o \ |
|
2 |
+ bfin/fdct_bfin.o \ |
|
3 |
+ bfin/idct_bfin.o \ |
|
4 |
+ bfin/mpegvideo_bfin.o \ |
|
5 |
+ bfin/pixels_bfin.o \ |
|
6 |
+ bfin/vp3_bfin.o \ |
|
7 |
+ bfin/vp3_idct_bfin.o \ |
... | ... |
@@ -1,19 +1,16 @@ |
1 | 1 |
OBJS += ppc/dsputil_ppc.o \ |
2 | 2 |
|
3 |
+FFT-OBJS-$(HAVE_GNU_AS) += ppc/fft_altivec_s.o |
|
4 |
+ALTIVEC-OBJS-$(CONFIG_FFT) += ppc/fft_altivec.o \ |
|
5 |
+ $(FFT-OBJS-yes) |
|
3 | 6 |
ALTIVEC-OBJS-$(CONFIG_H264DSP) += ppc/h264_altivec.o |
7 |
+ALTIVEC-OBJS-$(CONFIG_MPEGAUDIODSP) += ppc/mpegaudiodec_altivec.o |
|
4 | 8 |
ALTIVEC-OBJS-$(CONFIG_VC1_DECODER) += ppc/vc1dsp_altivec.o |
5 | 9 |
ALTIVEC-OBJS-$(CONFIG_VP3_DECODER) += ppc/vp3dsp_altivec.o |
6 | 10 |
ALTIVEC-OBJS-$(CONFIG_VP5_DECODER) += ppc/vp3dsp_altivec.o |
7 | 11 |
ALTIVEC-OBJS-$(CONFIG_VP6_DECODER) += ppc/vp3dsp_altivec.o |
8 | 12 |
ALTIVEC-OBJS-$(CONFIG_VP8_DECODER) += ppc/vp8dsp_altivec.o |
9 | 13 |
|
10 |
-ALTIVEC-OBJS-$(CONFIG_MPEGAUDIODSP) += ppc/mpegaudiodec_altivec.o |
|
11 |
- |
|
12 |
-FFT-OBJS-$(HAVE_GNU_AS) += ppc/fft_altivec_s.o \ |
|
13 |
- |
|
14 |
-ALTIVEC-OBJS-$(CONFIG_FFT) += ppc/fft_altivec.o \ |
|
15 |
- $(FFT-OBJS-yes) |
|
16 |
- |
|
17 | 14 |
OBJS-$(HAVE_ALTIVEC) += ppc/dsputil_altivec.o \ |
18 | 15 |
ppc/fdct_altivec.o \ |
19 | 16 |
ppc/float_altivec.o \ |
... | ... |
@@ -362,17 +362,17 @@ static av_always_inline int smk_get_code(GetBitContext *gb, int *recode, int *la |
362 | 362 |
|
363 | 363 |
static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) |
364 | 364 |
{ |
365 |
- const uint8_t *buf = avpkt->data; |
|
366 |
- int buf_size = avpkt->size; |
|
367 | 365 |
SmackVContext * const smk = avctx->priv_data; |
368 | 366 |
uint8_t *out; |
369 | 367 |
uint32_t *pal; |
368 |
+ GetByteContext gb2; |
|
370 | 369 |
GetBitContext gb; |
371 | 370 |
int blocks, blk, bw, bh; |
372 | 371 |
int i; |
373 | 372 |
int stride; |
373 |
+ int flags; |
|
374 | 374 |
|
375 |
- if(buf_size <= 769) |
|
375 |
+ if (avpkt->size <= 769) |
|
376 | 376 |
return 0; |
377 | 377 |
|
378 | 378 |
smk->pic.reference = 3; |
... | ... |
@@ -384,23 +384,23 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac |
384 | 384 |
|
385 | 385 |
/* make the palette available on the way out */ |
386 | 386 |
pal = (uint32_t*)smk->pic.data[1]; |
387 |
- smk->pic.palette_has_changed = buf[0] & 1; |
|
388 |
- smk->pic.key_frame = !!(buf[0] & 2); |
|
387 |
+ bytestream2_init(&gb2, avpkt->data, avpkt->size); |
|
388 |
+ flags = bytestream2_get_byteu(&gb2); |
|
389 |
+ smk->pic.palette_has_changed = flags & 1; |
|
390 |
+ smk->pic.key_frame = !!(flags & 2); |
|
389 | 391 |
if(smk->pic.key_frame) |
390 | 392 |
smk->pic.pict_type = AV_PICTURE_TYPE_I; |
391 | 393 |
else |
392 | 394 |
smk->pic.pict_type = AV_PICTURE_TYPE_P; |
393 | 395 |
|
394 |
- buf++; |
|
395 | 396 |
for(i = 0; i < 256; i++) |
396 |
- *pal++ = 0xFF << 24 | bytestream_get_be24(&buf); |
|
397 |
- buf_size -= 769; |
|
397 |
+ *pal++ = 0xFF << 24 | bytestream2_get_be24u(&gb2); |
|
398 | 398 |
|
399 | 399 |
last_reset(smk->mmap_tbl, smk->mmap_last); |
400 | 400 |
last_reset(smk->mclr_tbl, smk->mclr_last); |
401 | 401 |
last_reset(smk->full_tbl, smk->full_last); |
402 | 402 |
last_reset(smk->type_tbl, smk->type_last); |
403 |
- init_get_bits(&gb, buf, buf_size * 8); |
|
403 |
+ init_get_bits(&gb, avpkt->data + 769, (avpkt->size - 769) * 8); |
|
404 | 404 |
|
405 | 405 |
blk = 0; |
406 | 406 |
bw = avctx->width >> 2; |
... | ... |
@@ -511,7 +511,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac |
511 | 511 |
*(AVFrame*)data = smk->pic; |
512 | 512 |
|
513 | 513 |
/* always report that the buffer was completely consumed */ |
514 |
- return buf_size; |
|
514 |
+ return avpkt->size; |
|
515 | 515 |
} |
516 | 516 |
|
517 | 517 |
|
... | ... |
@@ -1,8 +1,46 @@ |
1 | 1 |
OBJS-$(CONFIG_MLP_DECODER) += x86/mlpdsp.o |
2 | 2 |
OBJS-$(CONFIG_TRUEHD_DECODER) += x86/mlpdsp.o |
3 |
+OBJS-$(CONFIG_XMM_CLOBBER_TEST) += x86/w64xmmtest.o |
|
3 | 4 |
|
4 |
-YASM-OBJS-$(CONFIG_DCT) += x86/dct32_sse.o |
|
5 |
+OBJS-$(HAVE_MMX) += x86/dsputil_mmx.o \ |
|
6 |
+ x86/fdct_mmx.o \ |
|
7 |
+ x86/fmtconvert_mmx.o \ |
|
8 |
+ x86/idct_mmx_xvid.o \ |
|
9 |
+ x86/idct_sse2_xvid.o \ |
|
10 |
+ x86/motion_est_mmx.o \ |
|
11 |
+ x86/mpegvideo_mmx.o \ |
|
12 |
+ x86/simple_idct_mmx.o \ |
|
5 | 13 |
|
14 |
+MMX-OBJS-$(CONFIG_AAC_DECODER) += x86/sbrdsp_init.o |
|
15 |
+MMX-OBJS-$(CONFIG_AC3DSP) += x86/ac3dsp_mmx.o |
|
16 |
+MMX-OBJS-$(CONFIG_CAVS_DECODER) += x86/cavsdsp_mmx.o |
|
17 |
+MMX-OBJS-$(CONFIG_DNXHD_ENCODER) += x86/dnxhd_mmx.o |
|
18 |
+MMX-OBJS-$(CONFIG_DWT) += x86/snowdsp_mmx.o \ |
|
19 |
+ x86/dwt.o |
|
20 |
+MMX-OBJS-$(CONFIG_ENCODERS) += x86/dsputilenc_mmx.o |
|
21 |
+MMX-OBJS-$(CONFIG_FFT) += x86/fft.o |
|
22 |
+MMX-OBJS-$(CONFIG_GPL) += x86/idct_mmx.o |
|
23 |
+MMX-OBJS-$(CONFIG_H264DSP) += x86/h264dsp_mmx.o |
|
24 |
+MMX-OBJS-$(CONFIG_H264PRED) += x86/h264_intrapred_init.o |
|
25 |
+MMX-OBJS-$(CONFIG_LPC) += x86/lpc_mmx.o |
|
26 |
+MMX-OBJS-$(CONFIG_MPEGAUDIODSP) += x86/mpegaudiodec_mmx.o |
|
27 |
+MMX-OBJS-$(CONFIG_PNG_DECODER) += x86/pngdsp-init.o |
|
28 |
+MMX-OBJS-$(CONFIG_PRORES_DECODER) += x86/proresdsp-init.o |
|
29 |
+MMX-OBJS-$(CONFIG_PRORES_LGPL_DECODER) += x86/proresdsp-init.o |
|
30 |
+MMX-OBJS-$(CONFIG_RV30_DECODER) += x86/rv34dsp_init.o |
|
31 |
+MMX-OBJS-$(CONFIG_RV40_DECODER) += x86/rv34dsp_init.o \ |
|
32 |
+ x86/rv40dsp_init.o |
|
33 |
+MMX-OBJS-$(CONFIG_V210_DECODER) += x86/v210-init.o |
|
34 |
+MMX-OBJS-$(CONFIG_VC1_DECODER) += x86/vc1dsp_mmx.o |
|
35 |
+MMX-OBJS-$(CONFIG_VP5_DECODER) += x86/vp56dsp_init.o |
|
36 |
+MMX-OBJS-$(CONFIG_VP6_DECODER) += x86/vp56dsp_init.o |
|
37 |
+MMX-OBJS-$(CONFIG_VP8_DECODER) += x86/vp8dsp-init.o |
|
38 |
+ |
|
39 |
+YASM-OBJS-$(CONFIG_AAC_DECODER) += x86/sbrdsp.o |
|
40 |
+YASM-OBJS-$(CONFIG_AC3DSP) += x86/ac3dsp.o |
|
41 |
+YASM-OBJS-$(CONFIG_DCT) += x86/dct32_sse.o |
|
42 |
+YASM-OBJS-$(CONFIG_DIRAC_DECODER) += x86/diracdsp_mmx.o x86/diracdsp_yasm.o |
|
43 |
+YASM-OBJS-$(CONFIG_ENCODERS) += x86/dsputilenc_yasm.o |
|
6 | 44 |
YASM-OBJS-FFT-$(HAVE_AMD3DNOW) += x86/fft_3dn.o |
7 | 45 |
YASM-OBJS-FFT-$(HAVE_AMD3DNOWEXT) += x86/fft_3dn2.o |
8 | 46 |
YASM-OBJS-FFT-$(HAVE_SSE) += x86/fft_sse.o |
... | ... |
@@ -10,79 +48,33 @@ YASM-OBJS-$(CONFIG_FFT) += x86/fft_mmx.o \ |
10 | 10 |
$(YASM-OBJS-FFT-yes) |
11 | 11 |
|
12 | 12 |
YASM-OBJS-$(CONFIG_DWT) += x86/dwt_yasm.o |
13 |
- |
|
14 | 13 |
YASM-OBJS-$(CONFIG_H264CHROMA) += x86/h264_chromamc.o \ |
15 | 14 |
x86/h264_chromamc_10bit.o |
16 |
- |
|
17 |
-MMX-OBJS-$(CONFIG_H264DSP) += x86/h264dsp_mmx.o |
|
18 | 15 |
YASM-OBJS-$(CONFIG_H264DSP) += x86/h264_deblock.o \ |
19 | 16 |
x86/h264_deblock_10bit.o \ |
20 | 17 |
x86/h264_idct.o \ |
21 | 18 |
x86/h264_idct_10bit.o \ |
22 | 19 |
x86/h264_weight.o \ |
23 |
- x86/h264_weight_10bit.o \ |
|
24 |
- |
|
20 |
+ x86/h264_weight_10bit.o |
|
25 | 21 |
YASM-OBJS-$(CONFIG_H264PRED) += x86/h264_intrapred.o \ |
26 | 22 |
x86/h264_intrapred_10bit.o |
27 |
-MMX-OBJS-$(CONFIG_H264PRED) += x86/h264_intrapred_init.o |
|
28 | 23 |
YASM-OBJS-$(CONFIG_H264QPEL) += x86/h264_qpel_10bit.o |
29 |
- |
|
30 |
-MMX-OBJS-$(CONFIG_RV30_DECODER) += x86/rv34dsp_init.o |
|
31 |
-YASM-OBJS-$(CONFIG_RV30_DECODER) += x86/rv34dsp.o |
|
32 |
-MMX-OBJS-$(CONFIG_RV40_DECODER) += x86/rv34dsp_init.o \ |
|
33 |
- x86/rv40dsp_init.o |
|
34 |
-YASM-OBJS-$(CONFIG_RV40_DECODER) += x86/rv34dsp.o \ |
|
35 |
- x86/rv40dsp.o |
|
36 |
- |
|
37 |
-YASM-OBJS-$(CONFIG_VC1_DECODER) += x86/vc1dsp_yasm.o |
|
38 |
- |
|
39 |
-YASM-OBJS-$(CONFIG_DIRAC_DECODER) += x86/diracdsp_mmx.o x86/diracdsp_yasm.o |
|
40 |
- |
|
41 |
-MMX-OBJS-$(CONFIG_AC3DSP) += x86/ac3dsp_mmx.o |
|
42 |
-YASM-OBJS-$(CONFIG_AC3DSP) += x86/ac3dsp.o |
|
43 |
-MMX-OBJS-$(CONFIG_CAVS_DECODER) += x86/cavsdsp_mmx.o |
|
44 |
-MMX-OBJS-$(CONFIG_DNXHD_ENCODER) += x86/dnxhd_mmx.o |
|
45 |
-MMX-OBJS-$(CONFIG_MPEGAUDIODSP) += x86/mpegaudiodec_mmx.o |
|
46 | 24 |
YASM-OBJS-$(CONFIG_MPEGAUDIODSP) += x86/imdct36_sse.o |
47 |
-MMX-OBJS-$(CONFIG_ENCODERS) += x86/dsputilenc_mmx.o |
|
48 |
-YASM-OBJS-$(CONFIG_ENCODERS) += x86/dsputilenc_yasm.o |
|
49 |
-MMX-OBJS-$(CONFIG_GPL) += x86/idct_mmx.o |
|
50 |
-MMX-OBJS-$(CONFIG_LPC) += x86/lpc_mmx.o |
|
51 |
-YASM-OBJS-$(CONFIG_PRORES_LGPL_DECODER) += x86/proresdsp.o |
|
52 |
-MMX-OBJS-$(CONFIG_PRORES_LGPL_DECODER) += x86/proresdsp-init.o |
|
53 | 25 |
YASM-OBJS-$(CONFIG_PNG_DECODER) += x86/pngdsp.o |
54 |
-MMX-OBJS-$(CONFIG_PNG_DECODER) += x86/pngdsp-init.o |
|
55 | 26 |
YASM-OBJS-$(CONFIG_PRORES_DECODER) += x86/proresdsp.o |
56 |
-MMX-OBJS-$(CONFIG_PRORES_DECODER) += x86/proresdsp-init.o |
|
57 |
-MMX-OBJS-$(CONFIG_AAC_DECODER) += x86/sbrdsp_init.o |
|
58 |
-YASM-OBJS-$(CONFIG_AAC_DECODER) += x86/sbrdsp.o |
|
59 |
-MMX-OBJS-$(CONFIG_DWT) += x86/snowdsp_mmx.o \ |
|
60 |
- x86/dwt.o |
|
27 |
+YASM-OBJS-$(CONFIG_PRORES_LGPL_DECODER) += x86/proresdsp.o |
|
28 |
+YASM-OBJS-$(CONFIG_RV30_DECODER) += x86/rv34dsp.o |
|
29 |
+YASM-OBJS-$(CONFIG_RV40_DECODER) += x86/rv34dsp.o \ |
|
30 |
+ x86/rv40dsp.o |
|
61 | 31 |
YASM-OBJS-$(CONFIG_V210_DECODER) += x86/v210.o |
62 |
-MMX-OBJS-$(CONFIG_V210_DECODER) += x86/v210-init.o |
|
63 |
-MMX-OBJS-$(CONFIG_VC1_DECODER) += x86/vc1dsp_mmx.o |
|
32 |
+YASM-OBJS-$(CONFIG_VC1_DECODER) += x86/vc1dsp_yasm.o |
|
64 | 33 |
YASM-OBJS-$(CONFIG_VP3_DECODER) += x86/vp3dsp.o |
65 | 34 |
YASM-OBJS-$(CONFIG_VP5_DECODER) += x86/vp3dsp.o |
66 |
-MMX-OBJS-$(CONFIG_VP5_DECODER) += x86/vp56dsp_init.o |
|
67 | 35 |
YASM-OBJS-$(CONFIG_VP6_DECODER) += x86/vp3dsp.o \ |
68 | 36 |
x86/vp56dsp.o |
69 |
-MMX-OBJS-$(CONFIG_VP6_DECODER) += x86/vp56dsp_init.o |
|
70 | 37 |
YASM-OBJS-$(CONFIG_VP8_DECODER) += x86/vp8dsp.o |
71 |
-MMX-OBJS-$(CONFIG_VP8_DECODER) += x86/vp8dsp-init.o |
|
38 |
+ |
|
72 | 39 |
MMX-OBJS-$(HAVE_YASM) += x86/dsputil_yasm.o \ |
73 | 40 |
x86/deinterlace.o \ |
74 | 41 |
x86/fmtconvert.o \ |
75 | 42 |
$(YASM-OBJS-yes) |
76 |
- |
|
77 |
-MMX-OBJS-$(CONFIG_FFT) += x86/fft.o |
|
78 |
- |
|
79 |
-OBJS-$(HAVE_MMX) += x86/dsputil_mmx.o \ |
|
80 |
- x86/fdct_mmx.o \ |
|
81 |
- x86/fmtconvert_mmx.o \ |
|
82 |
- x86/idct_mmx_xvid.o \ |
|
83 |
- x86/idct_sse2_xvid.o \ |
|
84 |
- x86/motion_est_mmx.o \ |
|
85 |
- x86/mpegvideo_mmx.o \ |
|
86 |
- x86/simple_idct_mmx.o \ |
|
87 |
- |
|
88 |
-OBJS-$(CONFIG_XMM_CLOBBER_TEST) += x86/w64xmmtest.o |
... | ... |
@@ -6,6 +6,8 @@ FFLIBS = avcodec avutil |
6 | 6 |
HEADERS = avformat.h avio.h version.h |
7 | 7 |
|
8 | 8 |
OBJS = allformats.o \ |
9 |
+ avio.o \ |
|
10 |
+ aviobuf.o \ |
|
9 | 11 |
cutils.o \ |
10 | 12 |
id3v1.o \ |
11 | 13 |
id3v2.o \ |
... | ... |
@@ -351,8 +353,6 @@ OBJS-$(CONFIG_LIBNUT_MUXER) += libnut.o |
351 | 351 |
OBJS-$(CONFIG_LIBRTMP) += librtmp.o |
352 | 352 |
|
353 | 353 |
# protocols I/O |
354 |
-OBJS+= avio.o aviobuf.o |
|
355 |
- |
|
356 | 354 |
OBJS-$(CONFIG_APPLEHTTP_PROTOCOL) += hlsproto.o |
357 | 355 |
OBJS-$(CONFIG_BLURAY_PROTOCOL) += bluray.o |
358 | 356 |
OBJS-$(CONFIG_CACHE_PROTOCOL) += cache.o |
... | ... |
@@ -66,11 +66,23 @@ |
66 | 66 |
* set by user for input, always set by user for output (unless you are dealing |
67 | 67 |
* with an AVFMT_NOFILE format). |
68 | 68 |
* |
69 |
+ * @section lavf_options Passing options to (de)muxers |
|
70 |
+ * Lavf allows to configure muxers and demuxers using the @ref avoptions |
|
71 |
+ * mechanism. Generic (format-independent) libavformat options are provided by |
|
72 |
+ * AVFormatContext, they can be examined from a user program by calling |
|
73 |
+ * av_opt_next() / av_opt_find() on an allocated AVFormatContext (or its AVClass |
|
74 |
+ * from avformat_get_class()). Private (format-specific) options are provided by |
|
75 |
+ * AVFormatContext.priv_data if and only if AVInputFormat.priv_class / |
|
76 |
+ * AVOutputFormat.priv_class of the corresponding format struct is non-NULL. |
|
77 |
+ * Further options may be provided by the @ref AVFormatContext.pb "I/O context", |
|
78 |
+ * if its AVClass is non-NULL, and the protocols layer. See the discussion on |
|
79 |
+ * nesting in @ref avoptions documentation to learn how to access those. |
|
80 |
+ * |
|
69 | 81 |
* @defgroup lavf_decoding Demuxing |
70 | 82 |
* @{ |
71 | 83 |
* Demuxers read a media file and split it into chunks of data (@em packets). A |
72 |
- * @ref AVPacket "packet" contains one or more frames which belong a single |
|
73 |
- * elementary stream. In lavf API this process is represented by the |
|
84 |
+ * @ref AVPacket "packet" contains one or more encoded frames which belongs to a |
|
85 |
+ * single elementary stream. In the lavf API this process is represented by the |
|
74 | 86 |
* avformat_open_input() function for opening a file, av_read_frame() for |
75 | 87 |
* reading a single packet and finally avformat_close_input(), which does the |
76 | 88 |
* cleanup. |
... | ... |
@@ -100,10 +112,55 @@ |
100 | 100 |
* your reading callbacks to it. Then set the @em pb field of your |
101 | 101 |
* AVFormatContext to newly created AVIOContext. |
102 | 102 |
* |
103 |
+ * Since the format of the opened file is in general not known until after |
|
104 |
+ * avformat_open_input() has returned, it is not possible to set demuxer private |
|
105 |
+ * options on a preallocated context. Instead, the options should be passed to |
|
106 |
+ * avformat_open_input() wrapped in an AVDictionary: |
|
107 |
+ * @code |
|
108 |
+ * AVDictionary *options = NULL; |
|
109 |
+ * av_dict_set(&options, "video_size", "640x480", 0); |
|
110 |
+ * av_dict_set(&options, "pixel_format", "rgb24", 0); |
|
111 |
+ * |
|
112 |
+ * if (avformat_open_input(&s, url, NULL, &options) < 0) |
|
113 |
+ * abort(); |
|
114 |
+ * av_dict_free(&options); |
|
115 |
+ * @endcode |
|
116 |
+ * This code passes the private options 'video_size' and 'pixel_format' to the |
|
117 |
+ * demuxer. They would be necessary for e.g. the rawvideo demuxer, since it |
|
118 |
+ * cannot know how to interpret raw video data otherwise. If the format turns |
|
119 |
+ * out to be something different than raw video, those options will not be |
|
120 |
+ * recognized by the demuxer and therefore will not be applied. Such unrecognized |
|
121 |
+ * options are then returned in the options dictionary (recognized options are |
|
122 |
+ * consumed). The calling program can handle such unrecognized options as it |
|
123 |
+ * wishes, e.g. |
|
124 |
+ * @code |
|
125 |
+ * AVDictionaryEntry *e; |
|
126 |
+ * if (e = av_dict_get(options, "", NULL, AV_DICT_IGNORE_SUFFIX)) { |
|
127 |
+ * fprintf(stderr, "Option %s not recognized by the demuxer.\n", e->key); |
|
128 |
+ * abort(); |
|
129 |
+ * } |
|
130 |
+ * @endcode |
|
131 |
+ * |
|
103 | 132 |
* After you have finished reading the file, you must close it with |
104 | 133 |
* avformat_close_input(). It will free everything associated with the file. |
105 | 134 |
* |
106 | 135 |
* @section lavf_decoding_read Reading from an opened file |
136 |
+ * Reading data from an opened AVFormatContext is done by repeatedly calling |
|
137 |
+ * av_read_frame() on it. Each call, if successful, will return an AVPacket |
|
138 |
+ * containing encoded data for one AVStream, identified by |
|
139 |
+ * AVPacket.stream_index. This packet may be passed straight into the libavcodec |
|
140 |
+ * decoding functions avcodec_decode_video2(), avcodec_decode_audio4() or |
|
141 |
+ * avcodec_decode_subtitle2() if the caller wishes to decode the data. |
|
142 |
+ * |
|
143 |
+ * AVPacket.pts, AVPacket.dts and AVPacket.duration timing information will be |
|
144 |
+ * set if known. They may also be unset (i.e. AV_NOPTS_VALUE for |
|
145 |
+ * pts/dts, 0 for duration) if the stream does not provide them. The timing |
|
146 |
+ * information will be in AVStream.time_base units, i.e. it has to be |
|
147 |
+ * multiplied by the timebase to convert them to seconds. |
|
148 |
+ * |
|
149 |
+ * The packet data belongs to the demuxer and is invalid after the next call to |
|
150 |
+ * av_read_frame(). The user must free the packet with av_free_packet() before |
|
151 |
+ * calling av_read_frame() again or closing the file. |
|
107 | 152 |
* |
108 | 153 |
* @section lavf_decoding_seek Seeking |
109 | 154 |
* @} |
... | ... |
@@ -564,7 +621,18 @@ typedef struct AVStream { |
564 | 564 |
* encoding: set by the user |
565 | 565 |
*/ |
566 | 566 |
int id; |
567 |
- AVCodecContext *codec; /**< codec context */ |
|
567 |
+ /** |
|
568 |
+ * Codec context associated with this stream. Allocated and freed by |
|
569 |
+ * libavformat. |
|
570 |
+ * |
|
571 |
+ * - decoding: The demuxer exports codec information stored in the headers |
|
572 |
+ * here. |
|
573 |
+ * - encoding: The user sets codec information, the muxer writes it to the |
|
574 |
+ * output. Mandatory fields as specified in AVCodecContext |
|
575 |
+ * documentation must be set even if this AVCodecContext is |
|
576 |
+ * not actually used for encoding. |
|
577 |
+ */ |
|
578 |
+ AVCodecContext *codec; |
|
568 | 579 |
/** |
569 | 580 |
* Real base framerate of the stream. |
570 | 581 |
* This is the lowest framerate with which all timestamps can be |
... | ... |
@@ -583,10 +651,12 @@ typedef struct AVStream { |
583 | 583 |
|
584 | 584 |
/** |
585 | 585 |
* This is the fundamental unit of time (in seconds) in terms |
586 |
- * of which frame timestamps are represented. For fixed-fps content, |
|
587 |
- * time base should be 1/framerate and timestamp increments should be 1. |
|
586 |
+ * of which frame timestamps are represented. |
|
587 |
+ * |
|
588 | 588 |
* decoding: set by libavformat |
589 |
- * encoding: set by libavformat in av_write_header |
|
589 |
+ * encoding: set by libavformat in av_write_header. The muxer may use the |
|
590 |
+ * user-provided value of @ref AVCodecContext.time_base "codec->time_base" |
|
591 |
+ * as a hint. |
|
590 | 592 |
*/ |
591 | 593 |
AVRational time_base; |
592 | 594 |
|
... | ... |
@@ -974,7 +974,7 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st, |
974 | 974 |
ts_st->prev_payload_key = key; |
975 | 975 |
} |
976 | 976 |
|
977 |
-static int mpegts_write_packet(AVFormatContext *s, AVPacket *pkt) |
|
977 |
+static int mpegts_write_packet_internal(AVFormatContext *s, AVPacket *pkt) |
|
978 | 978 |
{ |
979 | 979 |
AVStream *st = s->streams[pkt->stream_index]; |
980 | 980 |
int size = pkt->size; |
... | ... |
@@ -1091,27 +1091,48 @@ static int mpegts_write_packet(AVFormatContext *s, AVPacket *pkt) |
1091 | 1091 |
return 0; |
1092 | 1092 |
} |
1093 | 1093 |
|
1094 |
-static int mpegts_write_end(AVFormatContext *s) |
|
1094 |
+static void mpegts_write_flush(AVFormatContext *s) |
|
1095 | 1095 |
{ |
1096 |
- MpegTSWrite *ts = s->priv_data; |
|
1097 |
- MpegTSWriteStream *ts_st; |
|
1098 |
- MpegTSService *service; |
|
1099 |
- AVStream *st; |
|
1100 | 1096 |
int i; |
1101 | 1097 |
|
1102 | 1098 |
/* flush current packets */ |
1103 | 1099 |
for(i = 0; i < s->nb_streams; i++) { |
1104 |
- st = s->streams[i]; |
|
1105 |
- ts_st = st->priv_data; |
|
1100 |
+ AVStream *st = s->streams[i]; |
|
1101 |
+ MpegTSWriteStream *ts_st = st->priv_data; |
|
1106 | 1102 |
if (ts_st->payload_size > 0) { |
1107 | 1103 |
mpegts_write_pes(s, st, ts_st->payload, ts_st->payload_size, |
1108 | 1104 |
ts_st->payload_pts, ts_st->payload_dts, |
1109 | 1105 |
ts_st->payload_flags & AV_PKT_FLAG_KEY); |
1106 |
+ ts_st->payload_size = 0; |
|
1110 | 1107 |
} |
1108 |
+ } |
|
1109 |
+ avio_flush(s->pb); |
|
1110 |
+} |
|
1111 |
+ |
|
1112 |
+static int mpegts_write_packet(AVFormatContext *s, AVPacket *pkt) |
|
1113 |
+{ |
|
1114 |
+ if (!pkt) { |
|
1115 |
+ mpegts_write_flush(s); |
|
1116 |
+ return 1; |
|
1117 |
+ } else { |
|
1118 |
+ return mpegts_write_packet_internal(s, pkt); |
|
1119 |
+ } |
|
1120 |
+} |
|
1121 |
+ |
|
1122 |
+static int mpegts_write_end(AVFormatContext *s) |
|
1123 |
+{ |
|
1124 |
+ MpegTSWrite *ts = s->priv_data; |
|
1125 |
+ MpegTSService *service; |
|
1126 |
+ int i; |
|
1127 |
+ |
|
1128 |
+ mpegts_write_flush(s); |
|
1129 |
+ |
|
1130 |
+ for(i = 0; i < s->nb_streams; i++) { |
|
1131 |
+ AVStream *st = s->streams[i]; |
|
1132 |
+ MpegTSWriteStream *ts_st = st->priv_data; |
|
1111 | 1133 |
av_freep(&ts_st->payload); |
1112 | 1134 |
av_freep(&ts_st->adts); |
1113 | 1135 |
} |
1114 |
- avio_flush(s->pb); |
|
1115 | 1136 |
|
1116 | 1137 |
for(i = 0; i < ts->nb_services; i++) { |
1117 | 1138 |
service = ts->services[i]; |
... | ... |
@@ -1135,5 +1156,6 @@ AVOutputFormat ff_mpegts_muxer = { |
1135 | 1135 |
.write_header = mpegts_write_header, |
1136 | 1136 |
.write_packet = mpegts_write_packet, |
1137 | 1137 |
.write_trailer = mpegts_write_end, |
1138 |
+ .flags = AVFMT_ALLOW_FLUSH, |
|
1138 | 1139 |
.priv_class = &mpegts_muxer_class, |
1139 | 1140 |
}; |
... | ... |
@@ -82,15 +82,12 @@ OBJS = adler32.o \ |
82 | 82 |
OBJS-$(ARCH_PPC) += ppc/cpu.o |
83 | 83 |
OBJS-$(ARCH_X86) += x86/cpu.o |
84 | 84 |
|
85 |
- |
|
86 | 85 |
TESTPROGS = adler32 aes avstring base64 bprint cpu crc des eval file fifo \ |
87 | 86 |
lfg lls md5 opt pca parseutils random_seed rational sha tree |
88 | 87 |
TESTPROGS-$(HAVE_LZO1X_999_COMPRESS) += lzo |
89 | 88 |
|
90 | 89 |
TOOLS = ffeval |
91 | 90 |
|
92 |
-DIRS = arm avr32 bfin mips ppc sh4 tomi x86 |
|
93 |
- |
|
94 | 91 |
ARCH_HEADERS = bswap.h intmath.h intreadwrite.h timer.h |
95 | 92 |
|
96 | 93 |
$(SUBDIR)lzo-test$(EXESUF): ELIBS = -llzo2 |
... | ... |
@@ -51,12 +51,10 @@ endif |
51 | 51 |
|
52 | 52 |
clean:: |
53 | 53 |
$(RM) $(addprefix $(SUBDIR),*-example$(EXESUF) *-test$(EXESUF) $(CLEANFILES) $(CLEANSUFFIXES) $(LIBSUFFIXES)) \ |
54 |
- $(foreach dir,$(DIRS),$(CLEANSUFFIXES:%=$(SUBDIR)$(dir)/%)) \ |
|
55 |
- $(HOSTOBJS) $(HOSTPROGS) |
|
54 |
+ $(CLEANSUFFIXES:%=$(SUBDIR)$(ARCH)/%) $(HOSTOBJS) $(HOSTPROGS) |
|
56 | 55 |
|
57 | 56 |
distclean:: clean |
58 |
- $(RM) $(DISTCLEANSUFFIXES:%=$(SUBDIR)%) \ |
|
59 |
- $(foreach dir,$(DIRS),$(DISTCLEANSUFFIXES:%=$(SUBDIR)$(dir)/%)) |
|
57 |
+ $(RM) $(DISTCLEANSUFFIXES:%=$(SUBDIR)%) $(DISTCLEANSUFFIXES:%=$(SUBDIR)$(ARCH)/%) |
|
60 | 58 |
|
61 | 59 |
install-lib$(NAME)-shared: $(SUBDIR)$(SLIBNAME) |
62 | 60 |
$(Q)mkdir -p "$(SHLIBDIR)" |
... | ... |
@@ -5,8 +5,14 @@ FFLIBS = avutil |
5 | 5 |
|
6 | 6 |
HEADERS = swscale.h |
7 | 7 |
|
8 |
-OBJS = input.o options.o output.o rgb2rgb.o swscale.o \ |
|
9 |
- swscale_unscaled.o utils.o yuv2rgb.o |
|
8 |
+OBJS = input.o \ |
|
9 |
+ options.o \ |
|
10 |
+ output.o \ |
|
11 |
+ rgb2rgb.o \ |
|
12 |
+ swscale.o \ |
|
13 |
+ swscale_unscaled.o \ |
|
14 |
+ utils.o \ |
|
15 |
+ yuv2rgb.o \ |
|
10 | 16 |
|
11 | 17 |
OBJS-$(ARCH_BFIN) += bfin/internal_bfin.o \ |
12 | 18 |
bfin/swscale_bfin.o \ |
... | ... |
@@ -27,5 +33,3 @@ $(SUBDIR)x86/swscale_mmx.o: CFLAGS += $(NOREDZONE_FLAGS) |
27 | 27 |
OBJS-$(CONFIG_XMM_CLOBBER_TEST) += x86/w64xmmtest.o |
28 | 28 |
|
29 | 29 |
TESTPROGS = colorspace swscale |
30 |
- |
|
31 |
-DIRS = bfin ppc sparc x86 |