Compare commits

...

31 Commits

Author SHA1 Message Date
Andreas Cadhalpun
620197d1ff doc: avoid incorrect phrase 'allows to'
Also fix typo found by Lou Logan:
Sacrifying -> Sacrificing

Reviewed-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 28efeb6502df37c99ccf18575d2552381d83a877)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-06-19 20:31:44 +02:00
Andreas Cadhalpun
73e7fe8e64 configure: make makeinfo_html check more robust
The current check is too strict for newer makeinfo versions.
Existing version strings are:
makeinfo (GNU texinfo) 4.13
makeinfo (GNU texinfo) 5.2
texi2any (GNU texinfo) 5.9.93

Probably version 6 will come in the not too far future.

Reviewed-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 72654526e4489c0aac05d25cfeca5bbba26026b3)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-06-19 20:31:36 +02:00
Andreas Cadhalpun
973e67e5d2 matroskadec: validate audio channels and bitdepth
In the TTA extradata re-construction the values are written with
avio_wl16 and if they don't fit into uint16_t, this triggers an
av_assert2 in avio_w8.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 92e79a2f7bf2f8bb0cb2d1a3e4d76737557071c4)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-06-19 20:31:27 +02:00
Andreas Cadhalpun
d89cd16afa matroskadec: check audio sample rate
And default to 8000 if it is invalid.

An invalid sample rate can trigger av_assert2 in av_rescale_rnd.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 5b76c82fd7a5f4f36bb901b8c43d7f7319599599)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-06-19 20:31:12 +02:00
Michael Niedermayer
7cbceb16ad Update for 2.7.1
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-19 19:03:00 +02:00
Michael Niedermayer
157dd52700 avcodec/dpxenc: implement write16/32 as functions
Fixes undefined behavior and segfault

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8edc17b639c4ac47913c467107ffb43c67c64890)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-19 18:40:49 +02:00
Michael Niedermayer
23614d09d5 avutil/avstring: Do not print NULL
Fixes segfault
Fixes Ticket4452

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 52e02a9e59f83ede84363d0f035389e44357d4a5)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-19 18:40:49 +02:00
Andreas Cadhalpun
bea4894d0c postproc: fix unaligned access
QP_store is only 8-bit-aligned, so accessing it as uint32_t causes
SIGBUS crashes on sparc.
The AV_RN32/AV_WN32 macros only do unaligned access in the
HAVE_FAST_UNALIGNED case.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 590743101dc934043f34013f1c9bb9fb261355b0)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-19 18:40:49 +02:00
Andreas Cadhalpun
250cf2d4da vp9: don't retain NULL as segmentation_map
This fixes segmentation faults, which were introduced in commit
4ba8f327.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit d216b9debd9843d31732ebb7344a85b3cd96b7cc)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-19 18:40:49 +02:00
wm4
93d076b4fd avformat: clarify what package needs to be compiled with SSL support
Try to reduce user confusion.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f6c3f1ed6048ebc55f652ed59f7af9acebbf57e5)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-19 18:40:49 +02:00
Michael Niedermayer
8749b83e0b avcodec/libx264: Avoid reconfig on equivalent aspect ratios
Workaround for ticket #4287.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 7b1c03aa744f1f82fe30ea2cd2aeef2ea01d5ce9)

Conflicts:
	libavcodec/libx264.c
2015-06-19 13:27:42 +02:00
George Boyle
a9b600cf39 avcodec/flacenc: Fix Invalid Rice order
Fixes ticket #4628.

The problem arose, in the sample file at least, in the last block where the
minimum and maximum Rice partition orders were both 0. In that case, and any
other where pmax == pmin, the original UINT32_MAX placeholder value for
bits[opt_porder] was getting overwritten before the comparison to check if the
current partition order is a new optimal, so the correct partition order and
RiceContext params were not being set.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2469ed32c81ebf2347e6883091c566724b286167)
2015-06-19 10:10:43 +02:00
wm4
c3c8365dbd tls_gnutls: fix hang on disconnection
GNUTLS_SHUT_RDWR means GnuTLS will keep waiting for the server's
termination reply. But since we don't shutdown the TCP connection at
this point yet, GnuTLS will just keep skipping actual data from the
server, which basically is perceived as hang.

