Compare commits

...

43 Commits

Author SHA1 Message Date
e1ce4f805f update for 2.4.1
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-21 23:37:09 +02:00
bb5c0ac922 avfilter/vf_scale: Allow chroma samples to be above and to the left of luma samples
Found-by: Kierank
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e927682e1b)

Conflicts:

	libavfilter/version.h
2014-09-21 23:37:09 +02:00
d389438296 swscale: Allow chroma samples to be above and to the left of luma samples
Found-by: Kierank
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 61af6bebb4)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-21 23:37:09 +02:00
3b57d7769a avcodec/libilbc: support for latest git of libilbc
in the latest git commits of libilbc developers removed WebRtc_xxx typedefs

This commit uses int types instead,
it's safe to apply also for previous versions since
WebRtc_Word16 was always a typedef of int16_t and
WebRtc_UWord16 a typedef of uint16_t

Reviewed-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 59af5383c1)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-21 17:04:04 +02:00
b7f2719951 libavcodec/webp: treat out-of-bound palette index as translucent black
See https://code.google.com/p/webp/issues/detail?id=206
for a description of the problem/fix.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

This patch makes the decoder follow the recommendation of the spec.
There is some disagreement (see "[FFmpeg-devel] [PATCH]: libavcodec/webp")
about what would be best to be written in the spec, so in case the spec
is changed again, this potentially would need to be amended or reverted
(cherry picked from commit 4fd21d58a7)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-19 16:37:10 +02:00
dc4e34a2f0 vf_deshake: rename Transform.vector to Transform.vec to avoid compiler confusion
The token 'vector' is a keyword in the Vector/SIMD Multimedia Extension data types and thus should not be used as a variable name.

This fixes building on powerpc/ppc64el.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-18 01:11:33 +02:00
d694ab846c avcodec/x86/vp9lpf: Always include x86util.asm
Fixes executable stack

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-18 01:11:33 +02:00
ab02548c8a Merge commit 'b45ab61b24a8f2aeafdd4451491b1b30b7875ee5' into release/2.4
* commit 'b45ab61b24a8f2aeafdd4451491b1b30b7875ee5':
  apetag: Fix APE tag size check

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-18 01:04:25 +02:00
b45ab61b24 apetag: Fix APE tag size check
The size variable is (correctly) unsigned, but is passed to several functions
which take signed parameters, such as avio_read, sometimes after having
numbers added to it. So ensure that size remains within the bounds that
these functions can handle.

(cherry picked from commit c5560e72d0)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-09-17 07:07:22 -07:00
cc73b4f574 tools/crypto_bench: fix build when AV_READ_TIME is unavailable
Found-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4a99134f1a)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-16 18:27:33 +02:00
8ac3b2cdb7 RELEASE_NOTES: add H.261 & HEVC RTP support
Suggested-by: Thomas Volkert <silvo@gmx.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-16 11:34:50 +02:00
ace90ee265 avcodec/mjpegenc: the AMV encoder doesnt support yuv422
Fixes Ticket3883

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-14 17:46:33 +02:00
703bd31647 Changelog: add 2.4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 808db3e687)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-14 16:53:20 +02:00
c16e80ee3d doc/examples: remove unneeded NULL checks
dst_file cannot be NULL

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-14 16:53:19 +02:00
66ac5b96e8 MAINTAINERS: Add 2.4 to maintained releases, drop 2.3
2.2 is used by 4 distributions, 2.3 by none, thus continuing maintaining
2.2 makes more sense than 2.3 see:
https://trac.ffmpeg.org/wiki/Downstreams

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-14 16:00:15 +02:00
547cad8c81 Merge commit 'f851477889ae48e2f17073cf7486e1d5561b7ae4' into release/2.4
* commit 'f851477889ae48e2f17073cf7486e1d5561b7ae4': (26 commits)
  Prepare for 11 release
  doc: Fix syntax and logical errors in avconv stream combination example
  Fix RELEASE identification
  Mark 11 release in the changelog
  Add release notes for 11.
  avcodec: fix missing doxygen comment marker
  Prepare for 11_beta2 Release
  license: Mention that vf_interlace is GPL, not LGPL
  matroskaenc: convert avstream stereo3d side data during encoding
  matroskadec: parse stereo mode on decoding
  avcodec: add stream-level stereo3d side data
  matroska: list supported extensions
  doc/APIchanges: fill in missing hashes and dates
  pulse: Add a wallclock option to be compatible with other other captures
  vc1: Initialize start_code_found to 0
  avconv: fix parsing the AVOptions for -target
  avconv: fix the muxrate values for -target
  mpegenc: limit the maximum muxrate
  vc1: Fix the skip condition
  vfwcap: Add fallback define for HWND_MESSAGE
  ...

