Commit Graph

32413 Commits

Author SHA1 Message Date
Martin Storsjö
a5c50913a8 movdec: Adjust keyframe flagging in fragmented files
For video, mark the first sample in a trun which doesn't have the
sample-is-non-sync-sample flag set as a keyframe.

In particular, the "sample does not depend on other samples" flag
isn't enough to make it a keyframe, since later frames still can
reference frames prior to that one (the flag only says that that
particular frame doesn't depend on other frames).

This fixes bug 215.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-21 14:19:20 +02:00
Ronald S. Bultje
3ab9a2a557 rv34: change most "int stride" into "ptrdiff_t stride".
This prevents having to sign-extend on 64-bit systems with 32-bit ints,
such as x86-64. Also fixes crashes on systems where we don't do it and
arguments are not in registers, such as Win64 for all weight functions.
2012-02-20 14:58:25 -08:00
Justin Ruggles
770a5c6d02 adpcmenc: Use correct frame_size for Yamaha ADPCM.
Output packet size should match avctx->block_align. The target output packet
size is 1024 bytes.
Before:
mono   - 1024 samples -> 512 bytes
stereo - 2048 samples -> 2048 bytes
After:
mono   - 2048 samples -> 1024 bytes
stereo - 1024 samples -> 1024 bytes
2012-02-20 15:52:32 -05:00
Justin Ruggles
91a28b0e8e avcodec: add ff_samples_to_time_base() convenience function to internal.h 2012-02-20 15:20:17 -05:00
Justin Ruggles
41ac9bb253 adx parser: set duration 2012-02-20 15:08:41 -05:00
Justin Ruggles
b3a4c7e0f1 mlp parser: set duration instead of frame_size 2012-02-20 15:08:41 -05:00
Justin Ruggles
2460b168b4 gsm parser: set duration 2012-02-20 15:08:41 -05:00
Justin Ruggles
7575ffac8a mpegaudio parser: set duration instead of frame_size 2012-02-20 15:08:40 -05:00
Justin Ruggles
16e54ac725 (e)ac3 parser: set duration instead of frame_size 2012-02-20 15:08:40 -05:00
Justin Ruggles
c7f3f1c91e flac parser: set duration instead of frame_size 2012-02-20 15:08:40 -05:00
Justin Ruggles
e9cda85351 avcodec: add duration field to AVCodecParserContext
This will allow parsers to export the duration of the current frame being
output, if known, instead of using AVCodecContext.frame_size.
2012-02-20 15:08:40 -05:00
Justin Ruggles
0b42a9388c avutil: add av_rescale_q_rnd() to allow different rounding 2012-02-20 15:08:40 -05:00
Paul B Mahol
0996f406c4 pnmdec: remove useless .pix_fmts
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-20 13:46:57 -05:00
Justin Ruggles
e00959a9b1 libmp3lame: support float and s32 sample formats 2012-02-20 12:32:31 -05:00
Justin Ruggles
e232225276 libmp3lame: renaming, rearrangement, alignment, and comments 2012-02-20 12:32:30 -05:00
Justin Ruggles
232e16dd02 libmp3lame: use the LAME default bit rate
Also, only set bit rate for CBR.
2012-02-20 12:32:30 -05:00
Justin Ruggles
1f516c0451 libmp3lame: use avpriv_mpegaudio_decode_header() for output frame parsing 2012-02-20 12:32:30 -05:00
Justin Ruggles
e3d2c89e9d libmp3lame: cosmetics: remove some pointless comments 2012-02-20 12:32:30 -05:00
Justin Ruggles
bf909fc456 libmp3lame: convert some debugging code to av_dlog()
also remove unneeded commented-out full frame data debugging
2012-02-20 12:32:30 -05:00
Justin Ruggles
469d2a8e8e libmp3lame: remove outdated comment.
We now require at least libmp3lame 3.98.3.
lame_encode_buffer_interleaved() still doesn't work for mono, but it does not
"die"; it just expects a stereo interleaved buffer.
2012-02-20 12:32:30 -05:00
Justin Ruggles
35cfd7d09c libmp3lame: do not set coded_frame->key_frame.
it is already set in avcodec_alloc_frame()
2012-02-20 12:32:30 -05:00
Justin Ruggles
8dad25ebf7 libmp3lame: improve error handling in MP3lame_encode_init() 2012-02-20 12:32:30 -05:00
Justin Ruggles
310c372e12 libmp3lame: remove unneeded 'stereo' field from Mp3AudioContext 2012-02-20 12:32:30 -05:00
Martin Storsjö
a4f97be1a9 hls: Reset the AVIOContext when seeking
This avoids reading any old data in the AVIOContext buffer after
the seek, and indicates to the mpegts demuxer that we've seeked,
avoiding continuity check errors.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-20 11:10:02 +02:00
Anton Khirnov
55fd7da107 pcxenc: switch to encode2(). 2012-02-20 07:50:44 +01:00
Anton Khirnov
fb11e22fda sgienc: switch to encode2(). 2012-02-20 07:50:44 +01:00
Anton Khirnov
61eaf45c99 targaenc: switch to encode2(). 2012-02-20 07:50:44 +01:00
Anton Khirnov
1e742ea3c8 targaenc: don't modify input frame.
Set the pict_type/key_frame properties on the coded picture.
2012-02-20 07:50:44 +01:00
Anton Khirnov
3227770092 roqvideoenc: switch to encode2(). 2012-02-20 07:50:44 +01:00
Anton Khirnov
4fd7cfef0b roqvideoenc: add const qualifier to the input frame. 2012-02-20 07:50:44 +01:00
Anton Khirnov
1ea5755046 pnmenc: switch to encode2(). 2012-02-20 07:50:44 +01:00
Anton Khirnov
bc9c70e5a3 huffyuv: switch to encode2(). 2012-02-20 07:50:44 +01:00
Anton Khirnov
2abee9be82 v410enc: switch to encode2(). 2012-02-20 07:50:44 +01:00
Anton Khirnov
11505f39e1 zmbvenc: switch to encode2(). 2012-02-20 07:50:44 +01:00
Anton Khirnov
8c8c7b5e37 zmbvenc: move header writing to the end of encode_frame().
This makes switching to encode2() simpler, because it allows us to know
exactly how large should the output buffer be before we start writing
into it.
2012-02-20 07:50:44 +01:00
Ronald S. Bultje
8fb26950ed h264: don't use redzone in loopfilter on win64.
Red zone usage is not allowed in the Win64 ABI.
2012-02-19 15:31:03 -08:00
Ronald S. Bultje
b18f8cbf3d Revert two swscale commits.
Revert "swscale: update context offsets after removal of AlpMmxFilter."
(commit a95e3fa90b)
and
Revert "swscale: Remove some write-only variables related to alpha handling."
(commit 9d03cb9fc5).

They broke alpha handling - it's the evil inline asm that still uses that
variable, so it's not truely write-only.
2012-02-19 13:31:12 -08:00
Panagiotis H.M. Issaris
2b3d041cdc applehttp: Do seeking within segments, too
Enhance seeking by demuxing until the requested timestamp is
reached within the segment selected by the seek code using the
playlist info.

Some mpegts streams don't have dts set for all packets though,
this seeking method doesn't work well for that case.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-19 23:03:42 +02:00
Luca Barbato
6b8b0fe2bc doxy: remove reference to removed api 2012-02-19 19:10:28 +01:00
Luca Barbato
aac63cef20 examples: unbreak compilation
Update api so it will compile again.
2012-02-19 19:10:28 +01:00
Paul B Mahol
e04ca1d4ce ttadec: cosmetics: reindent
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-19 13:04:10 -05:00
Aneesh Dogra
566df2eea2 sunrast: use RLE trigger macro inplace of the hard coded value.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-02-19 15:55:57 +01:00
Aneesh Dogra
1a58daed0f sunrastenc: set keyframe flag for the output packet.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-02-19 15:54:27 +01:00
Anton Khirnov
445a7d48b1 mpegvideo_enc: switch to encode2(). 2012-02-19 08:26:30 +01:00
Anton Khirnov
5455384219 mpegvideo_enc: force encoding delay of at least 1 frame when low_delay=0
This allows the following commit to extrapolate better dts for the first
frame. Pts difference between the first two frames is reused as the
difference between pts and dts of the first frame.
2012-02-19 08:22:48 +01:00
Martin Storsjö
5be805d38c mov: Use defines for sample flags in fragments
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-18 21:13:36 +02:00
Martin Storsjö
3eec23f3cd mov: Use defines for trun flags
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-18 21:13:35 +02:00
Martin Storsjö
73328f24fa mov: Use defines for tfhd flags
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-18 21:13:33 +02:00
Kostya Shishkov
6d702dc072 proresenc: force bitrate not to exceed given limit
Apple ProRes Format Specifications mentions target data size for every frame,
so make sure frame meets it. This also allows encoder to demand much smaller
packet sizes for output.
2012-02-18 18:34:01 +01:00
Ronald S. Bultje
c742ab4e81 vc1parse: call vc1_init_common().
The parser uses VLC tables initialized in vc1_common_init(), therefore
we should call this function on parser init also.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-18 09:16:39 -08:00