Use GNUTLS_SHUT_WR instead, which doesn't have this problem.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2222f419da99ef85d49ab04e7e15b76612f4d054)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-18 22:09:01 +02:00
Michael Niedermayer
6432f8826d avcodec/hevc_ps: Only discard overread VPS if a previous is available
Fixes Ticket4621

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 57078e4d255a06246fef27846073f5ffb312b5dc)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-18 22:09:01 +02:00
Michael Niedermayer
e04ae11fa0 ffmpeg: Free last_frame instead of just unref
Fixes Ticket4611

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d1050d9950610aa2b27878b67bb2b902dd717e7c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-18 22:09:01 +02:00
Michael Niedermayer
08fadda68a avcodec/ffv1enc: fix bps for >8bit yuv when not explicitly set
Fixes Ticket4636

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3a6a8f6ee1cb619913b87b6c78e0436303e2a35f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-18 22:09:01 +02:00
wm4
9473e5a05d avio: fix potential crashes when combining ffio_ensure_seekback + crc
Calling ffio_ensure_seekback() if ffio_init_checksum() has been called
on the same context can lead to out of bounds memory accesses and
crashes. The reason is that ffio_ensure_seekback() does not update
checksum_ptr after reallocating the buffer, resulting in a dangling
pointer.

This effectively fixes potential crashes when opening mp3 files.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit dc87758775e2ce8be84e4fe598e12416e83d2845)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-18 22:09:01 +02:00
Andreas Cadhalpun
8a24ccfee3 examples/demuxing_decoding: use properties from frame instead of video_dec_ctx
This is more robust.

And only check if there is actually a frame returned.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit dd6c8575dbc8d3ff5dc2ffacb5028c253066ff78)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-18 22:09:01 +02:00
Andreas Cadhalpun
3ba55ea4ae h264: er: Copy from the previous reference only if compatible
Also use the frame pixel format instead of the one from the codec
context, which is more robust.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit fdc64a104410f5fcc7f35b62287b0ae502b7061a)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-18 22:09:01 +02:00
Andreas Cadhalpun
265db41540 doc: fix spelling errors
Neccessary -> Necessary
formated   -> formatted
thee       -> the
eventhough -> even though
seperately -> separately

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit ed0b1db640110cccdbf0db1d882fb952cf3a130d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-18 22:09:01 +02:00
Andreas Cadhalpun
ed5041143e configure: only disable VSX for !ppc64el
This reverts commit 04f0002, which made it impossible to enable VSX with
a generic cpu.

This changes the behavior back to what it was before commit b0af404.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 45babb01217f4cf776c50f1bec8ced0065277c89)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-18 22:09:01 +02:00
Michael Niedermayer
965f96c5ed ffmpeg_opt: Check for localtime() failure
Found-by: Daemon404
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8e91d9652ea5048d9014e7636e12c6ed4732d7b7)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-18 22:09:01 +02:00
James Almer
3b6aeb148b avformat/singlejpeg: fix standalone compilation
(cherry picked from commit 4aebaed0e17b396bd9d18acb8e58a4700c7559df)
2015-06-18 16:39:09 -03:00
Michael Niedermayer
259bb2555b configure: Disable VSX on unspecified / generic CPUs
Fixes fate tests on PPC64be

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 04f00022910c8b468fcf72c1f12ac410d3588802)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-12 14:16:10 +02:00
Deliang Fu
665b67014f avformat: Fix bug in parse_rps for HEVC.
Make the logic in libavformat/hevc.c parse_rps align with libavcodec/hevc_ps.c ff_hevc_decode_short_term_rps

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6e1f8780c833ef55815111d4771b95ff78567cdb)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-11 02:42:30 +02:00
Andreas Cadhalpun
1051c152f9 takdec: ensure chan2 is a valid channel index
If chan2 is not smaller than the number of channels, it can cause
segmentation faults due to dereferencing a NULL pointer.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 05c57ba2f42324da2fdc93d83d65bb68dd637613)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-10 12:23:21 +02:00
Michael Niedermayer
5a0862af55 avcodec/h264_slice: Use AVFrame diemensions for grayscale handling
The AVFrame values are closer to the AVFrame bitmap changed instead of
the AVCodecContext values, so this should be more robust

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit aef0e0f009802f1a5e21eb6465498632071e4475)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-10 12:05:42 +02:00
Michael Niedermayer
6e94e77632 avdevice/lavfi: do not rescale AV_NOPTS_VALUE in lavfi_read_packet()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 913685f55208efd78bfc34d82b261bd449e69774)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-10 00:56:38 +02:00
Michael Niedermayer
f5bb7b9992 MAINTAINERS: add 2.7
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-09 23:54:46 +02:00
Michael Niedermayer
0e9209183a Update for 2.7
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-09 23:36:06 +02:00
Michael Niedermayer
90932a9e3c add RELEASE_NOTES, based on previous 2015-06-09 23:36:06 +02:00
42 changed files with 152 additions and 66 deletions