Conflicts:
	Changelog
	LICENSE.md
	RELEASE
	doc/APIchanges
	doc/RELEASE_NOTES
	doc/ffmpeg.texi
	ffmpeg_opt.c
	libavcodec/avcodec.h
	libavcodec/error_resilience.c
	libavcodec/utils.c
	libavcodec/vc1_parser.c
	libavcodec/version.h
	libavdevice/pulse_audio_dec.c
	libavfilter/setpts.c
	libavfilter/src_movie.c
	libavformat/electronicarts.c
	libavformat/matroska.c
	libavformat/matroskadec.c
	libavformat/matroskaenc.c
	libavformat/mpegenc.c

Merge for metadata only, all these backports are already present in
release/2.4 as its branched off from master at a later point so that
all these changes where in master already.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-14 15:57:32 +02:00
55b1a1e9c1 update for 2.4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-14 15:37:11 +02:00
f851477889 Prepare for 11 release 2014-09-13 11:14:46 -07:00
4f2d4b98fc doc: Fix syntax and logical errors in avconv stream combination example
Bug-Id: 661
CC: libav-stable@libav.org
(cherry picked from commit 775a0b04f0)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-09-10 12:01:16 -07:00
7d8ebb8774 Fix RELEASE identification
This was accidentally left over in b5d4f49e3c
2014-09-08 20:58:45 -04:00
07b0ccf511 Mark 11 release in the changelog
Also fix some typos in the entries for the 11 release.

(cherry picked from commit d9792b7735)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-09-04 15:20:11 -07:00
9d3e69ae30 Add release notes for 11.
(cherry picked from commit 12f0388f9c)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-09-04 08:25:45 -07:00
480633c6c2 avcodec: fix missing doxygen comment marker 2014-09-01 00:48:58 +01:00
b5d4f49e3c Prepare for 11_beta2 Release 2014-08-30 11:51:28 -04:00
4cde8bae49 license: Mention that vf_interlace is GPL, not LGPL
(cherry picked from commit 9e8bbe7d4d)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-28 10:50:34 -07:00
5b740d1eaa matroskaenc: convert avstream stereo3d side data during encoding
Write the StereoMode Embl to bitstream.
2014-08-28 13:07:17 -04:00
152e09fde7 matroskadec: parse stereo mode on decoding
Convert the Matroska stereo format to the Stereo3D format, and add a
Stereo3D side data to the stream.

Bump the doctype version supported.

Bug-Id: 728 / https://bugs.debian.org/757185
2014-08-28 13:07:17 -04:00
110841c3ab avcodec: add stream-level stereo3d side data 2014-08-28 13:05:31 -04:00
5694831e06 matroska: list supported extensions 2014-08-28 13:05:31 -04:00
1f52f82a55 doc/APIchanges: fill in missing hashes and dates 2014-08-28 13:02:15 -04:00
e62f08ca8d pulse: Add a wallclock option to be compatible with other other captures
alsa and x11grab use av_gettime() to report timestamps.

Have it on by default.

Bug-Id: 647
(cherry picked from commit 424b929b5c)
(cherry picked from commit 404731bd20)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-08-28 11:13:19 +02:00
ee099059e7 vc1: Initialize start_code_found to 0 2014-08-27 12:38:09 +02:00
e2a89f7f0f avconv: fix parsing the AVOptions for -target
CC: libav-stable@libav.org
(cherry picked from commit f5245a9c62)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-27 06:25:26 +00:00
7c46855074 avconv: fix the muxrate values for -target
The mpegenc private option values are in 50-byte units.

