Stefano Sabatini
44bd69e9b9
lavc/utils: rename ff_init_buffer_info() pic parameter to frame
...
The new name is more expressive, given that the frame is not necessarily
a picture but may be an audio frame.
13 years ago
Stefano Sabatini
b99381e8b5
lavc/utils: generalize ff_init_buffer_info() and use it when seems feasible
...
Extend ff_init_buffer_info() to init audio frames as well as video
frames.
Avoid code duplication.
13 years ago
Stefano Sabatini
23fc4dd6e7
lavc: add channels field to AVFrame
...
This is required otherwise it is not always possible to guess the number
of channels from the layout, for example if the channel layout is
unknown.
13 years ago
Marton Balint
016a472009
avcodec: add decode_error_flags field to AVFrame
...
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Nicolas George
461f506f7b
lavc: set best_effort_timestamp for audio too.
13 years ago
Nicolas George
cd08900393
lavc: update pkt_duration for skipped samples.
...
Also: factor the the computation of the timestamp difference.
13 years ago
Nicolas George
0e18ac5611
lavc: warn when impossible to adjust timestamps for skipped samples.
...
It is likely to happen if pkt_timebase was not set.
13 years ago
Nicolas George
11ce1cf9a7
lavc: add debug info about skipped samples.
13 years ago
Paul B Mahol
1463bd902a
cosmetics: reindent after d3abbb1d1
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Thomas Kühnel
f49ec1b404
lavc: add metadata to AVFrame
...
See thread:
Subject: [libav-devel] [PATCH 1/3] avcodec: add metadata to AVFrame
Date: Tue, 4 Oct 2011 00:19:51 +0200
13 years ago
Michael Niedermayer
aa32971d2b
lavc: adjust timestamp in case of skiping initial samples
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
2fe186409b
lavc: skip initial silence when requested
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
0eb0b310c4
lavc: add pkt_timebase to allow avcodec to adjust pkt_dts/pts when needed
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Paul B Mahol
d3abbb1d13
lavc: fix ff_alloc_packet()
...
Regression introduced in 740b9ff44
.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Paul B Mahol
0e003d8c91
lavc: add av_fast_padded_mallocz
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Carl Eugen Hoyos
36b2bd9629
Show hyphen in codec tag.
13 years ago
Michael Niedermayer
93d672967d
video_get_buffer: return ENOMEM instead of -1 on malloc failure
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
f339ebc1ff
lavc/utils: print error message on get_buffer related errors
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
6ea973fc4c
avcodec_align_dimensions2: support 12 & 14 bit planar colorspaces
...
Reviewed-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
7001eee1f4
avcodec_encode_audio2: print error messages for errors
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Lou Logan
6851130fd6
cosmetics: minor libavcodec spelling errors
...
Also update some common misspelled words in patcheck
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
fde1bc64ad
lavc: add frame multithreading capability (currently intra only)
...
Compared to the decoder side, this code is able to change both the
delay and the number of threads seamlessly during encoding. Also
any idle thread can pick up tasks, the strict round robin in order
limit is gone too.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Martin Storsjö
3641b0489c
Add support for iLBC decoding/encoding via the external library libilbc
...
The library is 3-clause BSD licensed.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Stefano Sabatini
3cc1a89881
lavc/utils: in avcodec_decode_video2() return proper error code instead of -1
...
Return AVERROR(EINVAL) in case of invalid coded size.
13 years ago
Michael Niedermayer
dded4cb20b
lavc: fix support of unofficial pix_fmt extensions of jpeg
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Stefano Sabatini
62b39d41cd
lavc: add pkt_duration field to AVFrame
13 years ago
Michael Niedermayer
a5ad3c2382
av_get_audio_frame_duration: fix FPE
...
Fixes ticket1392
Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Lou Logan
73f3f6baff
lavc: clarify experimental codec message
...
Should be easier for new users to get a working output.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Stefano Sabatini
67b7631040
lavc: prettify printing of some codec tags which contains non alphanumeric characters
...
Make av_get_codec_tag_string() show codec tag string characters in a more
intelligible ways. For example the ascii char "@" is used as a number, so
should be displayed like "[64]" rather than as a printable character.
Apart alphanumeric chars, only the characters ' ' and '.' are used
literally in codec tags, all the other characters represent numbers.
13 years ago
Michael Niedermayer
a1bb0823a9
libavcodec: correct consumed bytes for decoders
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Diego Biurrun
0c517644b2
avcodec/utils: cast a function argument to shut up a compiler warning
...
libavcodec/utils.c:251: note: expected ‘const uint8_t *’ but argument is of type ‘const short int *’
13 years ago
Michael Niedermayer
8ea5df4fac
lavc/utils: fix division by 0
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Anton Khirnov
c22953b8a3
lavc: check that extended_data is properly set in avcodec_encode_audio2().
13 years ago
Anton Khirnov
a5117a2444
lavc: pad last audio frame with silence when needed.
13 years ago
Carl Eugen Hoyos
143a5c55ff
Add yuva422p pix_fmt.
13 years ago
Michael Niedermayer
011004152f
lavc/utils: change a few asserts to av_assert0()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Justin Ruggles
f132248028
avcodec: do not needlessly set packet size to 0 in avcodec_encode_audio2()
...
It is already set to 0 by av_free_packet()
13 years ago
Justin Ruggles
74e10b6204
avcodec: for audio encoding, reset output packet when it is not valid
13 years ago
Justin Ruggles
fa0319b4fd
avcodec: refactor avcodec_encode_audio2() to merge common branches
13 years ago
Justin Ruggles
b461cd4deb
avcodec: remove fallbacks for AVCodec.encode() in avcodec_encode_audio2()
...
We no longer have any audio encoders using AVCodec.encode().
13 years ago
Anton Khirnov
828bd088f3
lavc: add sample rate and channel layout to AVFrame.
...
Rationale is the same as for video width/height etc.
13 years ago
Nicolas George
e296f1b1c4
lavc: implement accessors for some AVFrame fields.
...
Compared to av_opt_ptr, accessors bring:
- better performance (negligible);
- compile-time type check;
- link-time existence check
(or at worst, a dynamic linker error instead of a NULL dereference).
13 years ago
Nicolas George
128dda7016
lavc: add a sample_rate field to AVFrame.
...
The field is filled with the codec context information.
13 years ago
Nicolas George
4b0521eca9
lavc: add a channel_layout field to AVFrame.
...
The field is filled with the codec context information.
FIXME need a minor version bump.
13 years ago
Michael Niedermayer
70d54392f5
lowres2 support.
...
The new lowres support is limited to decoders where lowres decoding
is possible in high quality.
I was not able to measure any speed difference, but if one is found
the 2-3 lines that might affect speed can be made compile time conditional
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Mans Rullgard
2bcbd98459
Remove lowres video decoding
...
This feature is complex, of questionable utility, and slows down
normal decoding.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Robert Nagy
c58290e5e5
Reset pts_correction state on codec flush.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Alex Converse
df8d5eaa14
avcodec_string: Favor AVCodecContext.codec over the default codec.
...
This improves output for formats with more than one AVCodec.
13 years ago
Justin Ruggles
c58846f3a8
avcodec: use align == 0 for default alignment in avcodec_fill_audio_frame()
...
Use default alignment in audio_get_buffer()
13 years ago
Justin Ruggles
1337de0c4b
avcodec: validate the channel layout vs. channel count for decoders
...
Set avctx->channel_layout to 0 if the channel count does not match
avctx->channels.
13 years ago