View File

@ -3,6 +3,27 @@ releases are sorted from youngest to oldest.
version <next>:
version 2.7.1:
- postproc: fix unaligned access
- avformat: clarify what package needs to be compiled with SSL support
- avcodec/libx264: Avoid reconfig on equivalent aspect ratios
- avcodec/flacenc: Fix Invalid Rice order
- tls_gnutls: fix hang on disconnection
- avcodec/hevc_ps: Only discard overread VPS if a previous is available
- ffmpeg: Free last_frame instead of just unref
- avcodec/ffv1enc: fix bps for >8bit yuv when not explicitly set
- avio: fix potential crashes when combining ffio_ensure_seekback + crc
- examples/demuxing_decoding: use properties from frame instead of video_dec_ctx
- h264: er: Copy from the previous reference only if compatible
- doc: fix spelling errors
- configure: only disable VSX for !ppc64el
- ffmpeg_opt: Check for localtime() failure
- avformat/singlejpeg: fix standalone compilation
- configure: Disable VSX on unspecified / generic CPUs
- avformat: Fix bug in parse_rps for HEVC.
- takdec: ensure chan2 is a valid channel index
- avcodec/h264_slice: Use AVFrame dimensions for grayscale handling
version 2.7:
- FFT video filter
@ -573,7 +594,7 @@ easier to use. The changes are:
all the stream in the first input file, except for the second audio
stream'.
* There is a new option -c (or -codec) for choosing the decoder/encoder to
use, which allows to precisely specify target stream(s) consistently with
use, which makes it possible to precisely specify target stream(s) consistently with
other options. E.g. -c:v lib264 sets the codec for all video streams, -c:a:0
libvorbis sets the codec for the first audio stream and -c copy copies all
the streams without reencoding. Old -vcodec/-acodec/-scodec options are now

View File

@ -545,6 +545,7 @@ x86 Michael Niedermayer
Releases
========
2.7 Michael Niedermayer
2.6 Michael Niedermayer
2.5 Michael Niedermayer
2.4 Michael Niedermayer

View File

@ -1 +1 @@
2.6.git
2.7.1

15
RELEASE_NOTES Normal file
View File

@ -0,0 +1,15 @@
┌─────────────────────────────────────┐
│ RELEASE NOTES for FFmpeg 2.7 "Nash" │
└─────────────────────────────────────┘
The FFmpeg Project proudly presents FFmpeg 2.7 "Nash", about 3
months after the release of FFmpeg 2.6.
A complete Changelog is available at the root of the project, and the
complete Git history on http://source.ffmpeg.org.
We hope you will like this release as much as we enjoyed working on it, and
as usual, if you have any questions about it, or any FFmpeg related topic,
feel free to join us on the #ffmpeg IRC channel (on irc.freenode.net) or ask
on the mailing-lists.

7
configure vendored
View File