CC: libav-stable@libav.org
(cherry picked from commit 1688eef253)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-27 06:25:25 +00:00
c2d6cc2971 mpegenc: limit the maximum muxrate
It is written to the file as a 22-bit value.

CC: libav-stable@libav.org
(cherry picked from commit 75bbaf2493)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-27 06:25:24 +00:00
8c91414803 vc1: Fix the skip condition
As written in the comment above, skip must be added only if a
start code is found.
2014-08-26 14:47:45 +02:00
0263750a0d vfwcap: Add fallback define for HWND_MESSAGE
Some obsolete versions of the MinGW32 runtime (<4.0.0) lack the definition.

(cherry picked from commit ab56fabe62)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-25 17:17:29 -07:00
63795fe5b9 setpts: Add missing inttypes.h #include for PRId64
Also convert a debug av_log() to av_dlog().

(cherry picked from commit 593aaee953)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-24 13:00:53 -07:00
d2bad216f7 mpeg12enc: Add missing #include for PICT_FRAME
(cherry picked from commit 8fc6a70c21)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-24 13:00:53 -07:00
d04fb11868 error_resilience: Drop asserts from guess_mv()
The asserts check struct members that are not referenced in guess_mv()
and one of them fails to compile.

(cherry picked from commit 7cb66ebc0b)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-24 13:00:53 -07:00
e8f2823f06 vsrc_movie: Adjust a silly typo from b977b287f6
(cherry picked from commit 11cd727fbd)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-24 13:00:53 -07:00
7dfccac20c electronicarts: do not fail on zero-sized chunks
At least one FATE sample contains such chunks and happens to work simply
by accident (due to find_stream_info() swallowing the error).

CC: libav-stable@libav.org
(cherry picked from commit 4d6c515284)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-22 11:25:40 +00:00
04361427e6 Revert "lavf: eliminate ff_get_audio_frame_size()"
This reverts commit 30e50c5027.

The original commit broke the ability to stream AAC over HTTP/Icecast. It looks
like avformat_find_stream_info() gets stuck in an infinite loop, never hitting
AVFormatContext.max_analyze_duration since duration is never set for any of
the packets.

Example stream: http://listen.classicrocklounge.com:8000/aac64

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-22 11:22:38 +00:00
18 changed files with 71 additions and 55 deletions

View File

@ -2,6 +2,17 @@ Entries are sorted chronologically from oldest to youngest within each release,
releases are sorted from youngest to oldest.
version <next>:
version 2.4.1:
- swsscale: Allow chroma samples to be above and to the left of luma samples
- avcodec/libilbc: support for latest git of libilbc
- avcodec/webp: treat out-of-bound palette index as translucent black
- vf_deshake: rename Transform.vector to Transform.vec to avoid compiler confusion
- apetag: Fix APE tag size check
- tools/crypto_bench: fix build when AV_READ_TIME is unavailable
version 2.4:
- Icecast protocol
- ported lenscorrection filter from frei0r filter
- large optimizations in dctdnoiz to make it usable

View File

@ -534,7 +534,7 @@ x86 Michael Niedermayer
Releases
========
2.3 Michael Niedermayer
2.4 Michael Niedermayer
2.2 Michael Niedermayer
1.2 Michael Niedermayer

View File

@ -1 +1 @@
2.3.git
2.4.1

View File

@ -53,6 +53,8 @@
• API for live metadata updates through event flags.
• UTF-16 support in text subtitles formats.
• The ASS muxer now reorders the Dialogue events properly.
• support for H.261 RTP payload format (RFC 4587)
• HEVC/H.265 RTP payload format (draft v6) depacketizer
┌────────────────────────────┐
│ libavfilter │

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.4.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

