Compare commits
58 Commits
n0.7.15
...
release/0.
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a064b4eb12 | ||
![]() |
8925c44db1 | ||
![]() |
115efdefc5 | ||
![]() |
a248117f26 | ||
![]() |
bd66456866 | ||
![]() |
90ee388b28 | ||
![]() |
e3d643cf75 | ||
![]() |
1b05b0005b | ||
![]() |
38ca79b04d | ||
![]() |
0dff3171ce | ||
![]() |
ff29290e26 | ||
![]() |
ba7cd748c1 | ||
![]() |
510da4fe2b | ||
![]() |
eec833b10d | ||
![]() |
9b0736c08a | ||
![]() |
70a1182a48 | ||
![]() |
49d597f058 | ||
![]() |
44ebb2556d | ||
![]() |
0a41da3e9d | ||
![]() |
afe09e490a | ||
![]() |
f8c4dbe45e | ||
![]() |
c997dcd38b | ||
![]() |
2a1bebfc83 | ||
![]() |
23d835f611 | ||
![]() |
d04dc7b5a7 | ||
![]() |
3197a9c4fa | ||
![]() |
ade4f3e746 | ||
![]() |
053c19cd88 | ||
![]() |
96481c5e18 | ||
![]() |
9b052bfb86 | ||
![]() |
f844cb9bce | ||
![]() |
76c97f1963 | ||
![]() |
280998b13c | ||
![]() |
96cf80609a | ||
![]() |
33c9e18b09 | ||
![]() |
9c713f30e4 | ||
![]() |
530d10792d | ||
![]() |
799000af70 | ||
![]() |
f8d3bb8961 | ||
![]() |
78889be3fb | ||
![]() |
c65763a2c6 | ||
![]() |
6d4d186e9e | ||
![]() |
5ebb5a32bd | ||
![]() |
a694b2b158 | ||
![]() |
d785f69401 | ||
![]() |
5025dbc577 | ||
![]() |
5bfa208e65 | ||
![]() |
d86a5ce03f | ||
![]() |
7d4c38d58d | ||
![]() |
c313f3160a | ||
![]() |
7e6625a9af | ||
![]() |
f13f6f82c6 | ||
![]() |
8489c0599f | ||
![]() |
ee6b868ac8 | ||
![]() |
b6783b8826 | ||
![]() |
e2d529424f | ||
![]() |
537c173853 | ||
![]() |
c10582e703 |
2
Doxyfile
2
Doxyfile
@@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg
|
|||||||
# This could be handy for archiving the generated documentation or
|
# This could be handy for archiving the generated documentation or
|
||||||
# if some version control system is used.
|
# if some version control system is used.
|
||||||
|
|
||||||
PROJECT_NUMBER = 0.8.14
|
PROJECT_NUMBER = 0.8.15
|
||||||
|
|
||||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
||||||
# base path where the generated documentation will be put.
|
# base path where the generated documentation will be put.
|
||||||
|
@@ -8,7 +8,6 @@ FFmpeg code.
|
|||||||
Project Leader
|
Project Leader
|
||||||
==============
|
==============
|
||||||
|
|
||||||
Michael Niedermayer
|
|
||||||
final design decisions
|
final design decisions
|
||||||
|
|
||||||
|
|
||||||
|
120
doc/APIchanges
120
doc/APIchanges
@@ -66,16 +66,16 @@ API changes, most recent first:
|
|||||||
2011-06-10 - c381960 - lavfi 2.15.0 - avfilter_get_audio_buffer_ref_from_arrays
|
2011-06-10 - c381960 - lavfi 2.15.0 - avfilter_get_audio_buffer_ref_from_arrays
|
||||||
Add avfilter_get_audio_buffer_ref_from_arrays() to avfilter.h.
|
Add avfilter_get_audio_buffer_ref_from_arrays() to avfilter.h.
|
||||||
|
|
||||||
2011-06-09 - d9f80ea - lavu 51.8.0 - AVMetadata
|
2011-06-09 - f9ecb84 / d9f80ea - lavu 51.8.0 - AVMetadata
|
||||||
Move AVMetadata from lavf to lavu and rename it to
|
Move AVMetadata from lavf to lavu and rename it to
|
||||||
AVDictionary -- new installed header dict.h.
|
AVDictionary -- new installed header dict.h.
|
||||||
All av_metadata_* functions renamed to av_dict_*.
|
All av_metadata_* functions renamed to av_dict_*.
|
||||||
|
|
||||||
2011-06-07 - a6703fa - lavu 51.8.0 - av_get_bytes_per_sample()
|
2011-06-07 - d552f61 / a6703fa - lavu 51.8.0 - av_get_bytes_per_sample()
|
||||||
Add av_get_bytes_per_sample() in libavutil/samplefmt.h.
|
Add av_get_bytes_per_sample() in libavutil/samplefmt.h.
|
||||||
Deprecate av_get_bits_per_sample_fmt().
|
Deprecate av_get_bits_per_sample_fmt().
|
||||||
|
|
||||||
2011-06-xx - b39b062 - lavu 51.8.0 - opt.h
|
2011-06-xx - f956924 / b39b062 - lavu 51.8.0 - opt.h
|
||||||
Add av_opt_free convenience function.
|
Add av_opt_free convenience function.
|
||||||
|
|
||||||
2011-06-06 - 95a0242 - lavfi 2.14.0 - AVFilterBufferRefAudioProps
|
2011-06-06 - 95a0242 - lavfi 2.14.0 - AVFilterBufferRefAudioProps
|
||||||
@@ -105,7 +105,7 @@ API changes, most recent first:
|
|||||||
Add av_get_pix_fmt_name() in libavutil/pixdesc.h, and deprecate
|
Add av_get_pix_fmt_name() in libavutil/pixdesc.h, and deprecate
|
||||||
avcodec_get_pix_fmt_name() in libavcodec/avcodec.h in its favor.
|
avcodec_get_pix_fmt_name() in libavcodec/avcodec.h in its favor.
|
||||||
|
|
||||||
2011-05-25 - 30315a8 - lavf 53.3.0 - avformat.h
|
2011-05-25 - 39e4206 / 30315a8 - lavf 53.3.0 - avformat.h
|
||||||
Add fps_probe_size to AVFormatContext.
|
Add fps_probe_size to AVFormatContext.
|
||||||
|
|
||||||
2011-05-22 - 5ecdfd0 - lavf 53.2.0 - avformat.h
|
2011-05-22 - 5ecdfd0 - lavf 53.2.0 - avformat.h
|
||||||
@@ -121,10 +121,10 @@ API changes, most recent first:
|
|||||||
2011-05-14 - 9fdf772 - lavfi 2.6.0 - avcodec.h
|
2011-05-14 - 9fdf772 - lavfi 2.6.0 - avcodec.h
|
||||||
Add avfilter_get_video_buffer_ref_from_frame() to libavfilter/avcodec.h.
|
Add avfilter_get_video_buffer_ref_from_frame() to libavfilter/avcodec.h.
|
||||||
|
|
||||||
2011-05-18 - 64150ff - lavc 53.7.0 - AVCodecContext.request_sample_fmt
|
2011-05-18 - 75a37b5 / 64150ff - lavc 53.7.0 - AVCodecContext.request_sample_fmt
|
||||||
Add request_sample_fmt field to AVCodecContext.
|
Add request_sample_fmt field to AVCodecContext.
|
||||||
|
|
||||||
2011-05-10 - 188dea1 - lavc 53.6.0 - avcodec.h
|
2011-05-10 - 59eb12f / 188dea1 - lavc 53.6.0 - avcodec.h
|
||||||
Deprecate AVLPCType and the following fields in
|
Deprecate AVLPCType and the following fields in
|
||||||
AVCodecContext: lpc_coeff_precision, prediction_order_method,
|
AVCodecContext: lpc_coeff_precision, prediction_order_method,
|
||||||
min_partition_order, max_partition_order, lpc_type, lpc_passes.
|
min_partition_order, max_partition_order, lpc_type, lpc_passes.
|
||||||
@@ -154,81 +154,81 @@ API changes, most recent first:
|
|||||||
Add av_dynarray_add function for adding
|
Add av_dynarray_add function for adding
|
||||||
an element to a dynamic array.
|
an element to a dynamic array.
|
||||||
|
|
||||||
2011-04-26 - bebe72f - lavu 51.1.0 - avutil.h
|
2011-04-26 - d7e5aeb / bebe72f - lavu 51.1.0 - avutil.h
|
||||||
Add AVPictureType enum and av_get_picture_type_char(), deprecate
|
Add AVPictureType enum and av_get_picture_type_char(), deprecate
|
||||||
FF_*_TYPE defines and av_get_pict_type_char() defined in
|
FF_*_TYPE defines and av_get_pict_type_char() defined in
|
||||||
libavcodec/avcodec.h.
|
libavcodec/avcodec.h.
|
||||||
|
|
||||||
2011-04-26 - 10d3940 - lavfi 2.3.0 - avfilter.h
|
2011-04-26 - d7e5aeb / 10d3940 - lavfi 2.3.0 - avfilter.h
|
||||||
Add pict_type and key_frame fields to AVFilterBufferRefVideo.
|
Add pict_type and key_frame fields to AVFilterBufferRefVideo.
|
||||||
|
|
||||||
2011-04-26 - 7a11c82 - lavfi 2.2.0 - vsrc_buffer
|
2011-04-26 - d7e5aeb / 7a11c82 - lavfi 2.2.0 - vsrc_buffer
|
||||||
Add sample_aspect_ratio fields to vsrc_buffer arguments
|
Add sample_aspect_ratio fields to vsrc_buffer arguments
|
||||||
|
|
||||||
2011-04-21 - 94f7451 - lavc 53.1.0 - avcodec.h
|
2011-04-21 - 8772156 / 94f7451 - lavc 53.1.0 - avcodec.h
|
||||||
Add CODEC_CAP_SLICE_THREADS for codecs supporting sliced threading.
|
Add CODEC_CAP_SLICE_THREADS for codecs supporting sliced threading.
|
||||||
|
|
||||||
2011-04-15 - lavc 52.120.0 - avcodec.h
|
2011-04-15 - lavc 52.120.0 - avcodec.h
|
||||||
AVPacket structure got additional members for passing side information:
|
AVPacket structure got additional members for passing side information:
|
||||||
4de339e introduce side information for AVPacket
|
c407984 / 4de339e introduce side information for AVPacket
|
||||||
2d8591c make containers pass palette change in AVPacket
|
c407984 / 2d8591c make containers pass palette change in AVPacket
|
||||||
|
|
||||||
2011-04-12 - lavf 52.107.0 - avio.h
|
2011-04-12 - lavf 52.107.0 - avio.h
|
||||||
Avio cleanup, part II - deprecate the entire URLContext API:
|
Avio cleanup, part II - deprecate the entire URLContext API:
|
||||||
175389c add avio_check as a replacement for url_exist
|
c55780d / 175389c add avio_check as a replacement for url_exist
|
||||||
ff1ec0c add avio_pause and avio_seek_time as replacements
|
9891004 / ff1ec0c add avio_pause and avio_seek_time as replacements
|
||||||
for _av_url_read_fseek/fpause
|
for _av_url_read_fseek/fpause
|
||||||
cdc6a87 deprecate av_protocol_next(), avio_enum_protocols
|
d4d0932 / cdc6a87 deprecate av_protocol_next(), avio_enum_protocols
|
||||||
should be used instead.
|
should be used instead.
|
||||||
80c6e23 rename url_set_interrupt_cb->avio_set_interrupt_cb.
|
c88caa5 / 80c6e23 rename url_set_interrupt_cb->avio_set_interrupt_cb.
|
||||||
f87b1b3 rename open flags: URL_* -> AVIO_*
|
c88caa5 / f87b1b3 rename open flags: URL_* -> AVIO_*
|
||||||
f8270bb add avio_enum_protocols.
|
d4d0932 / f8270bb add avio_enum_protocols.
|
||||||
5593f03 deprecate URLProtocol.
|
d4d0932 / 5593f03 deprecate URLProtocol.
|
||||||
c486dad deprecate URLContext.
|
d4d0932 / c486dad deprecate URLContext.
|
||||||
026e175 deprecate the typedef for URLInterruptCB
|
d4d0932 / 026e175 deprecate the typedef for URLInterruptCB
|
||||||
8e76a19 deprecate av_register_protocol2.
|
c88caa5 / 8e76a19 deprecate av_register_protocol2.
|
||||||
b840484 deprecate URL_PROTOCOL_FLAG_NESTED_SCHEME
|
11d7841 / b840484 deprecate URL_PROTOCOL_FLAG_NESTED_SCHEME
|
||||||
1305d93 deprecate av_url_read_seek
|
11d7841 / 1305d93 deprecate av_url_read_seek
|
||||||
fa104e1 deprecate av_url_read_pause
|
11d7841 / fa104e1 deprecate av_url_read_pause
|
||||||
727c7aa deprecate url_get_filename().
|
434f248 / 727c7aa deprecate url_get_filename().
|
||||||
5958df3 deprecate url_max_packet_size().
|
434f248 / 5958df3 deprecate url_max_packet_size().
|
||||||
1869ea0 deprecate url_get_file_handle().
|
434f248 / 1869ea0 deprecate url_get_file_handle().
|
||||||
32a97d4 deprecate url_filesize().
|
434f248 / 32a97d4 deprecate url_filesize().
|
||||||
e52a914 deprecate url_close().
|
434f248 / e52a914 deprecate url_close().
|
||||||
58a48c6 deprecate url_seek().
|
434f248 / 58a48c6 deprecate url_seek().
|
||||||
925e908 deprecate url_write().
|
434f248 / 925e908 deprecate url_write().
|
||||||
dce3756 deprecate url_read_complete().
|
434f248 / dce3756 deprecate url_read_complete().
|
||||||
bc371ac deprecate url_read().
|
434f248 / bc371ac deprecate url_read().
|
||||||
0589da0 deprecate url_open().
|
434f248 / 0589da0 deprecate url_open().
|
||||||
62eaaea deprecate url_connect.
|
434f248 / 62eaaea deprecate url_connect.
|
||||||
5652bb9 deprecate url_alloc.
|
434f248 / 5652bb9 deprecate url_alloc.
|
||||||
333e894 deprecate url_open_protocol
|
434f248 / 333e894 deprecate url_open_protocol
|
||||||
e230705 deprecate url_poll and URLPollEntry
|
434f248 / e230705 deprecate url_poll and URLPollEntry
|
||||||
|
|
||||||
2011-04-08 - lavf 52.106.0 - avformat.h
|
2011-04-08 - lavf 52.106.0 - avformat.h
|
||||||
Minor avformat.h cleanup:
|
Minor avformat.h cleanup:
|
||||||
a9bf9d8 deprecate av_guess_image2_codec
|
d4d0932 / a9bf9d8 deprecate av_guess_image2_codec
|
||||||
c3675df rename avf_sdp_create->av_sdp_create
|
d4d0932 / c3675df rename avf_sdp_create->av_sdp_create
|
||||||
|
|
||||||
2011-04-03 - lavf 52.105.0 - avio.h
|
2011-04-03 - lavf 52.105.0 - avio.h
|
||||||
Large-scale renaming/deprecating of AVIOContext-related functions:
|
Large-scale renaming/deprecating of AVIOContext-related functions:
|
||||||
724f6a0 deprecate url_fdopen
|
2cae980 / 724f6a0 deprecate url_fdopen
|
||||||
403ee83 deprecate url_open_dyn_packet_buf
|
2cae980 / 403ee83 deprecate url_open_dyn_packet_buf
|
||||||
6dc7d80 rename url_close_dyn_buf -> avio_close_dyn_buf
|
2cae980 / 6dc7d80 rename url_close_dyn_buf -> avio_close_dyn_buf
|
||||||
b92c545 rename url_open_dyn_buf -> avio_open_dyn_buf
|
2cae980 / b92c545 rename url_open_dyn_buf -> avio_open_dyn_buf
|
||||||
8978fed introduce an AVIOContext.seekable field as a replacement for
|
2cae980 / 8978fed introduce an AVIOContext.seekable field as a replacement for
|
||||||
AVIOContext.is_streamed and url_is_streamed()
|
AVIOContext.is_streamed and url_is_streamed()
|
||||||
b64030f deprecate get_checksum()
|
1caa412 / b64030f deprecate get_checksum()
|
||||||
4c4427a deprecate init_checksum()
|
1caa412 / 4c4427a deprecate init_checksum()
|
||||||
4ec153b deprecate udp_set_remote_url/get_local_port
|
2fd41c9 / 4ec153b deprecate udp_set_remote_url/get_local_port
|
||||||
933e90a deprecate av_url_read_fseek/fpause
|
4fa0e24 / 933e90a deprecate av_url_read_fseek/fpause
|
||||||
8d9769a deprecate url_fileno
|
4fa0e24 / 8d9769a deprecate url_fileno
|
||||||
b7f2fdd rename put_flush_packet -> avio_flush
|
0fecf26 / b7f2fdd rename put_flush_packet -> avio_flush
|
||||||
35f1023 deprecate url_close_buf
|
0fecf26 / 35f1023 deprecate url_close_buf
|
||||||
83fddae deprecate url_open_buf
|
0fecf26 / 83fddae deprecate url_open_buf
|
||||||
d9d86e0 rename url_fprintf -> avio_printf
|
0fecf26 / d9d86e0 rename url_fprintf -> avio_printf
|
||||||
59f65d9 deprecate url_setbufsize
|
0fecf26 / 59f65d9 deprecate url_setbufsize
|
||||||
3e68b3b deprecate url_ferror
|
6947b0c / 3e68b3b deprecate url_ferror
|
||||||
66e5b1d deprecate url_feof
|
66e5b1d deprecate url_feof
|
||||||
e8bb2e2 deprecate url_fget_max_packet_size
|
e8bb2e2 deprecate url_fget_max_packet_size
|
||||||
76aa876 rename url_fsize -> avio_size
|
76aa876 rename url_fsize -> avio_size
|
||||||
@@ -250,7 +250,7 @@ API changes, most recent first:
|
|||||||
b3db9ce deprecate get_partial_buffer
|
b3db9ce deprecate get_partial_buffer
|
||||||
8d9ac96 rename av_alloc_put_byte -> avio_alloc_context
|
8d9ac96 rename av_alloc_put_byte -> avio_alloc_context
|
||||||
|
|
||||||
2011-03-25 - 34b47d7 - lavc 52.115.0 - AVCodecContext.audio_service_type
|
2011-03-25 - 27ef7b1 / 34b47d7 - lavc 52.115.0 - AVCodecContext.audio_service_type
|
||||||
Add audio_service_type field to AVCodecContext.
|
Add audio_service_type field to AVCodecContext.
|
||||||
|
|
||||||
2011-03-17 - e309fdc - lavu 50.40.0 - pixfmt.h
|
2011-03-17 - e309fdc - lavu 50.40.0 - pixfmt.h
|
||||||
@@ -288,11 +288,11 @@ API changes, most recent first:
|
|||||||
2011-02-10 - 12c14cd - lavf 52.99.0 - AVStream.disposition
|
2011-02-10 - 12c14cd - lavf 52.99.0 - AVStream.disposition
|
||||||
Add AV_DISPOSITION_HEARING_IMPAIRED and AV_DISPOSITION_VISUAL_IMPAIRED.
|
Add AV_DISPOSITION_HEARING_IMPAIRED and AV_DISPOSITION_VISUAL_IMPAIRED.
|
||||||
|
|
||||||
2011-02-09 - 5592734 - lavc 52.112.0 - avcodec_thread_init()
|
2011-02-09 - c0b102c - lavc 52.112.0 - avcodec_thread_init()
|
||||||
Deprecate avcodec_thread_init()/avcodec_thread_free() use; instead
|
Deprecate avcodec_thread_init()/avcodec_thread_free() use; instead
|
||||||
set thread_count before calling avcodec_open.
|
set thread_count before calling avcodec_open.
|
||||||
|
|
||||||
2011-02-09 - 778b08a - lavc 52.111.0 - threading API
|
2011-02-09 - 37b00b4 - lavc 52.111.0 - threading API
|
||||||
Add CODEC_CAP_FRAME_THREADS with new restrictions on get_buffer()/
|
Add CODEC_CAP_FRAME_THREADS with new restrictions on get_buffer()/
|
||||||
release_buffer()/draw_horiz_band() callbacks for appropriate codecs.
|
release_buffer()/draw_horiz_band() callbacks for appropriate codecs.
|
||||||
Add thread_type and active_thread_type fields to AVCodecContext.
|
Add thread_type and active_thread_type fields to AVCodecContext.
|
||||||
|
@@ -82,7 +82,7 @@ Follows a BNF description for the filtergraph syntax:
|
|||||||
@var{LINKLABEL} ::= "[" @var{NAME} "]"
|
@var{LINKLABEL} ::= "[" @var{NAME} "]"
|
||||||
@var{LINKLABELS} ::= @var{LINKLABEL} [@var{LINKLABELS}]
|
@var{LINKLABELS} ::= @var{LINKLABEL} [@var{LINKLABELS}]
|
||||||
@var{FILTER_ARGUMENTS} ::= sequence of chars (eventually quoted)
|
@var{FILTER_ARGUMENTS} ::= sequence of chars (eventually quoted)
|
||||||
@var{FILTER} ::= [@var{LINKNAMES}] @var{NAME} ["=" @var{ARGUMENTS}] [@var{LINKNAMES}]
|
@var{FILTER} ::= [@var{LINKLABELS}] @var{NAME} ["=" @var{FILTER_ARGUMENTS}] [@var{LINKLABELS}]
|
||||||
@var{FILTERCHAIN} ::= @var{FILTER} [,@var{FILTERCHAIN}]
|
@var{FILTERCHAIN} ::= @var{FILTER} [,@var{FILTERCHAIN}]
|
||||||
@var{FILTERGRAPH} ::= @var{FILTERCHAIN} [;@var{FILTERGRAPH}]
|
@var{FILTERGRAPH} ::= @var{FILTERCHAIN} [;@var{FILTERGRAPH}]
|
||||||
@end example
|
@end example
|
||||||
|
@@ -15,7 +15,7 @@ be properly added to the respective issue.
|
|||||||
The subscription URL for the ffmpeg-trac list is:
|
The subscription URL for the ffmpeg-trac list is:
|
||||||
http(s)://ffmpeg.org/mailman/listinfo/ffmpeg-trac
|
http(s)://ffmpeg.org/mailman/listinfo/ffmpeg-trac
|
||||||
The URL of the webinterface of the tracker is:
|
The URL of the webinterface of the tracker is:
|
||||||
http(s)://ffmpeg.org/trac/ffmpeg
|
http(s)://trac.ffmpeg.org
|
||||||
|
|
||||||
NOTE: issue = (bug report || patch || feature request)
|
NOTE: issue = (bug report || patch || feature request)
|
||||||
|
|
||||||
|
@@ -183,6 +183,8 @@ static av_cold int che_configure(AACContext *ac,
|
|||||||
enum ChannelPosition che_pos[4][MAX_ELEM_ID],
|
enum ChannelPosition che_pos[4][MAX_ELEM_ID],
|
||||||
int type, int id, int *channels)
|
int type, int id, int *channels)
|
||||||
{
|
{
|
||||||
|
if (*channels >= MAX_CHANNELS)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
if (che_pos[type][id]) {
|
if (che_pos[type][id]) {
|
||||||
if (!ac->che[type][id] && !(ac->che[type][id] = av_mallocz(sizeof(ChannelElement))))
|
if (!ac->che[type][id] && !(ac->che[type][id] = av_mallocz(sizeof(ChannelElement))))
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
|
@@ -257,7 +257,7 @@ static void alac_linear_predictor(AlacEncodeContext *s, int ch)
|
|||||||
// generate warm-up samples
|
// generate warm-up samples
|
||||||
residual[0] = samples[0];
|
residual[0] = samples[0];
|
||||||
for(i=1;i<=lpc.lpc_order;i++)
|
for(i=1;i<=lpc.lpc_order;i++)
|
||||||
residual[i] = samples[i] - samples[i-1];
|
residual[i] = sign_extend(samples[i] - samples[i-1], s->write_sample_size);
|
||||||
|
|
||||||
// perform lpc on remaining samples
|
// perform lpc on remaining samples
|
||||||
for(i = lpc.lpc_order + 1; i < s->avctx->frame_size; i++) {
|
for(i = lpc.lpc_order + 1; i < s->avctx->frame_size; i++) {
|
||||||
|
@@ -67,10 +67,10 @@ function ff_scalarproduct_int16_neon, export=1
|
|||||||
|
|
||||||
3: vpadd.s32 d16, d0, d1
|
3: vpadd.s32 d16, d0, d1
|
||||||
vpadd.s32 d17, d2, d3
|
vpadd.s32 d17, d2, d3
|
||||||
vpadd.s32 d10, d4, d5
|
vpadd.s32 d18, d4, d5
|
||||||
vpadd.s32 d11, d6, d7
|
vpadd.s32 d19, d6, d7
|
||||||
vpadd.s32 d0, d16, d17
|
vpadd.s32 d0, d16, d17
|
||||||
vpadd.s32 d1, d10, d11
|
vpadd.s32 d1, d18, d19
|
||||||
vpadd.s32 d2, d0, d1
|
vpadd.s32 d2, d0, d1
|
||||||
vpaddl.s32 d3, d2
|
vpaddl.s32 d3, d2
|
||||||
vmov.32 r0, d3[0]
|
vmov.32 r0, d3[0]
|
||||||
@@ -107,10 +107,10 @@ function ff_scalarproduct_and_madd_int16_neon, export=1
|
|||||||
|
|
||||||
vpadd.s32 d16, d0, d1
|
vpadd.s32 d16, d0, d1
|
||||||
vpadd.s32 d17, d2, d3
|
vpadd.s32 d17, d2, d3
|
||||||
vpadd.s32 d10, d4, d5
|
vpadd.s32 d18, d4, d5
|
||||||
vpadd.s32 d11, d6, d7
|
vpadd.s32 d19, d6, d7
|
||||||
vpadd.s32 d0, d16, d17
|
vpadd.s32 d0, d16, d17
|
||||||
vpadd.s32 d1, d10, d11
|
vpadd.s32 d1, d18, d19
|
||||||
vpadd.s32 d2, d0, d1
|
vpadd.s32 d2, d0, d1
|
||||||
vpaddl.s32 d3, d2
|
vpaddl.s32 d3, d2
|
||||||
vmov.32 r0, d3[0]
|
vmov.32 r0, d3[0]
|
||||||
|
@@ -179,8 +179,11 @@ static int decode_bytes(const uint8_t* inbuffer, uint8_t* out, int bytes){
|
|||||||
uint32_t* obuf = (uint32_t*) out;
|
uint32_t* obuf = (uint32_t*) out;
|
||||||
|
|
||||||
off = (intptr_t)inbuffer & 3;
|
off = (intptr_t)inbuffer & 3;
|
||||||
buf = (const uint32_t*) (inbuffer - off);
|
buf = (const uint32_t *)(inbuffer - off);
|
||||||
c = av_be2ne32((0x537F6103 >> (off*8)) | (0x537F6103 << (32-(off*8))));
|
if (off)
|
||||||
|
c = av_be2ne32((0x537F6103U >> (off * 8)) | (0x537F6103U << (32 - (off * 8))));
|
||||||
|
else
|
||||||
|
c = av_be2ne32(0x537F6103U);
|
||||||
bytes += 3 + off;
|
bytes += 3 + off;
|
||||||
for (i = 0; i < bytes/4; i++)
|
for (i = 0; i < bytes/4; i++)
|
||||||
obuf[i] = c ^ buf[i];
|
obuf[i] = c ^ buf[i];
|
||||||
|
@@ -263,6 +263,8 @@ static int decode_wdlt(uint8_t *frame, int width, int height,
|
|||||||
segments = bytestream_get_le16(&src);
|
segments = bytestream_get_le16(&src);
|
||||||
}
|
}
|
||||||
line_ptr = frame;
|
line_ptr = frame;
|
||||||
|
if (frame_end - frame < width)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
frame += width;
|
frame += width;
|
||||||
y++;
|
y++;
|
||||||
while (segments--) {
|
while (segments--) {
|
||||||
|
@@ -1914,7 +1914,7 @@ void ff_set_cmp(DSPContext* c, me_cmp_func *cmp, int type){
|
|||||||
|
|
||||||
static void add_bytes_c(uint8_t *dst, uint8_t *src, int w){
|
static void add_bytes_c(uint8_t *dst, uint8_t *src, int w){
|
||||||
long i;
|
long i;
|
||||||
for(i=0; i<=w-sizeof(long); i+=sizeof(long)){
|
for(i=0; i<=w-(int)sizeof(long); i+=sizeof(long)){
|
||||||
long a = *(long*)(src+i);
|
long a = *(long*)(src+i);
|
||||||
long b = *(long*)(dst+i);
|
long b = *(long*)(dst+i);
|
||||||
*(long*)(dst+i) = ((a&pb_7f) + (b&pb_7f)) ^ ((a^b)&pb_80);
|
*(long*)(dst+i) = ((a&pb_7f) + (b&pb_7f)) ^ ((a^b)&pb_80);
|
||||||
@@ -1939,7 +1939,7 @@ static void diff_bytes_c(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w){
|
|||||||
}
|
}
|
||||||
}else
|
}else
|
||||||
#endif
|
#endif
|
||||||
for(i=0; i<=w-sizeof(long); i+=sizeof(long)){
|
for(i=0; i<=w-(int)sizeof(long); i+=sizeof(long)){
|
||||||
long a = *(long*)(src1+i);
|
long a = *(long*)(src1+i);
|
||||||
long b = *(long*)(src2+i);
|
long b = *(long*)(src2+i);
|
||||||
*(long*)(dst+i) = ((a|pb_80) - (b&pb_7f)) ^ ((a^b^pb_80)&pb_80);
|
*(long*)(dst+i) = ((a|pb_80) - (b&pb_7f)) ^ ((a^b^pb_80)&pb_80);
|
||||||
@@ -2836,7 +2836,7 @@ int ff_check_alignment(void){
|
|||||||
|
|
||||||
av_cold void dsputil_init(DSPContext* c, AVCodecContext *avctx)
|
av_cold void dsputil_init(DSPContext* c, AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
int i;
|
int i, j;
|
||||||
|
|
||||||
ff_check_alignment();
|
ff_check_alignment();
|
||||||
|
|
||||||
@@ -3222,11 +3222,15 @@ av_cold void dsputil_init(DSPContext* c, AVCodecContext *avctx)
|
|||||||
if (ARCH_SH4) dsputil_init_sh4 (c, avctx);
|
if (ARCH_SH4) dsputil_init_sh4 (c, avctx);
|
||||||
if (ARCH_BFIN) dsputil_init_bfin (c, avctx);
|
if (ARCH_BFIN) dsputil_init_bfin (c, avctx);
|
||||||
|
|
||||||
for(i=0; i<64; i++){
|
for (i = 0; i < 4; i++) {
|
||||||
if(!c->put_2tap_qpel_pixels_tab[0][i])
|
for (j = 0; j < 16; j++) {
|
||||||
c->put_2tap_qpel_pixels_tab[0][i]= c->put_h264_qpel_pixels_tab[0][i];
|
if(!c->put_2tap_qpel_pixels_tab[i][j])
|
||||||
if(!c->avg_2tap_qpel_pixels_tab[0][i])
|
c->put_2tap_qpel_pixels_tab[i][j] =
|
||||||
c->avg_2tap_qpel_pixels_tab[0][i]= c->avg_h264_qpel_pixels_tab[0][i];
|
c->put_h264_qpel_pixels_tab[i][j];
|
||||||
|
if(!c->avg_2tap_qpel_pixels_tab[i][j])
|
||||||
|
c->avg_2tap_qpel_pixels_tab[i][j] =
|
||||||
|
c->avg_h264_qpel_pixels_tab[i][j];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
c->put_rv30_tpel_pixels_tab[0][0] = c->put_h264_qpel_pixels_tab[0][0];
|
c->put_rv30_tpel_pixels_tab[0][0] = c->put_h264_qpel_pixels_tab[0][0];
|
||||||
|
@@ -522,7 +522,7 @@ static av_always_inline int encode_line(FFV1Context *s, int w,
|
|||||||
int run_mode=0;
|
int run_mode=0;
|
||||||
|
|
||||||
if(s->ac){
|
if(s->ac){
|
||||||
if(c->bytestream_end - c->bytestream < w*20){
|
if(c->bytestream_end - c->bytestream < w*35){
|
||||||
av_log(s->avctx, AV_LOG_ERROR, "encoded frame too large\n");
|
av_log(s->avctx, AV_LOG_ERROR, "encoded frame too large\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@@ -27,7 +27,7 @@ const int ff_flac_sample_rate_table[16] =
|
|||||||
8000, 16000, 22050, 24000, 32000, 44100, 48000, 96000,
|
8000, 16000, 22050, 24000, 32000, 44100, 48000, 96000,
|
||||||
0, 0, 0, 0 };
|
0, 0, 0, 0 };
|
||||||
|
|
||||||
const int16_t ff_flac_blocksize_table[16] = {
|
const int32_t ff_flac_blocksize_table[16] = {
|
||||||
0, 192, 576<<0, 576<<1, 576<<2, 576<<3, 0, 0,
|
0, 192, 576<<0, 576<<1, 576<<2, 576<<3, 0, 0,
|
||||||
256<<0, 256<<1, 256<<2, 256<<3, 256<<4, 256<<5, 256<<6, 256<<7
|
256<<0, 256<<1, 256<<2, 256<<3, 256<<4, 256<<5, 256<<6, 256<<7
|
||||||
};
|
};
|
||||||
|
@@ -26,6 +26,6 @@
|
|||||||
|
|
||||||
extern const int ff_flac_sample_rate_table[16];
|
extern const int ff_flac_sample_rate_table[16];
|
||||||
|
|
||||||
extern const int16_t ff_flac_blocksize_table[16];
|
extern const int32_t ff_flac_blocksize_table[16];
|
||||||
|
|
||||||
#endif /* AVCODEC_FLACDATA_H */
|
#endif /* AVCODEC_FLACDATA_H */
|
||||||
|
@@ -3880,6 +3880,12 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
|
|||||||
if(avctx->has_b_frames < 2)
|
if(avctx->has_b_frames < 2)
|
||||||
avctx->has_b_frames= !s->low_delay;
|
avctx->has_b_frames= !s->low_delay;
|
||||||
|
|
||||||
|
if (h->sps.bit_depth_luma != h->sps.bit_depth_chroma) {
|
||||||
|
av_log_missing_feature(s->avctx,
|
||||||
|
"Different bit depth between chroma and luma", 1);
|
||||||
|
return AVERROR_PATCHWELCOME;
|
||||||
|
}
|
||||||
|
|
||||||
if (avctx->bits_per_raw_sample != h->sps.bit_depth_luma) {
|
if (avctx->bits_per_raw_sample != h->sps.bit_depth_luma) {
|
||||||
if (h->sps.bit_depth_luma >= 8 && h->sps.bit_depth_luma <= 10) {
|
if (h->sps.bit_depth_luma >= 8 && h->sps.bit_depth_luma <= 10) {
|
||||||
avctx->bits_per_raw_sample = h->sps.bit_depth_luma;
|
avctx->bits_per_raw_sample = h->sps.bit_depth_luma;
|
||||||
|
@@ -621,7 +621,7 @@ int ff_h264_decode_mb_cavlc(H264Context *h){
|
|||||||
down the code */
|
down the code */
|
||||||
if(h->slice_type_nos != AV_PICTURE_TYPE_I){
|
if(h->slice_type_nos != AV_PICTURE_TYPE_I){
|
||||||
if(s->mb_skip_run==-1)
|
if(s->mb_skip_run==-1)
|
||||||
s->mb_skip_run= get_ue_golomb(&s->gb);
|
s->mb_skip_run= get_ue_golomb_long(&s->gb);
|
||||||
|
|
||||||
if (s->mb_skip_run--) {
|
if (s->mb_skip_run--) {
|
||||||
if(FRAME_MBAFF && (s->mb_y&1) == 0){
|
if(FRAME_MBAFF && (s->mb_y&1) == 0){
|
||||||
|
@@ -804,6 +804,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
|
|||||||
avctx->release_buffer(avctx, &ctx->frame);
|
avctx->release_buffer(avctx, &ctx->frame);
|
||||||
|
|
||||||
ctx->frame.reference = 0;
|
ctx->frame.reference = 0;
|
||||||
|
avcodec_set_dimensions(avctx, ctx->planes[0].width, ctx->planes[0].height);
|
||||||
if (avctx->get_buffer(avctx, &ctx->frame) < 0) {
|
if (avctx->get_buffer(avctx, &ctx->frame) < 0) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
|
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
@@ -28,6 +28,7 @@
|
|||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
#include "bytestream.h"
|
#include "bytestream.h"
|
||||||
#include "j2k.h"
|
#include "j2k.h"
|
||||||
|
#include "libavutil/avassert.h"
|
||||||
#include "libavutil/common.h"
|
#include "libavutil/common.h"
|
||||||
|
|
||||||
#define JP2_SIG_TYPE 0x6A502020
|
#define JP2_SIG_TYPE 0x6A502020
|
||||||
@@ -283,6 +284,10 @@ static int get_cox(J2kDecoderContext *s, J2kCodingStyle *c)
|
|||||||
c->log2_cblk_width = bytestream_get_byte(&s->buf) + 2; // cblk width
|
c->log2_cblk_width = bytestream_get_byte(&s->buf) + 2; // cblk width
|
||||||
c->log2_cblk_height = bytestream_get_byte(&s->buf) + 2; // cblk height
|
c->log2_cblk_height = bytestream_get_byte(&s->buf) + 2; // cblk height
|
||||||
|
|
||||||
|
if (c->log2_cblk_width > 6 || c->log2_cblk_height > 6) {
|
||||||
|
return AVERROR_PATCHWELCOME;
|
||||||
|
}
|
||||||
|
|
||||||
c->cblk_style = bytestream_get_byte(&s->buf);
|
c->cblk_style = bytestream_get_byte(&s->buf);
|
||||||
if (c->cblk_style != 0){ // cblk style
|
if (c->cblk_style != 0){ // cblk style
|
||||||
av_log(s->avctx, AV_LOG_WARNING, "extra cblk styles %X\n", c->cblk_style);
|
av_log(s->avctx, AV_LOG_WARNING, "extra cblk styles %X\n", c->cblk_style);
|
||||||
@@ -699,6 +704,9 @@ static int decode_cblk(J2kDecoderContext *s, J2kCodingStyle *codsty, J2kT1Contex
|
|||||||
int bpass_csty_symbol = J2K_CBLK_BYPASS & codsty->cblk_style;
|
int bpass_csty_symbol = J2K_CBLK_BYPASS & codsty->cblk_style;
|
||||||
int vert_causal_ctx_csty_symbol = J2K_CBLK_VSC & codsty->cblk_style;
|
int vert_causal_ctx_csty_symbol = J2K_CBLK_VSC & codsty->cblk_style;
|
||||||
|
|
||||||
|
av_assert0(width <= J2K_MAX_CBLKW);
|
||||||
|
av_assert0(height <= J2K_MAX_CBLKH);
|
||||||
|
|
||||||
for (y = 0; y < height+2; y++)
|
for (y = 0; y < height+2; y++)
|
||||||
memset(t1->flags[y], 0, (width+2)*sizeof(int));
|
memset(t1->flags[y], 0, (width+2)*sizeof(int));
|
||||||
|
|
||||||
|
@@ -1288,7 +1288,7 @@ static int mpeg_decode_postinit(AVCodecContext *avctx){
|
|||||||
s1->save_width != s->width ||
|
s1->save_width != s->width ||
|
||||||
s1->save_height != s->height ||
|
s1->save_height != s->height ||
|
||||||
s1->save_aspect_info != s->aspect_ratio_info||
|
s1->save_aspect_info != s->aspect_ratio_info||
|
||||||
s1->save_progressive_seq != s->progressive_sequence ||
|
(s1->save_progressive_seq != s->progressive_sequence && (s->height&31)) ||
|
||||||
0)
|
0)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@@ -242,8 +242,10 @@ int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_s
|
|||||||
if(next == END_NOT_FOUND){
|
if(next == END_NOT_FOUND){
|
||||||
void* new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size, (*buf_size) + pc->index + FF_INPUT_BUFFER_PADDING_SIZE);
|
void* new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size, (*buf_size) + pc->index + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||||
|
|
||||||
if(!new_buffer)
|
if(!new_buffer) {
|
||||||
|
pc->index = 0;
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
|
}
|
||||||
pc->buffer = new_buffer;
|
pc->buffer = new_buffer;
|
||||||
memcpy(&pc->buffer[pc->index], *buf, *buf_size);
|
memcpy(&pc->buffer[pc->index], *buf, *buf_size);
|
||||||
pc->index += *buf_size;
|
pc->index += *buf_size;
|
||||||
@@ -256,11 +258,15 @@ int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_s
|
|||||||
/* append to buffer */
|
/* append to buffer */
|
||||||
if(pc->index){
|
if(pc->index){
|
||||||
void* new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size, next + pc->index + FF_INPUT_BUFFER_PADDING_SIZE);
|
void* new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size, next + pc->index + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||||
|
if(!new_buffer) {
|
||||||
if(!new_buffer)
|
pc->overread_index =
|
||||||
|
pc->index = 0;
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
|
}
|
||||||
pc->buffer = new_buffer;
|
pc->buffer = new_buffer;
|
||||||
memcpy(&pc->buffer[pc->index], *buf, next + FF_INPUT_BUFFER_PADDING_SIZE );
|
if (next > -FF_INPUT_BUFFER_PADDING_SIZE)
|
||||||
|
memcpy(&pc->buffer[pc->index], *buf,
|
||||||
|
next + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||||
pc->index = 0;
|
pc->index = 0;
|
||||||
*buf= pc->buffer;
|
*buf= pc->buffer;
|
||||||
}
|
}
|
||||||
|
@@ -107,7 +107,7 @@ static void png_put_interlaced_row(uint8_t *dst, int width,
|
|||||||
static void add_bytes_l2_c(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w)
|
static void add_bytes_l2_c(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w)
|
||||||
{
|
{
|
||||||
long i;
|
long i;
|
||||||
for(i=0; i<=w-sizeof(long); i+=sizeof(long)){
|
for(i=0; i<=w-(int)sizeof(long); i+=sizeof(long)){
|
||||||
long a = *(long*)(src1+i);
|
long a = *(long*)(src1+i);
|
||||||
long b = *(long*)(src2+i);
|
long b = *(long*)(src2+i);
|
||||||
*(long*)(dst+i) = ((a&pb_7f) + (b&pb_7f)) ^ ((a^b)&pb_80);
|
*(long*)(dst+i) = ((a&pb_7f) + (b&pb_7f)) ^ ((a^b)&pb_80);
|
||||||
|
@@ -1884,6 +1884,10 @@ static av_cold int qdm2_decode_init(AVCodecContext *avctx)
|
|||||||
av_log(avctx, AV_LOG_ERROR, "Unknown FFT order (%d), contact the developers!\n", s->fft_order);
|
av_log(avctx, AV_LOG_ERROR, "Unknown FFT order (%d), contact the developers!\n", s->fft_order);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
if (s->fft_size != (1 << (s->fft_order - 1))) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "FFT size %d not power of 2.\n", s->fft_size);
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
|
|
||||||
ff_rdft_init(&s->rdft_ctx, s->fft_order, IDFT_C2R);
|
ff_rdft_init(&s->rdft_ctx, s->fft_order, IDFT_C2R);
|
||||||
ff_mpadsp_init(&s->mpadsp);
|
ff_mpadsp_init(&s->mpadsp);
|
||||||
|
@@ -83,7 +83,7 @@ static void rpza_decode_stream(RpzaContext *s)
|
|||||||
unsigned short *pixels = (unsigned short *)s->frame.data[0];
|
unsigned short *pixels = (unsigned short *)s->frame.data[0];
|
||||||
|
|
||||||
int row_ptr = 0;
|
int row_ptr = 0;
|
||||||
int pixel_ptr = 0;
|
int pixel_ptr = -4;
|
||||||
int block_ptr;
|
int block_ptr;
|
||||||
int pixel_x, pixel_y;
|
int pixel_x, pixel_y;
|
||||||
int total_blocks;
|
int total_blocks;
|
||||||
@@ -139,6 +139,7 @@ static void rpza_decode_stream(RpzaContext *s)
|
|||||||
colorA = AV_RB16 (&s->buf[stream_ptr]);
|
colorA = AV_RB16 (&s->buf[stream_ptr]);
|
||||||
stream_ptr += 2;
|
stream_ptr += 2;
|
||||||
while (n_blocks--) {
|
while (n_blocks--) {
|
||||||
|
ADVANCE_BLOCK()
|
||||||
block_ptr = row_ptr + pixel_ptr;
|
block_ptr = row_ptr + pixel_ptr;
|
||||||
for (pixel_y = 0; pixel_y < 4; pixel_y++) {
|
for (pixel_y = 0; pixel_y < 4; pixel_y++) {
|
||||||
for (pixel_x = 0; pixel_x < 4; pixel_x++){
|
for (pixel_x = 0; pixel_x < 4; pixel_x++){
|
||||||
@@ -147,7 +148,6 @@ static void rpza_decode_stream(RpzaContext *s)
|
|||||||
}
|
}
|
||||||
block_ptr += row_inc;
|
block_ptr += row_inc;
|
||||||
}
|
}
|
||||||
ADVANCE_BLOCK();
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -186,6 +186,7 @@ static void rpza_decode_stream(RpzaContext *s)
|
|||||||
if (s->size - stream_ptr < n_blocks * 4)
|
if (s->size - stream_ptr < n_blocks * 4)
|
||||||
return;
|
return;
|
||||||
while (n_blocks--) {
|
while (n_blocks--) {
|
||||||
|
ADVANCE_BLOCK();
|
||||||
block_ptr = row_ptr + pixel_ptr;
|
block_ptr = row_ptr + pixel_ptr;
|
||||||
for (pixel_y = 0; pixel_y < 4; pixel_y++) {
|
for (pixel_y = 0; pixel_y < 4; pixel_y++) {
|
||||||
index = s->buf[stream_ptr++];
|
index = s->buf[stream_ptr++];
|
||||||
@@ -196,7 +197,6 @@ static void rpza_decode_stream(RpzaContext *s)
|
|||||||
}
|
}
|
||||||
block_ptr += row_inc;
|
block_ptr += row_inc;
|
||||||
}
|
}
|
||||||
ADVANCE_BLOCK();
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -204,6 +204,7 @@ static void rpza_decode_stream(RpzaContext *s)
|
|||||||
case 0x00:
|
case 0x00:
|
||||||
if (s->size - stream_ptr < 16)
|
if (s->size - stream_ptr < 16)
|
||||||
return;
|
return;
|
||||||
|
ADVANCE_BLOCK();
|
||||||
block_ptr = row_ptr + pixel_ptr;
|
block_ptr = row_ptr + pixel_ptr;
|
||||||
for (pixel_y = 0; pixel_y < 4; pixel_y++) {
|
for (pixel_y = 0; pixel_y < 4; pixel_y++) {
|
||||||
for (pixel_x = 0; pixel_x < 4; pixel_x++){
|
for (pixel_x = 0; pixel_x < 4; pixel_x++){
|
||||||
@@ -217,7 +218,6 @@ static void rpza_decode_stream(RpzaContext *s)
|
|||||||
}
|
}
|
||||||
block_ptr += row_inc;
|
block_ptr += row_inc;
|
||||||
}
|
}
|
||||||
ADVANCE_BLOCK();
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Unknown opcode */
|
/* Unknown opcode */
|
||||||
|
@@ -362,6 +362,11 @@ static int rv20_decode_picture_header(MpegEncContext *s)
|
|||||||
f= get_bits(&s->gb, av_log2(v)+1);
|
f= get_bits(&s->gb, av_log2(v)+1);
|
||||||
|
|
||||||
if(f){
|
if(f){
|
||||||
|
if (s->avctx->extradata_size < 8 + 2 * f) {
|
||||||
|
av_log(s->avctx, AV_LOG_ERROR, "Extradata too small.\n");
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
|
|
||||||
new_w= 4*((uint8_t*)s->avctx->extradata)[6+2*f];
|
new_w= 4*((uint8_t*)s->avctx->extradata)[6+2*f];
|
||||||
new_h= 4*((uint8_t*)s->avctx->extradata)[7+2*f];
|
new_h= 4*((uint8_t*)s->avctx->extradata)[7+2*f];
|
||||||
}else{
|
}else{
|
||||||
|
@@ -78,7 +78,7 @@ typedef struct ShortenContext {
|
|||||||
GetBitContext gb;
|
GetBitContext gb;
|
||||||
|
|
||||||
int min_framesize, max_framesize;
|
int min_framesize, max_framesize;
|
||||||
int channels;
|
unsigned channels;
|
||||||
|
|
||||||
int32_t *decoded[MAX_CHANNELS];
|
int32_t *decoded[MAX_CHANNELS];
|
||||||
int32_t *decoded_base[MAX_CHANNELS];
|
int32_t *decoded_base[MAX_CHANNELS];
|
||||||
@@ -119,11 +119,11 @@ static int allocate_buffers(ShortenContext *s)
|
|||||||
for (chan=0; chan<s->channels; chan++) {
|
for (chan=0; chan<s->channels; chan++) {
|
||||||
if(FFMAX(1, s->nmean) >= UINT_MAX/sizeof(int32_t)){
|
if(FFMAX(1, s->nmean) >= UINT_MAX/sizeof(int32_t)){
|
||||||
av_log(s->avctx, AV_LOG_ERROR, "nmean too large\n");
|
av_log(s->avctx, AV_LOG_ERROR, "nmean too large\n");
|
||||||
return -1;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
if(s->blocksize + s->nwrap >= UINT_MAX/sizeof(int32_t) || s->blocksize + s->nwrap <= (unsigned)s->nwrap){
|
if(s->blocksize + s->nwrap >= UINT_MAX/sizeof(int32_t) || s->blocksize + s->nwrap <= (unsigned)s->nwrap){
|
||||||
av_log(s->avctx, AV_LOG_ERROR, "s->blocksize + s->nwrap too large\n");
|
av_log(s->avctx, AV_LOG_ERROR, "s->blocksize + s->nwrap too large\n");
|
||||||
return -1;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp_ptr = av_realloc(s->offset[chan], sizeof(int32_t)*FFMAX(1, s->nmean));
|
tmp_ptr = av_realloc(s->offset[chan], sizeof(int32_t)*FFMAX(1, s->nmean));
|
||||||
@@ -209,14 +209,14 @@ static int decode_wave_header(AVCodecContext *avctx, uint8_t *header, int header
|
|||||||
init_get_bits(&hb, header, header_size*8);
|
init_get_bits(&hb, header, header_size*8);
|
||||||
if (get_le32(&hb) != MKTAG('R','I','F','F')) {
|
if (get_le32(&hb) != MKTAG('R','I','F','F')) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "missing RIFF tag\n");
|
av_log(avctx, AV_LOG_ERROR, "missing RIFF tag\n");
|
||||||
return -1;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
skip_bits_long(&hb, 32); /* chunk_size */
|
skip_bits_long(&hb, 32); /* chunk_size */
|
||||||
|
|
||||||
if (get_le32(&hb) != MKTAG('W','A','V','E')) {
|
if (get_le32(&hb) != MKTAG('W','A','V','E')) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "missing WAVE tag\n");
|
av_log(avctx, AV_LOG_ERROR, "missing WAVE tag\n");
|
||||||
return -1;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (get_le32(&hb) != MKTAG('f','m','t',' ')) {
|
while (get_le32(&hb) != MKTAG('f','m','t',' ')) {
|
||||||
@@ -227,7 +227,7 @@ static int decode_wave_header(AVCodecContext *avctx, uint8_t *header, int header
|
|||||||
|
|
||||||
if (len < 16) {
|
if (len < 16) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "fmt chunk was too short\n");
|
av_log(avctx, AV_LOG_ERROR, "fmt chunk was too short\n");
|
||||||
return -1;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
wave_format = get_le16(&hb);
|
wave_format = get_le16(&hb);
|
||||||
@@ -237,7 +237,7 @@ static int decode_wave_header(AVCodecContext *avctx, uint8_t *header, int header
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
av_log(avctx, AV_LOG_ERROR, "unsupported wave format\n");
|
av_log(avctx, AV_LOG_ERROR, "unsupported wave format\n");
|
||||||
return -1;
|
return AVERROR(ENOSYS);
|
||||||
}
|
}
|
||||||
|
|
||||||
avctx->channels = get_le16(&hb);
|
avctx->channels = get_le16(&hb);
|
||||||
@@ -248,7 +248,7 @@ static int decode_wave_header(AVCodecContext *avctx, uint8_t *header, int header
|
|||||||
|
|
||||||
if (avctx->bits_per_coded_sample != 16) {
|
if (avctx->bits_per_coded_sample != 16) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "unsupported number of bits per sample\n");
|
av_log(avctx, AV_LOG_ERROR, "unsupported number of bits per sample\n");
|
||||||
return -1;
|
return AVERROR(ENOSYS);
|
||||||
}
|
}
|
||||||
|
|
||||||
len -= 16;
|
len -= 16;
|
||||||
@@ -342,8 +342,13 @@ static int shorten_decode_frame(AVCodecContext *avctx,
|
|||||||
s->internal_ftype = get_uint(s, TYPESIZE);
|
s->internal_ftype = get_uint(s, TYPESIZE);
|
||||||
|
|
||||||
s->channels = get_uint(s, CHANSIZE);
|
s->channels = get_uint(s, CHANSIZE);
|
||||||
if (s->channels > MAX_CHANNELS) {
|
if (!s->channels) {
|
||||||
|
av_log(s->avctx, AV_LOG_ERROR, "No channels reported\n");
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
|
if (s->channels <= 0 || s->channels > MAX_CHANNELS) {
|
||||||
av_log(s->avctx, AV_LOG_ERROR, "too many channels: %d\n", s->channels);
|
av_log(s->avctx, AV_LOG_ERROR, "too many channels: %d\n", s->channels);
|
||||||
|
s->channels = 0;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -506,7 +511,7 @@ static int shorten_decode_frame(AVCodecContext *avctx,
|
|||||||
s->bitshift = get_ur_golomb_shorten(&s->gb, BITSHIFTSIZE);
|
s->bitshift = get_ur_golomb_shorten(&s->gb, BITSHIFTSIZE);
|
||||||
break;
|
break;
|
||||||
case FN_BLOCKSIZE: {
|
case FN_BLOCKSIZE: {
|
||||||
int blocksize = get_uint(s, av_log2(s->blocksize));
|
unsigned blocksize = get_uint(s, av_log2(s->blocksize));
|
||||||
if (blocksize > s->blocksize) {
|
if (blocksize > s->blocksize) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Increasing block size is not supported\n");
|
av_log(avctx, AV_LOG_ERROR, "Increasing block size is not supported\n");
|
||||||
return AVERROR_PATCHWELCOME;
|
return AVERROR_PATCHWELCOME;
|
||||||
@@ -534,7 +539,7 @@ frame_done:
|
|||||||
av_log(s->avctx, AV_LOG_ERROR, "overread: %d\n", i - buf_size);
|
av_log(s->avctx, AV_LOG_ERROR, "overread: %d\n", i - buf_size);
|
||||||
s->bitstream_size=0;
|
s->bitstream_size=0;
|
||||||
s->bitstream_index=0;
|
s->bitstream_index=0;
|
||||||
return -1;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
if (s->bitstream_size) {
|
if (s->bitstream_size) {
|
||||||
s->bitstream_index += i;
|
s->bitstream_index += i;
|
||||||
|
@@ -572,6 +572,11 @@ static int vorbis_parse_setup_hdr_floors(vorbis_context *vc)
|
|||||||
floor_setup->data.t0.order = get_bits(gb, 8);
|
floor_setup->data.t0.order = get_bits(gb, 8);
|
||||||
floor_setup->data.t0.rate = get_bits(gb, 16);
|
floor_setup->data.t0.rate = get_bits(gb, 16);
|
||||||
floor_setup->data.t0.bark_map_size = get_bits(gb, 16);
|
floor_setup->data.t0.bark_map_size = get_bits(gb, 16);
|
||||||
|
if (floor_setup->data.t0.bark_map_size == 0) {
|
||||||
|
av_log(vc->avccontext, AV_LOG_ERROR,
|
||||||
|
"Floor 0 bark map size is 0.\n");
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
floor_setup->data.t0.amplitude_bits = get_bits(gb, 6);
|
floor_setup->data.t0.amplitude_bits = get_bits(gb, 6);
|
||||||
/* zero would result in a div by zero later *
|
/* zero would result in a div by zero later *
|
||||||
* 2^0 - 1 == 0 */
|
* 2^0 - 1 == 0 */
|
||||||
|
@@ -85,6 +85,11 @@ static int wma_decode_init(AVCodecContext * avctx)
|
|||||||
int i, flags2;
|
int i, flags2;
|
||||||
uint8_t *extradata;
|
uint8_t *extradata;
|
||||||
|
|
||||||
|
if (!avctx->block_align) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "block_align is not set\n");
|
||||||
|
return AVERROR(EINVAL);
|
||||||
|
}
|
||||||
|
|
||||||
s->avctx = avctx;
|
s->avctx = avctx;
|
||||||
|
|
||||||
/* extract flag infos */
|
/* extract flag infos */
|
||||||
|
@@ -277,6 +277,11 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
|||||||
int log2_max_num_subframes;
|
int log2_max_num_subframes;
|
||||||
int num_possible_block_sizes;
|
int num_possible_block_sizes;
|
||||||
|
|
||||||
|
if (!avctx->block_align) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "block_align is not set\n");
|
||||||
|
return AVERROR(EINVAL);
|
||||||
|
}
|
||||||
|
|
||||||
s->avctx = avctx;
|
s->avctx = avctx;
|
||||||
dsputil_init(&s->dsp, avctx);
|
dsputil_init(&s->dsp, avctx);
|
||||||
init_put_bits(&s->pb, s->frame_data, MAX_FRAMESIZE);
|
init_put_bits(&s->pb, s->frame_data, MAX_FRAMESIZE);
|
||||||
@@ -1502,8 +1507,11 @@ static int decode_packet(AVCodecContext *avctx,
|
|||||||
s->packet_done = 0;
|
s->packet_done = 0;
|
||||||
|
|
||||||
/** sanity check for the buffer length */
|
/** sanity check for the buffer length */
|
||||||
if (buf_size < avctx->block_align)
|
if (buf_size < avctx->block_align) {
|
||||||
return 0;
|
av_log(avctx, AV_LOG_ERROR, "Input packet too small (%d < %d)\n",
|
||||||
|
buf_size, avctx->block_align);
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
|
|
||||||
s->next_packet_start = buf_size - avctx->block_align;
|
s->next_packet_start = buf_size - avctx->block_align;
|
||||||
buf_size = avctx->block_align;
|
buf_size = avctx->block_align;
|
||||||
|
@@ -301,7 +301,7 @@ static int xan_decode_frame_type0(AVCodecContext *avctx, AVPacket *avpkt)
|
|||||||
corr_end = avpkt->size;
|
corr_end = avpkt->size;
|
||||||
if (chroma_off > corr_off)
|
if (chroma_off > corr_off)
|
||||||
corr_end = chroma_off;
|
corr_end = chroma_off;
|
||||||
dec_size = xan_unpack(s->scratch_buffer, s->buffer_size,
|
dec_size = xan_unpack(s->scratch_buffer, s->buffer_size / 2,
|
||||||
avpkt->data + 8 + corr_off,
|
avpkt->data + 8 + corr_off,
|
||||||
corr_end - corr_off);
|
corr_end - corr_off);
|
||||||
if (dec_size < 0)
|
if (dec_size < 0)
|
||||||
|
@@ -23,6 +23,7 @@
|
|||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "libavutil/avstring.h"
|
||||||
#include "avfilter.h"
|
#include "avfilter.h"
|
||||||
#include "avfiltergraph.h"
|
#include "avfiltergraph.h"
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
@@ -163,7 +164,11 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx)
|
|||||||
/* couldn't merge format lists. auto-insert scale filter */
|
/* couldn't merge format lists. auto-insert scale filter */
|
||||||
snprintf(inst_name, sizeof(inst_name), "auto-inserted scaler %d",
|
snprintf(inst_name, sizeof(inst_name), "auto-inserted scaler %d",
|
||||||
scaler_count++);
|
scaler_count++);
|
||||||
snprintf(scale_args, sizeof(scale_args), "0:0:%s", graph->scale_sws_opts);
|
av_strlcpy(scale_args, "0:0", sizeof(scale_args));
|
||||||
|
if (graph->scale_sws_opts) {
|
||||||
|
av_strlcat(scale_args, ":", sizeof(scale_args));
|
||||||
|
av_strlcat(scale_args, graph->scale_sws_opts, sizeof(scale_args));
|
||||||
|
}
|
||||||
if ((ret = avfilter_graph_create_filter(&scale, avfilter_get_by_name("scale"),
|
if ((ret = avfilter_graph_create_filter(&scale, avfilter_get_by_name("scale"),
|
||||||
inst_name, scale_args, NULL, graph)) < 0)
|
inst_name, scale_args, NULL, graph)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
@@ -121,7 +121,8 @@ static int create_filter(AVFilterContext **filt_ctx, AVFilterGraph *ctx, int ind
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strcmp(filt_name, "scale") && args && !strstr(args, "flags")) {
|
if (!strcmp(filt_name, "scale") && args && !strstr(args, "flags") &&
|
||||||
|
ctx->scale_sws_opts) {
|
||||||
snprintf(tmp_args, sizeof(tmp_args), "%s:%s",
|
snprintf(tmp_args, sizeof(tmp_args), "%s:%s",
|
||||||
args, ctx->scale_sws_opts);
|
args, ctx->scale_sws_opts);
|
||||||
args = tmp_args;
|
args = tmp_args;
|
||||||
|
@@ -116,11 +116,9 @@ static int flac_read_header(AVFormatContext *s,
|
|||||||
|
|
||||||
static int flac_probe(AVProbeData *p)
|
static int flac_probe(AVProbeData *p)
|
||||||
{
|
{
|
||||||
uint8_t *bufptr = p->buf;
|
if (p->buf_size < 4 || memcmp(p->buf, "fLaC", 4))
|
||||||
uint8_t *end = p->buf + p->buf_size;
|
return 0;
|
||||||
|
return AVPROBE_SCORE_MAX/2;
|
||||||
if(bufptr > end-4 || memcmp(bufptr, "fLaC", 4)) return 0;
|
|
||||||
else return AVPROBE_SCORE_MAX/2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AVInputFormat ff_flac_demuxer = {
|
AVInputFormat ff_flac_demuxer = {
|
||||||
|
@@ -90,7 +90,7 @@ typedef struct IdcinDemuxContext {
|
|||||||
|
|
||||||
static int idcin_probe(AVProbeData *p)
|
static int idcin_probe(AVProbeData *p)
|
||||||
{
|
{
|
||||||
unsigned int number;
|
unsigned int number, sample_rate;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is what you could call a "probabilistic" file check: id CIN
|
* This is what you could call a "probabilistic" file check: id CIN
|
||||||
@@ -119,18 +119,18 @@ static int idcin_probe(AVProbeData *p)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* check the audio sample rate */
|
/* check the audio sample rate */
|
||||||
number = AV_RL32(&p->buf[8]);
|
sample_rate = AV_RL32(&p->buf[8]);
|
||||||
if ((number != 0) && ((number < 8000) | (number > 48000)))
|
if (sample_rate && (sample_rate < 8000 || sample_rate > 48000))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* check the audio bytes/sample */
|
/* check the audio bytes/sample */
|
||||||
number = AV_RL32(&p->buf[12]);
|
number = AV_RL32(&p->buf[12]);
|
||||||
if (number > 2)
|
if (number > 2 || sample_rate && !number)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* check the audio channels */
|
/* check the audio channels */
|
||||||
number = AV_RL32(&p->buf[16]);
|
number = AV_RL32(&p->buf[16]);
|
||||||
if (number > 2)
|
if (number > 2 || sample_rate && !number)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* return half certainly since this check is a bit sketchy */
|
/* return half certainly since this check is a bit sketchy */
|
||||||
|
@@ -185,6 +185,11 @@ static int iff_read_header(AVFormatContext *s,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_CMAP:
|
case ID_CMAP:
|
||||||
|
if (data_size < 3 || data_size > 768 || data_size % 3) {
|
||||||
|
av_log(s, AV_LOG_ERROR, "Invalid CMAP chunk size %d\n",
|
||||||
|
data_size);
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
st->codec->extradata_size = data_size + IFF_EXTRA_VIDEO_SIZE;
|
st->codec->extradata_size = data_size + IFF_EXTRA_VIDEO_SIZE;
|
||||||
st->codec->extradata = av_malloc(data_size + IFF_EXTRA_VIDEO_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
|
st->codec->extradata = av_malloc(data_size + IFF_EXTRA_VIDEO_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||||
if (!st->codec->extradata)
|
if (!st->codec->extradata)
|
||||||
|
@@ -1402,7 +1402,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
|
|||||||
&& track->codec_priv.data != NULL) {
|
&& track->codec_priv.data != NULL) {
|
||||||
int ret;
|
int ret;
|
||||||
ffio_init_context(&b, track->codec_priv.data, track->codec_priv.size,
|
ffio_init_context(&b, track->codec_priv.data, track->codec_priv.size,
|
||||||
AVIO_FLAG_READ, NULL, NULL, NULL, NULL);
|
0, NULL, NULL, NULL, NULL);
|
||||||
ret = ff_get_wav_header(&b, st->codec, track->codec_priv.size);
|
ret = ff_get_wav_header(&b, st->codec, track->codec_priv.size);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
@@ -2028,10 +2028,11 @@ static int matroska_read_seek(AVFormatContext *s, int stream_index,
|
|||||||
if (tracks[i].type == MATROSKA_TRACK_TYPE_SUBTITLE
|
if (tracks[i].type == MATROSKA_TRACK_TYPE_SUBTITLE
|
||||||
&& !tracks[i].stream->discard != AVDISCARD_ALL) {
|
&& !tracks[i].stream->discard != AVDISCARD_ALL) {
|
||||||
index_sub = av_index_search_timestamp(tracks[i].stream, st->index_entries[index].timestamp, AVSEEK_FLAG_BACKWARD);
|
index_sub = av_index_search_timestamp(tracks[i].stream, st->index_entries[index].timestamp, AVSEEK_FLAG_BACKWARD);
|
||||||
if (index_sub >= 0
|
while(index_sub >= 0
|
||||||
&& st->index_entries[index_sub].pos < st->index_entries[index_min].pos
|
&& index_min >= 0
|
||||||
&& st->index_entries[index].timestamp - st->index_entries[index_sub].timestamp < 30000000000/matroska->time_scale)
|
&& tracks[i].stream->index_entries[index_sub].pos < st->index_entries[index_min].pos
|
||||||
index_min = index_sub;
|
&& st->index_entries[index].timestamp - tracks[i].stream->index_entries[index_sub].timestamp < 30000000000/matroska->time_scale)
|
||||||
|
index_min--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1174,12 +1174,18 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
|
|||||||
if (sid == 0x0000) {
|
if (sid == 0x0000) {
|
||||||
/* NIT info */
|
/* NIT info */
|
||||||
} else {
|
} else {
|
||||||
|
MpegTSFilter *fil = ts->pids[pmt_pid];
|
||||||
program = av_new_program(ts->stream, sid);
|
program = av_new_program(ts->stream, sid);
|
||||||
program->program_num = sid;
|
program->program_num = sid;
|
||||||
program->pmt_pid = pmt_pid;
|
program->pmt_pid = pmt_pid;
|
||||||
if (ts->pids[pmt_pid])
|
if (fil)
|
||||||
mpegts_close_filter(ts, ts->pids[pmt_pid]);
|
if ( fil->type != MPEGTS_SECTION
|
||||||
mpegts_open_section_filter(ts, pmt_pid, pmt_cb, ts, 1);
|
|| fil->pid != pmt_pid
|
||||||
|
|| fil->u.section_filter.section_cb != pmt_cb)
|
||||||
|
mpegts_close_filter(ts, ts->pids[pmt_pid]);
|
||||||
|
|
||||||
|
if (!ts->pids[pmt_pid])
|
||||||
|
mpegts_open_section_filter(ts, pmt_pid, pmt_cb, ts, 1);
|
||||||
add_pat_entry(ts, sid);
|
add_pat_entry(ts, sid);
|
||||||
add_pid_to_pmt(ts, sid, 0); //add pat pid to program
|
add_pid_to_pmt(ts, sid, 0); //add pat pid to program
|
||||||
add_pid_to_pmt(ts, sid, pmt_pid);
|
add_pid_to_pmt(ts, sid, pmt_pid);
|
||||||
|
@@ -518,6 +518,10 @@ static int ogg_read_close(AVFormatContext *s)
|
|||||||
|
|
||||||
for (i = 0; i < ogg->nstreams; i++) {
|
for (i = 0; i < ogg->nstreams; i++) {
|
||||||
av_free(ogg->streams[i].buf);
|
av_free(ogg->streams[i].buf);
|
||||||
|
if (ogg->streams[i].codec &&
|
||||||
|
ogg->streams[i].codec->cleanup) {
|
||||||
|
ogg->streams[i].codec->cleanup(s, i);
|
||||||
|
}
|
||||||
av_free(ogg->streams[i].private);
|
av_free(ogg->streams[i].private);
|
||||||
}
|
}
|
||||||
av_free(ogg->streams);
|
av_free(ogg->streams);
|
||||||
|
@@ -51,6 +51,11 @@ struct ogg_codec {
|
|||||||
* 0 if granule is the end time of the associated packet.
|
* 0 if granule is the end time of the associated packet.
|
||||||
*/
|
*/
|
||||||
int granule_is_start;
|
int granule_is_start;
|
||||||
|
/**
|
||||||
|
* Number of expected headers
|
||||||
|
*/
|
||||||
|
int nb_header;
|
||||||
|
void (*cleanup)(AVFormatContext *s, int idx);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ogg_stream {
|
struct ogg_stream {
|
||||||
|
@@ -188,6 +188,16 @@ fixup_vorbis_headers(AVFormatContext * as, struct oggvorbis_private *priv,
|
|||||||
return offset;
|
return offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void vorbis_cleanup(AVFormatContext *s, int idx)
|
||||||
|
{
|
||||||
|
struct ogg *ogg = s->priv_data;
|
||||||
|
struct ogg_stream *os = ogg->streams + idx;
|
||||||
|
struct oggvorbis_private *priv = os->private;
|
||||||
|
int i;
|
||||||
|
if (os->private)
|
||||||
|
for (i = 0; i < 3; i++)
|
||||||
|
av_freep(&priv->packet[i]);
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
vorbis_header (AVFormatContext * s, int idx)
|
vorbis_header (AVFormatContext * s, int idx)
|
||||||
@@ -278,5 +288,7 @@ vorbis_header (AVFormatContext * s, int idx)
|
|||||||
const struct ogg_codec ff_vorbis_codec = {
|
const struct ogg_codec ff_vorbis_codec = {
|
||||||
.magic = "\001vorbis",
|
.magic = "\001vorbis",
|
||||||
.magicsize = 7,
|
.magicsize = 7,
|
||||||
.header = vorbis_header
|
.header = vorbis_header,
|
||||||
|
.cleanup= vorbis_cleanup,
|
||||||
|
.nb_header = 3,
|
||||||
};
|
};
|
||||||
|
@@ -263,7 +263,7 @@ static int smacker_read_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
} else if(t & 0x40){ /* copy with offset */
|
} else if(t & 0x40){ /* copy with offset */
|
||||||
off = avio_r8(s->pb);
|
off = avio_r8(s->pb);
|
||||||
j = (t & 0x3F) + 1;
|
j = (t & 0x3F) + 1;
|
||||||
if (off + j > 0xff) {
|
if (off + j - 1 > 0xff) {
|
||||||
av_log(s, AV_LOG_ERROR,
|
av_log(s, AV_LOG_ERROR,
|
||||||
"Invalid palette update, offset=%d length=%d extends beyond palette size\n",
|
"Invalid palette update, offset=%d length=%d extends beyond palette size\n",
|
||||||
off, j);
|
off, j);
|
||||||
|
@@ -1032,12 +1032,14 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
|
|||||||
if (pkt->dts != AV_NOPTS_VALUE) {
|
if (pkt->dts != AV_NOPTS_VALUE) {
|
||||||
// got DTS from the stream, update reference timestamp
|
// got DTS from the stream, update reference timestamp
|
||||||
st->reference_dts = pkt->dts - pc->dts_ref_dts_delta * num / den;
|
st->reference_dts = pkt->dts - pc->dts_ref_dts_delta * num / den;
|
||||||
pkt->pts = pkt->dts + pc->pts_dts_delta * num / den;
|
|
||||||
} else if (st->reference_dts != AV_NOPTS_VALUE) {
|
} else if (st->reference_dts != AV_NOPTS_VALUE) {
|
||||||
// compute DTS based on reference timestamp
|
// compute DTS based on reference timestamp
|
||||||
pkt->dts = st->reference_dts + pc->dts_ref_dts_delta * num / den;
|
pkt->dts = st->reference_dts + pc->dts_ref_dts_delta * num / den;
|
||||||
pkt->pts = pkt->dts + pc->pts_dts_delta * num / den;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (st->reference_dts != AV_NOPTS_VALUE && pkt->pts == AV_NOPTS_VALUE)
|
||||||
|
pkt->pts = pkt->dts + pc->pts_dts_delta * num / den;
|
||||||
|
|
||||||
if (pc->dts_sync_point > 0)
|
if (pc->dts_sync_point > 0)
|
||||||
st->reference_dts = pkt->dts; // new reference
|
st->reference_dts = pkt->dts; // new reference
|
||||||
}
|
}
|
||||||
@@ -1828,7 +1830,7 @@ int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int
|
|||||||
//Fallback to old API if new is not implemented but old is
|
//Fallback to old API if new is not implemented but old is
|
||||||
//Note the old has somewat different sematics
|
//Note the old has somewat different sematics
|
||||||
if(s->iformat->read_seek || 1)
|
if(s->iformat->read_seek || 1)
|
||||||
return av_seek_frame(s, stream_index, ts, flags | (ts - min_ts > (uint64_t)(max_ts - ts) ? AVSEEK_FLAG_BACKWARD : 0));
|
return av_seek_frame(s, stream_index, ts, flags | ((uint64_t)ts - min_ts > (uint64_t)max_ts - ts ? AVSEEK_FLAG_BACKWARD : 0));
|
||||||
|
|
||||||
// try some generic seek like av_seek_frame_generic() but with new ts semantics
|
// try some generic seek like av_seek_frame_generic() but with new ts semantics
|
||||||
}
|
}
|
||||||
@@ -2670,6 +2672,7 @@ void avformat_free_context(AVFormatContext *s)
|
|||||||
av_free_packet(&st->cur_pkt);
|
av_free_packet(&st->cur_pkt);
|
||||||
}
|
}
|
||||||
av_dict_free(&st->metadata);
|
av_dict_free(&st->metadata);
|
||||||
|
av_freep(&st->probe_data.buf);
|
||||||
av_freep(&st->index_entries);
|
av_freep(&st->index_entries);
|
||||||
av_freep(&st->codec->extradata);
|
av_freep(&st->codec->extradata);
|
||||||
av_freep(&st->codec->subtitle_header);
|
av_freep(&st->codec->subtitle_header);
|
||||||
|
@@ -119,9 +119,8 @@ static inline void memcpy_backptr(uint8_t *dst, int back, int cnt);
|
|||||||
* thus creating a repeating pattern with a period length of back.
|
* thus creating a repeating pattern with a period length of back.
|
||||||
*/
|
*/
|
||||||
static inline void copy_backptr(LZOContext *c, int back, int cnt) {
|
static inline void copy_backptr(LZOContext *c, int back, int cnt) {
|
||||||
register const uint8_t *src = &c->out[-back];
|
|
||||||
register uint8_t *dst = c->out;
|
register uint8_t *dst = c->out;
|
||||||
if (src < c->out_start || src > dst) {
|
if (dst - c->out_start < back) {
|
||||||
c->error |= AV_LZO_INVALID_BACKPTR;
|
c->error |= AV_LZO_INVALID_BACKPTR;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user