@ -4607,6 +4607,9 @@ unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
EOF
od -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian
if ! enabled ppc64 || enabled bigendian; then
disable vsx
fi
check_gas() {
log "check_gas using '$as' as AS"
@ -5236,8 +5239,8 @@ disabled securetransport || { check_func SecIdentityCreate "-Wl,-framework,CoreF
enable securetransport; }
makeinfo --version > /dev/null 2>&1 && enable makeinfo || disable makeinfo
enabled makeinfo && (makeinfo --version | \
grep -q 'makeinfo (GNU texinfo) 5' > /dev/null 2>&1) \
enabled makeinfo \
&& [ 0$(makeinfo --version | grep "texinfo" | sed 's/.*texinfo[^0-9]*\([0-9]*\)\..*/\1/') -ge 5 ] \
&& enable makeinfo_html || disable makeinfo_html
disabled makeinfo_html && texi2html --help 2> /dev/null | grep -q 'init-file' && enable texi2html || disable texi2html
perl -v > /dev/null 2>&1 && enable perl || disable perl

View File

@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER =
PROJECT_NUMBER = 2.7.1
# With the PROJECT_LOGO tag one can specify a logo or icon that is included
# in the documentation. The maximum height of the logo should not exceed 55

View File

@ -95,7 +95,7 @@ This decoder aims to implement the complete FLAC specification from Xiph.
@item -use_buggy_lpc
The lavc FLAC encoder used to produce buggy streams with high lpc values
(like the default value). This option allows to decode such streams
(like the default value). This option makes it possible to decode such streams
correctly by using lavc's old buggy lpc logic for decoding.
@end table

View File

@ -81,22 +81,24 @@ static int decode_packet(int *got_frame, int cached)
fprintf(stderr, "Error decoding video frame (%s)\n", av_err2str(ret));
return ret;
}
if (video_dec_ctx->width != width || video_dec_ctx->height != height ||
video_dec_ctx->pix_fmt != pix_fmt) {
/* To handle this change, one could call av_image_alloc again and
* decode the following frames into another rawvideo file. */
fprintf(stderr, "Error: Width, height and pixel format have to be "
"constant in a rawvideo file, but the width, height or "
"pixel format of the input video changed:\n"
"old: width = %d, height = %d, format = %s\n"
"new: width = %d, height = %d, format = %s\n",
width, height, av_get_pix_fmt_name(pix_fmt),
video_dec_ctx->width, video_dec_ctx->height,
av_get_pix_fmt_name(video_dec_ctx->pix_fmt));
return -1;
}
if (*got_frame) {
if (frame->width != width || frame->height != height ||
frame->format != pix_fmt) {
/* To handle this change, one could call av_image_alloc again and
* decode the following frames into another rawvideo file. */
fprintf(stderr, "Error: Width, height and pixel format have to be "
"constant in a rawvideo file, but the width, height or "
"pixel format of the input video changed:\n"
"old: width = %d, height = %d, format = %s\n"
"new: width = %d, height = %d, format = %s\n",
width, height, av_get_pix_fmt_name(pix_fmt),
frame->width, frame->height,
av_get_pix_fmt_name(frame->format));
return -1;
}
printf("video_frame%s n:%d coded_n:%d pts:%s\n",
cached ? "(cached)" : "",
video_frame_count++, frame->coded_picture_number,

View File

@ -117,7 +117,7 @@ static int open_output_file(const char *filename)
/* in this example, we choose transcoding to same codec */
encoder = avcodec_find_encoder(dec_ctx->codec_id);
if (!encoder) {
av_log(NULL, AV_LOG_FATAL, "Neccessary encoder not found\n");
av_log(NULL, AV_LOG_FATAL, "Necessary encoder not found\n");
return AVERROR_INVALIDDATA;
}

View File

@ -1178,6 +1178,8 @@ static void do_video_out(AVFormatContext *s,
av_frame_unref(ost->last_frame);
if (next_picture)
av_frame_ref(ost->last_frame, next_picture);
else
av_frame_free(&ost->last_frame);
}
static double psnr(double d)

View File

@ -2438,6 +2438,9 @@ static int opt_vstats(void *optctx, const char *opt, const char *arg)
time_t today2 = time(NULL);
struct tm *today = localtime(&today2);
if (!today)
return AVERROR(errno);
snprintf(filename, sizeof(filename), "vstats_%02d%02d%02d.log", today->tm_hour, today->tm_min,
today->tm_sec);
return opt_vstats_file(NULL, opt, filename);

View File

@ -103,7 +103,7 @@ typedef struct ASSSplitContext ASSSplitContext;
* Split a full ASS file or a ASS header from a string buffer and store
* the split structure in a newly allocated context.
*
* @param buf String containing the ASS formated data.
* @param buf String containing the ASS formatted data.
* @return Newly allocated struct containing split data.
*/
ASSSplitContext *ff_ass_split(const char *buf);

View File

@ -247,7 +247,7 @@ static int build_table(VLC *vlc, int table_nb_bits, int nb_codes,
/* Build VLC decoding tables suitable for use with get_vlc().
'nb_bits' set thee decoding table size (2^nb_bits) entries. The
'nb_bits' set the decoding table size (2^nb_bits) entries. The
bigger it is, the faster is the decoding. But it should not be too
big to save memory and L1 cache. '9' is a good compromise.
@ -265,7 +265,7 @@ static int build_table(VLC *vlc, int table_nb_bits, int nb_codes,
'xxx_size' : gives the number of bytes of each entry of the 'bits'
or 'codes' tables.
'wrap' and 'size' allows to use any memory configuration and types
'wrap' and 'size' make it possible to use any memory configuration and types
(byte/word/long) to store the 'bits', 'codes', and 'symbols' tables.
'use_static' should be set to 1 for tables, which should be freed

View File

@ -75,17 +75,20 @@ static av_cold int encode_init(AVCodecContext *avctx)
return 0;
}
#define write16(p, value) \
do { \
if (s->big_endian) AV_WB16(p, value); \
else AV_WL16(p, value); \
} while(0)
static av_always_inline void write16_internal(int big_endian, void *p, int value)
{
if (big_endian) AV_WB16(p, value);
else AV_WL16(p, value);
}
#define write32(p, value) \
do { \
if (s->big_endian) AV_WB32(p, value); \
else AV_WL32(p, value); \
} while(0)
static av_always_inline void write32_internal(int big_endian, void *p, int value)
{
if (big_endian) AV_WB32(p, value);
else AV_WL32(p, value);
}
#define write16(p, value) write16_internal(s->big_endian, p, value)
#define write32(p, value) write32_internal(s->big_endian, p, value)
static void encode_rgb48_10bit(AVCodecContext *avctx, const AVPicture *pic, uint8_t *dst)
{

View File

@ -753,7 +753,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
s->chroma_planes = desc->nb_components < 3 ? 0 : 1;
s->colorspace = 0;
s->transparency = desc->nb_components == 4;
if (!avctx->bits_per_raw_sample)
if (!avctx->bits_per_raw_sample && !s->bits_per_raw_sample)
s->bits_per_raw_sample = 8;
break;
case AV_PIX_FMT_RGB32:

View File

@ -705,7 +705,7 @@ static uint64_t calc_rice_params(RiceContext *rc,
bits[pmin] = UINT32_MAX;
for (i = pmax; ; ) {
bits[i] = calc_optimal_rice_params(&tmp_rc, i, sums, n, pred_order, kmax, exact);
if (bits[i] < bits[opt_porder]) {
if (bits[i] < bits[opt_porder] || pmax == pmin) {
opt_porder = i;
*rc = tmp_rc;
}

View File

@ -251,11 +251,11 @@ static int alloc_picture(H264Context *h, H264Picture *pic)
av_pix_fmt_get_chroma_sub_sample(pic->f->format,
&h_chroma_shift, &v_chroma_shift);
for(i=0; i<FF_CEIL_RSHIFT(h->avctx->height, v_chroma_shift); i++) {
for(i=0; i<FF_CEIL_RSHIFT(pic->f->height, v_chroma_shift); i++) {
memset(pic->f->data[1] + pic->f->linesize[1]*i,
0x80, FF_CEIL_RSHIFT(h->avctx->width, h_chroma_shift));
0x80, FF_CEIL_RSHIFT(pic->f->width, h_chroma_shift));
memset(pic->f->data[2] + pic->f->linesize[2]*i,
0x80, FF_CEIL_RSHIFT(h->avctx->width, h_chroma_shift));
0x80, FF_CEIL_RSHIFT(pic->f->width, h_chroma_shift));
}
}
@ -1549,12 +1549,15 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl)
* vectors. Given we are concealing a lost frame, this probably
* is not noticeable by comparison, but it should be fixed. */
if (h->short_ref_count) {
if (prev) {
if (prev &&
h->short_ref[0]->f->width == prev->f->width &&
h->short_ref[0]->f->height == prev->f->height &&
h->short_ref[0]->f->format == prev->f->format) {
av_image_copy(h->short_ref[0]->f->data,
h->short_ref[0]->f->linesize,
(const uint8_t **)prev->f->data,
prev->f->linesize,
h->avctx->pix_fmt,
prev->f->format,
h->mb_width * 16,
h->mb_height * 16);
h->short_ref[0]->poc = prev->poc + 2;

View File

@ -499,7 +499,8 @@ int ff_hevc_decode_nal_vps(HEVCContext *s)
if (get_bits_left(gb) < 0) {
av_log(s->avctx, AV_LOG_ERROR,
"Overread VPS by %d bits\n", -get_bits_left(gb));
goto err;
if (s->vps_list[vps_id])
goto err;
}
if (s->vps_list[vps_id] &&

View File

@ -76,7 +76,7 @@
* encodes them with just enough bits to reproduce the background noise.
*
* Discontinuous Transmission (DTX)
* DTX is an addition to VAD/VBR operation, that allows to stop transmitting
* DTX is an addition to VAD/VBR operation, that makes it possible to stop transmitting
* completely when the background noise is stationary.
* In file-based operation only 5 bits are used for such frames.
*/

View File

@ -191,8 +191,7 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame,
x4->params.b_tff = frame->top_field_first;
x264_encoder_reconfig(x4->enc, &x4->params);
}
if (x4->params.vui.i_sar_height != ctx->sample_aspect_ratio.den ||
x4->params.vui.i_sar_width != ctx->sample_aspect_ratio.num) {
if (x4->params.vui.i_sar_height*ctx->sample_aspect_ratio.num != ctx->sample_aspect_ratio.den * x4->params.vui.i_sar_width) {
x4->params.vui.i_sar_height = ctx->sample_aspect_ratio.den;
x4->params.vui.i_sar_width = ctx->sample_aspect_ratio.num;
x264_encoder_reconfig(x4->enc, &x4->params);

View File

@ -504,7 +504,7 @@ static int hadamard8_diff8x8_altivec(MpegEncContext *s, uint8_t *dst,
}
/*
* 16x8 works with 16 elements; it allows to avoid replicating loads, and
* 16x8 works with 16 elements; it can avoid replicating loads, and
* gives the compiler more room for scheduling. It's only used from
* inside hadamard8_diff16_altivec.
*

View File

@ -801,6 +801,12 @@ static int tak_decode_frame(AVCodecContext *avctx, void *data,
if (s->mcdparams[i].present) {
s->mcdparams[i].index = get_bits(gb, 2);
s->mcdparams[i].chan2 = get_bits(gb, 4);
if (s->mcdparams[i].chan2 >= avctx->channels) {
av_log(avctx, AV_LOG_ERROR,
"invalid channel 2 (%d) for %d channel(s)\n",
s->mcdparams[i].chan2, avctx->channels);
return AVERROR_INVALIDDATA;
}
if (s->mcdparams[i].index == 1) {
if ((nbit == s->mcdparams[i].chan2) ||
(ch_mask & 1 << s->mcdparams[i].chan2))

View File

@ -3286,7 +3286,7 @@ static void decode_b(AVCodecContext *ctx, int row, int col,
}
// emulated overhangs if the stride of the target buffer can't hold. This
// allows to support emu-edge and so on even if we have large block
// makes it possible to support emu-edge and so on even if we have large block
// overhangs
emu[0] = (col + w4) * 8 > f->linesize[0] ||
(row + h4) > s->rows;
@ -3988,7 +3988,8 @@ static int vp9_decode_frame(AVCodecContext *ctx, void *frame,
int size = pkt->size;
VP9Context *s = ctx->priv_data;
int res, tile_row, tile_col, i, ref, row, col;
int retain_segmap_ref = s->segmentation.enabled && !s->segmentation.update_map;
int retain_segmap_ref = s->segmentation.enabled && !s->segmentation.update_map
&& s->frames[REF_FRAME_SEGMAP].segmentation_map;
ptrdiff_t yoff, uvoff, ls_y, ls_uv;
AVFrame *f;
int bytesperpixel;

View File

@ -80,7 +80,7 @@
"movq %%mm"#R1", "#OFF"(%1) \n\t" \
"add %2, %0 \n\t"
/** Sacrifying mm6 allows to pipeline loads from src */
/** Sacrificing mm6 makes it possible to pipeline loads from src */
static void vc1_put_ver_16b_shift2_mmx(int16_t *dst,
const uint8_t *src, x86_reg stride,
int rnd, int64_t shift)

View File

@ -27,7 +27,7 @@
* @author Benoit Fouet ( benoit fouet free fr )
* @author Nicolas George ( nicolas george normalesup org )
*
* This avdevice decoder allows to capture audio from an ALSA (Advanced
* This avdevice decoder can capture audio from an ALSA (Advanced
* Linux Sound Architecture) device.
*
* The filename parameter is the name of an ALSA PCM device capable of

View File

@ -26,7 +26,7 @@
* @author Luca Abeni ( lucabe72 email it )
* @author Benoit Fouet ( benoit fouet free fr )
*
* This avdevice encoder allows to play audio to an ALSA (Advanced Linux
* This avdevice encoder can play audio to an ALSA (Advanced Linux
* Sound Architecture) device.
*
* The filename parameter is the name of an ALSA PCM device capable of

View File

@ -324,7 +324,7 @@ int avdevice_dev_to_app_control_message(struct AVFormatContext *s,
* Following API allows user to probe device capabilities (supported codecs,
* pixel formats, sample formats, resolutions, channel counts, etc).
* It is build on top op AVOption API.
* Queried capabilities allows to set up converters of video or audio
* Queried capabilities make it possible to set up converters of video or audio
* parameters that fit to the device.
*
* List of capabilities that can be queried:

View File

@ -411,7 +411,7 @@ static int lavfi_read_packet(AVFormatContext *avctx, AVPacket *pkt)
continue;
} else if (ret < 0)
return ret;
d = av_rescale_q(frame->pts, tb, AV_TIME_BASE_Q);
d = av_rescale_q_rnd(frame->pts, tb, AV_TIME_BASE_Q, AV_ROUND_NEAR_INF|AV_ROUND_PASS_MINMAX);
av_dlog(avctx, "sink_idx:%d time:%f\n", i, d);
av_frame_unref(frame);

View File

@ -67,7 +67,7 @@
* with an AVFMT_NOFILE format).
*
* @section lavf_options Passing options to (de)muxers
* Lavf allows to configure muxers and demuxers using the @ref avoptions
* It is possible to configure lavf muxers and demuxers using the @ref avoptions
* mechanism. Generic (format-independent) libavformat options are provided by
* AVFormatContext, they can be examined from a user program by calling
* av_opt_next() / av_opt_find() on an allocated AVFormatContext (or its AVClass
@ -234,7 +234,7 @@
* @defgroup lavf_io I/O Read/Write
* @{
* @section lavf_io_dirlist Directory listing
* The directory listing API allows to list files on remote servers.
* The directory listing API makes it possible to list files on remote servers.
*
* Some of possible use cases:
* - an "open file" dialog to choose files from a remote location,
@ -2361,7 +2361,7 @@ int av_write_uncoded_frame(AVFormatContext *s, int stream_index,
/**
* Write a uncoded frame to an output media file.
*
* If the muxer supports it, this function allows to write an AVFrame
* If the muxer supports it, this function makes it possible to write an AVFrame
* structure directly, without encoding it into a packet.
* It is mostly useful for devices and similar special muxers that use raw
* video or PCM data and will not serialize it into a byte stream.

View File

@ -263,7 +263,7 @@ int ffurl_alloc(URLContext **puc, const char *filename, int flags,
*puc = NULL;
if (av_strstart(filename, "https:", NULL))
av_log(NULL, AV_LOG_WARNING, "https protocol not found, recompile with "
av_log(NULL, AV_LOG_WARNING, "https protocol not found, recompile FFmpeg with "
"openssl, gnutls,\n"
"or securetransport enabled.\n");
return AVERROR_PROTOCOL_NOT_FOUND;

View File

@ -79,7 +79,7 @@ typedef struct AVIODirEntry {
char *name; /**< Filename */
int type; /**< Type of the entry */
int utf8; /**< Set to 1 when name is encoded with UTF-8, 0 otherwise.
Name can be encoded with UTF-8 eventhough 0 is set. */
Name can be encoded with UTF-8 even though 0 is set. */
int64_t size; /**< File size in bytes, -1 if unknown. */
int64_t modification_timestamp; /**< Time of last modification in microseconds since unix
epoch, -1 if unknown. */

View File

@ -812,6 +812,7 @@ int ffio_ensure_seekback(AVIOContext *s, int64_t buf_size)
int max_buffer_size = s->max_packet_size ?
s->max_packet_size : IO_BUFFER_SIZE;
int filled = s->buf_end - s->buffer;
ptrdiff_t checksum_ptr_offset = s->checksum_ptr ? s->checksum_ptr - s->buffer : -1;
buf_size += s->buf_ptr - s->buffer + max_buffer_size;
@ -829,6 +830,8 @@ int ffio_ensure_seekback(AVIOContext *s, int64_t buf_size)
s->buf_end = buffer + (s->buf_end - s->buffer);
s->buffer = buffer;
s->buffer_size = buf_size;
if (checksum_ptr_offset >= 0)
s->checksum_ptr = s->buffer + checksum_ptr_offset;
return 0;
}

View File

@ -562,7 +562,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
}
if (enc->codec_id == AV_CODEC_ID_H264 || enc->codec_id == AV_CODEC_ID_MPEG4) {
/* check if extradata looks like mp4 formated */
/* check if extradata looks like mp4 formatted */
if (enc->extradata_size > 0 && *(uint8_t*)enc->extradata != 1)
if ((ret = ff_avc_parse_nal_units_buf(pkt->data, &data, &size)) < 0)
return ret;

View File

@ -449,7 +449,7 @@ static int parse_rps(GetBitContext *gb, unsigned int rps_idx,
*
* NumDeltaPocs[RefRpsIdx]: num_delta_pocs[rps_idx - 1]
*/
for (i = 0; i < num_delta_pocs[rps_idx - 1]; i++) {
for (i = 0; i <= num_delta_pocs[rps_idx - 1]; i++) {
uint8_t use_delta_flag = 0;
uint8_t used_by_curr_pic_flag = get_bits1(gb);
if (!used_by_curr_pic_flag)

View File

@ -1668,6 +1668,14 @@ static int matroska_parse_tracks(AVFormatContext *s)
if (!track->codec_id)
continue;
if (track->audio.samplerate < 0 || track->audio.samplerate > INT_MAX ||
isnan(track->audio.samplerate)) {
av_log(matroska->ctx, AV_LOG_WARNING,
"Invalid sample rate %f, defaulting to 8000 instead.\n",
track->audio.samplerate);
track->audio.samplerate = 8000;
}
if (track->type == MATROSKA_TRACK_TYPE_VIDEO) {
if (!track->default_duration && track->video.frame_rate > 0)
track->default_duration = 1000000000 / track->video.frame_rate;
@ -1869,6 +1877,18 @@ static int matroska_parse_tracks(AVFormatContext *s)
NULL, NULL, NULL, NULL);
avio_write(&b, "TTA1", 4);
avio_wl16(&b, 1);
if (track->audio.channels > UINT16_MAX ||
track->audio.bitdepth > UINT16_MAX) {
av_log(matroska->ctx, AV_LOG_WARNING,
"Too large audio channel number %"PRIu64
" or bitdepth %"PRIu64". Skipping track.\n",
track->audio.channels, track->audio.bitdepth);
av_freep(&extradata);
if (matroska->ctx->error_recognition & AV_EF_EXPLODE)
return AVERROR_INVALIDDATA;
else
continue;
}
avio_wl16(&b, track->audio.channels);
avio_wl16(&b, track->audio.bitdepth);
if (track->audio.out_samplerate < 0 || track->audio.out_samplerate > INT_MAX)

View File

@ -250,7 +250,9 @@ AVOutputFormat ff_mjpeg_muxer = {
.write_packet = ff_raw_write_packet,
.flags = AVFMT_NOTIMESTAMPS,
};
#endif
#if CONFIG_SINGLEJPEG_MUXER
AVOutputFormat ff_singlejpeg_muxer = {
.name = "singlejpeg",
.long_name = NULL_IF_CONFIG_SMALL("JPEG single image"),

View File

@ -87,7 +87,7 @@ static int tls_close(URLContext *h)
{
TLSContext *c = h->priv_data;
if (c->need_shutdown)
gnutls_bye(c->session, GNUTLS_SHUT_RDWR);
gnutls_bye(c->session, GNUTLS_SHUT_WR);
if (c->session)
gnutls_deinit(c->session);
if (c->cred)

View File

@ -502,7 +502,7 @@ int main(void)
printf("Testing av_append_path_component()\n");
#define TEST_APPEND_PATH_COMPONENT(path, component, expected) \
fullpath = av_append_path_component((path), (component)); \
printf("%s = %s\n", fullpath, expected); \
printf("%s = %s\n", fullpath ? fullpath : "(null)", expected); \
av_free(fullpath);
TEST_APPEND_PATH_COMPONENT(NULL, NULL, "(null)")
TEST_APPEND_PATH_COMPONENT("path", NULL, "path");

View File

@ -309,7 +309,7 @@ AVClassCategory av_default_get_category(void *ptr);
/**
* Format a line of log the same way as the default callback.
* @param line buffer to receive the formated line
* @param line buffer to receive the formatted line
* @param line_size size of the buffer
* @param print_prefix used to store whether the prefix must be printed;
* must point to a persistent integer initially set to 1

View File

@ -213,7 +213,7 @@
* In some cases it may be more convenient to put all options into an
* AVDictionary and call av_opt_set_dict() on it. A specific case of this
* are the format/codec open functions in lavf/lavc which take a dictionary
* filled with option as a parameter. This allows to set some options
* filled with option as a parameter. This makes it possible to set some options
* that cannot be set otherwise, since e.g. the input file format is not known
* before the file is actually opened.
*/

View File

@ -530,7 +530,7 @@ enum AVColorRange {
* Illustration showing the location of the first (top left) chroma sample of the
* image, the left shows only luma, the right
* shows the location of the chroma sample, the 2 could be imagined to overlay
* each other but are drawn seperately due to limitations of ASCII
* each other but are drawn separately due to limitations of ASCII
*
* 1st 2nd 1st 2nd horizontal luma sample positions
* v v v v

View File

@ -76,6 +76,7 @@ try to unroll inner for(x=0 ... loop to avoid these damn if(x ... checks
#include "config.h"
#include "libavutil/avutil.h"
#include "libavutil/avassert.h"
#include "libavutil/intreadwrite.h"
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
@ -997,7 +998,7 @@ void pp_postprocess(const uint8_t * src[3], const int srcStride[3],
int i;
const int count= FFMAX(mbHeight * QPStride, mbWidth);
for(i=0; i<(count>>2); i++){
((uint32_t*)c->nonBQPTable)[i] = ((const uint32_t*)QP_store)[i] & 0x3F3F3F3F;
AV_WN32(c->nonBQPTable + (i<<2), AV_RN32(QP_store + (i<<2)) & 0x3F3F3F3F);
}
for(i<<=2; i<count; i++){
c->nonBQPTable[i] = QP_store[i] & 0x3F;