@ -199,8 +199,7 @@ int main(int argc, char **argv)
fmt, dst_ch_layout, dst_nb_channels, dst_rate, dst_filename);
end:
if (dst_file)
fclose(dst_file);
fclose(dst_file);
if (src_data)
av_freep(&src_data[0]);

View File

@ -132,8 +132,7 @@ int main(int argc, char **argv)
av_get_pix_fmt_name(dst_pix_fmt), dst_w, dst_h, dst_filename);
end:
if (dst_file)
fclose(dst_file);
fclose(dst_file);
av_freep(&src_data[0]);
av_freep(&dst_data[0]);
sws_freeContext(sws_ctx);

View File

@ -96,8 +96,7 @@ static int ilbc_decode_frame(AVCodecContext *avctx, void *data,
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
return ret;
WebRtcIlbcfix_DecodeImpl((WebRtc_Word16*) frame->data[0],
(const WebRtc_UWord16*) buf, &s->decoder, 1);
WebRtcIlbcfix_DecodeImpl((int16_t *) frame->data[0], (const uint16_t *) buf, &s->decoder, 1);
*got_frame_ptr = 1;
@ -170,7 +169,7 @@ static int ilbc_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
if ((ret = ff_alloc_packet2(avctx, avpkt, 50)) < 0)
return ret;
WebRtcIlbcfix_EncodeImpl((WebRtc_UWord16*) avpkt->data, (const WebRtc_Word16*) frame->data[0], &s->encoder);
WebRtcIlbcfix_EncodeImpl((uint16_t *) avpkt->data, (const int16_t *) frame->data[0], &s->encoder);
avpkt->size = s->encoder.no_of_bytes;
*got_packet_ptr = 1;

View File

@ -241,7 +241,7 @@ AVCodec ff_amv_encoder = {
.encode2 = amv_encode_picture,
.close = ff_mpv_encode_end,
.pix_fmts = (const enum AVPixelFormat[]){
AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_NONE
AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_NONE
},
};
#endif

View File

@ -1028,7 +1028,7 @@ static int apply_color_indexing_transform(WebPContext *s)
ImageContext *img;
ImageContext *pal;
int i, x, y;
uint8_t *p, *pi;
uint8_t *p;
img = &s->image[IMAGE_ROLE_ARGB];
pal = &s->image[IMAGE_ROLE_COLOR_INDEXING];
@ -1066,11 +1066,11 @@ static int apply_color_indexing_transform(WebPContext *s)
p = GET_PIXEL(img->frame, x, y);
i = p[2];
if (i >= pal->frame->width) {
av_log(s->avctx, AV_LOG_ERROR, "invalid palette index %d\n", i);
return AVERROR_INVALIDDATA;
AV_WB32(p, 0xFF000000);
} else {
const uint8_t *pi = GET_PIXEL(pal->frame, i, 0);
AV_COPY32(p, pi);
}
pi = GET_PIXEL(pal->frame, i, 0);
AV_COPY32(p, pi);
}
}

View File

@ -20,10 +20,10 @@
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************
%if ARCH_X86_64
%include "libavutil/x86/x86util.asm"
%if ARCH_X86_64
SECTION_RODATA
cextern pb_3

View File

@ -48,7 +48,7 @@ typedef struct {
} MotionVector;
typedef struct {
MotionVector vector; ///< Motion vector
MotionVector vec; ///< Motion vector
double angle; ///< Angle of rotation
double zoom; ///< Zoom percentage
} Transform;

View File

@ -294,8 +294,8 @@ static void find_motion(DeshakeContext *deshake, uint8_t *src1, uint8_t *src2,
for (x = 0; x < deshake->rx * 2 + 1; x++) {
//av_log(NULL, AV_LOG_ERROR, "%5d ", deshake->counts[x][y]);
if (deshake->counts[x][y] > count_max_value) {
t->vector.x = x - deshake->rx;
t->vector.y = y - deshake->ry;
t->vec.x = x - deshake->rx;
t->vec.y = y - deshake->ry;
count_max_value = deshake->counts[x][y];
}
}
@ -304,12 +304,12 @@ static void find_motion(DeshakeContext *deshake, uint8_t *src1, uint8_t *src2,
p_x = (center_x - width / 2.0);
p_y = (center_y - height / 2.0);
t->vector.x += (cos(t->angle)-1)*p_x - sin(t->angle)*p_y;
t->vector.y += sin(t->angle)*p_x + (cos(t->angle)-1)*p_y;
t->vec.x += (cos(t->angle)-1)*p_x - sin(t->angle)*p_y;
t->vec.y += sin(t->angle)*p_x + (cos(t->angle)-1)*p_y;
// Clamp max shift & rotation?
t->vector.x = av_clipf(t->vector.x, -deshake->rx * 2, deshake->rx * 2);
t->vector.y = av_clipf(t->vector.y, -deshake->ry * 2, deshake->ry * 2);
t->vec.x = av_clipf(t->vec.x, -deshake->rx * 2, deshake->rx * 2);
t->vec.y = av_clipf(t->vec.y, -deshake->ry * 2, deshake->ry * 2);
t->angle = av_clipf(t->angle, -0.1, 0.1);
//av_log(NULL, AV_LOG_ERROR, "%d x %d\n", avg->x, avg->y);
@ -407,8 +407,8 @@ static int config_props(AVFilterLink *link)
DeshakeContext *deshake = link->dst->priv;
deshake->ref = NULL;
deshake->last.vector.x = 0;
deshake->last.vector.y = 0;
deshake->last.vec.x = 0;
deshake->last.vec.y = 0;
deshake->last.angle = 0;
deshake->last.zoom = 0;
@ -476,57 +476,57 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
// Copy transform so we can output it later to compare to the smoothed value
orig.vector.x = t.vector.x;
orig.vector.y = t.vector.y;
orig.vec.x = t.vec.x;
orig.vec.y = t.vec.y;
orig.angle = t.angle;
orig.zoom = t.zoom;
// Generate a one-sided moving exponential average
deshake->avg.vector.x = alpha * t.vector.x + (1.0 - alpha) * deshake->avg.vector.x;
deshake->avg.vector.y = alpha * t.vector.y + (1.0 - alpha) * deshake->avg.vector.y;
deshake->avg.vec.x = alpha * t.vec.x + (1.0 - alpha) * deshake->avg.vec.x;
deshake->avg.vec.y = alpha * t.vec.y + (1.0 - alpha) * deshake->avg.vec.y;
deshake->avg.angle = alpha * t.angle + (1.0 - alpha) * deshake->avg.angle;
deshake->avg.zoom = alpha * t.zoom + (1.0 - alpha) * deshake->avg.zoom;
// Remove the average from the current motion to detect the motion that
// is not on purpose, just as jitter from bumping the camera
t.vector.x -= deshake->avg.vector.x;
t.vector.y -= deshake->avg.vector.y;
t.vec.x -= deshake->avg.vec.x;
t.vec.y -= deshake->avg.vec.y;
t.angle -= deshake->avg.angle;
t.zoom -= deshake->avg.zoom;
// Invert the motion to undo it
t.vector.x *= -1;
t.vector.y *= -1;
t.vec.x *= -1;
t.vec.y *= -1;
t.angle *= -1;
// Write statistics to file
if (deshake->fp) {
snprintf(tmp, 256, "%f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f\n", orig.vector.x, deshake->avg.vector.x, t.vector.x, orig.vector.y, deshake->avg.vector.y, t.vector.y, orig.angle, deshake->avg.angle, t.angle, orig.zoom, deshake->avg.zoom, t.zoom);
snprintf(tmp, 256, "%f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f\n", orig.vec.x, deshake->avg.vec.x, t.vec.x, orig.vec.y, deshake->avg.vec.y, t.vec.y, orig.angle, deshake->avg.angle, t.angle, orig.zoom, deshake->avg.zoom, t.zoom);
fwrite(tmp, sizeof(char), strlen(tmp), deshake->fp);
}
// Turn relative current frame motion into absolute by adding it to the
// last absolute motion
t.vector.x += deshake->last.vector.x;
t.vector.y += deshake->last.vector.y;
t.vec.x += deshake->last.vec.x;
t.vec.y += deshake->last.vec.y;
t.angle += deshake->last.angle;
t.zoom += deshake->last.zoom;
// Shrink motion by 10% to keep things centered in the camera frame
t.vector.x *= 0.9;
t.vector.y *= 0.9;
t.vec.x *= 0.9;
t.vec.y *= 0.9;
t.angle *= 0.9;
// Store the last absolute motion information
deshake->last.vector.x = t.vector.x;
deshake->last.vector.y = t.vector.y;
deshake->last.vec.x = t.vec.x;
deshake->last.vec.y = t.vec.y;
deshake->last.angle = t.angle;
deshake->last.zoom = t.zoom;
// Generate a luma transformation matrix
avfilter_get_matrix(t.vector.x, t.vector.y, t.angle, 1.0 + t.zoom / 100.0, matrix_y);
avfilter_get_matrix(t.vec.x, t.vec.y, t.angle, 1.0 + t.zoom / 100.0, matrix_y);
// Generate a chroma transformation matrix
avfilter_get_matrix(t.vector.x / (link->w / CHROMA_WIDTH(link)), t.vector.y / (link->h / CHROMA_HEIGHT(link)), t.angle, 1.0 + t.zoom / 100.0, matrix_uv);
avfilter_get_matrix(t.vec.x / (link->w / CHROMA_WIDTH(link)), t.vec.y / (link->h / CHROMA_HEIGHT(link)), t.angle, 1.0 + t.zoom / 100.0, matrix_uv);
// Transform the luma and chroma planes
ret = deshake->transform(link->dst, link->w, link->h, CHROMA_WIDTH(link), CHROMA_HEIGHT(link),
matrix_y, matrix_uv, INTERPOLATE_BILINEAR, deshake->edge, in, out);

View File

@ -557,10 +557,10 @@ static const AVOption scale_options[] = {
{ "mpeg", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_RANGE_MPEG}, 0, 0, FLAGS, "range" },
{ "tv", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_RANGE_MPEG}, 0, 0, FLAGS, "range" },
{ "pc", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_RANGE_JPEG}, 0, 0, FLAGS, "range" },
{ "in_v_chr_pos", "input vertical chroma position in luma grid/256" , OFFSET(in_v_chr_pos), AV_OPT_TYPE_INT, { .i64 = -1}, -1, 512, FLAGS },
{ "in_h_chr_pos", "input horizontal chroma position in luma grid/256", OFFSET(in_h_chr_pos), AV_OPT_TYPE_INT, { .i64 = -1}, -1, 512, FLAGS },
{ "out_v_chr_pos", "output vertical chroma position in luma grid/256" , OFFSET(out_v_chr_pos), AV_OPT_TYPE_INT, { .i64 = -1}, -1, 512, FLAGS },
{ "out_h_chr_pos", "output horizontal chroma position in luma grid/256", OFFSET(out_h_chr_pos), AV_OPT_TYPE_INT, { .i64 = -1}, -1, 512, FLAGS },
{ "in_v_chr_pos", "input vertical chroma position in luma grid/256" , OFFSET(in_v_chr_pos), AV_OPT_TYPE_INT, { .i64 = -513}, -513, 512, FLAGS },
{ "in_h_chr_pos", "input horizontal chroma position in luma grid/256", OFFSET(in_h_chr_pos), AV_OPT_TYPE_INT, { .i64 = -513}, -513, 512, FLAGS },
{ "out_v_chr_pos", "output vertical chroma position in luma grid/256" , OFFSET(out_v_chr_pos), AV_OPT_TYPE_INT, { .i64 = -513}, -513, 512, FLAGS },
{ "out_h_chr_pos", "output horizontal chroma position in luma grid/256", OFFSET(out_h_chr_pos), AV_OPT_TYPE_INT, { .i64 = -513}, -513, 512, FLAGS },
{ "force_original_aspect_ratio", "decrease or increase w/h if necessary to keep the original AR", OFFSET(force_original_aspect_ratio), AV_OPT_TYPE_INT, { .i64 = 0}, 0, 2, FLAGS, "force_oar" },
{ "disable", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = 0 }, 0, 0, FLAGS, "force_oar" },
{ "decrease", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = 1 }, 0, 0, FLAGS, "force_oar" },

View File

@ -55,8 +55,10 @@ static int ape_tag_read_field(AVFormatContext *s)
av_log(s, AV_LOG_WARNING, "Invalid APE tag key '%s'.\n", key);
return -1;
}
if (size >= UINT_MAX)
return -1;
if (size > INT32_MAX - FF_INPUT_BUFFER_PADDING_SIZE) {
av_log(s, AV_LOG_ERROR, "APE tag size too large.\n");
return AVERROR_INVALIDDATA;
}
if (flags & APE_TAG_FLAG_IS_BINARY) {
uint8_t filename[1024];
enum AVCodecID id;

View File

@ -64,10 +64,10 @@ static const AVOption swscale_options[] = {
{ "param0", "scaler param 0", OFFSET(param[0]), AV_OPT_TYPE_DOUBLE, { .dbl = SWS_PARAM_DEFAULT }, INT_MIN, INT_MAX, VE },
{ "param1", "scaler param 1", OFFSET(param[1]), AV_OPT_TYPE_DOUBLE, { .dbl = SWS_PARAM_DEFAULT }, INT_MIN, INT_MAX, VE },
{ "src_v_chr_pos", "source vertical chroma position in luma grid/256" , OFFSET(src_v_chr_pos), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 512, VE },
{ "src_h_chr_pos", "source horizontal chroma position in luma grid/256", OFFSET(src_h_chr_pos), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 512, VE },
{ "dst_v_chr_pos", "destination vertical chroma position in luma grid/256" , OFFSET(dst_v_chr_pos), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 512, VE },
{ "dst_h_chr_pos", "destination horizontal chroma position in luma grid/256", OFFSET(dst_h_chr_pos), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 512, VE },
{ "src_v_chr_pos", "source vertical chroma position in luma grid/256" , OFFSET(src_v_chr_pos), AV_OPT_TYPE_INT, { .i64 = -513 }, -513, 512, VE },
{ "src_h_chr_pos", "source horizontal chroma position in luma grid/256", OFFSET(src_h_chr_pos), AV_OPT_TYPE_INT, { .i64 = -513 }, -513, 512, VE },
{ "dst_v_chr_pos", "destination vertical chroma position in luma grid/256" , OFFSET(dst_v_chr_pos), AV_OPT_TYPE_INT, { .i64 = -513 }, -513, 512, VE },
{ "dst_h_chr_pos", "destination horizontal chroma position in luma grid/256", OFFSET(dst_h_chr_pos), AV_OPT_TYPE_INT, { .i64 = -513 }, -513, 512, VE },
{ "sws_dither", "set dithering algorithm", OFFSET(dither), AV_OPT_TYPE_INT, { .i64 = SWS_DITHER_AUTO }, 0, NB_SWS_DITHER, VE, "sws_dither" },
{ "auto", "leave choice to sws", 0, AV_OPT_TYPE_CONST, { .i64 = SWS_DITHER_AUTO }, INT_MIN, INT_MAX, VE, "sws_dither" },

View File

@ -266,7 +266,7 @@ static double getSplineCoeff(double a, double b, double c, double d,
static av_cold int get_local_pos(SwsContext *s, int chr_subsample, int pos, int dir)
{
if (pos < 0) {
if (pos == -1 || pos <= -513) {
pos = (128 << chr_subsample) - 128;
}
pos += 128; // relative to ideal left edge

View File

@ -33,6 +33,10 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/timer.h"
#ifndef AV_READ_TIME
#define AV_READ_TIME(x) 0
#endif
#if HAVE_UNISTD_H
#include <unistd.h> /* for getopt */
#endif