aboutsummaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2014-04-19 15:52:40 +0200
committerSebastian Dröge <sebastian@centricular.com>2014-04-19 15:52:40 +0200
commit0ee9933f9516fd5dd64cdc7982c706eb79d12f64 (patch)
tree0213d186c3c937f0bb51b635157ac4b911a4f194 /gst-libs
parent6434cb8463988f94659da773d338286343528571 (diff)
Imported Upstream version 1.2.4upstream/1.2.4
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/ext/libav/Changelog20
-rw-r--r--gst-libs/ext/libav/RELEASE2
-rwxr-xr-xgst-libs/ext/libav/configure19
-rw-r--r--gst-libs/ext/libav/libavcodec/arm/dsputil_armv6.S10
-rw-r--r--gst-libs/ext/libav/libavcodec/h264.c18
-rw-r--r--gst-libs/ext/libav/libavcodec/h264_loopfilter.c8
-rw-r--r--gst-libs/ext/libav/libavcodec/ituh263dec.c2
-rw-r--r--gst-libs/ext/libav/libavcodec/lagarith.c12
-rw-r--r--gst-libs/ext/libav/libavcodec/rpza.c4
-rw-r--r--gst-libs/ext/libav/libavcodec/shorten.c2
-rw-r--r--gst-libs/ext/libav/libavcodec/truemotion1.c5
-rw-r--r--gst-libs/ext/libav/libavfilter/vf_drawtext.c1
-rw-r--r--gst-libs/ext/libav/libavutil/arm/asm.S7
-rw-r--r--gst-libs/ext/libav/libavutil/samplefmt.c2
-rw-r--r--gst-libs/ext/libav/tools/qt-faststart.c8
15 files changed, 91 insertions, 29 deletions
diff --git a/gst-libs/ext/libav/Changelog b/gst-libs/ext/libav/Changelog
index bc18fef..1c4114f 100644
--- a/gst-libs/ext/libav/Changelog
+++ b/gst-libs/ext/libav/Changelog
@@ -1,5 +1,25 @@
Releases are sorted from youngest to oldest.
+version 9.12:
+- configure: Update freetype check to follow upstream
+- drawtext: Drop pointless header
+- configure: Support preprocessor macros as header names
+- arm: hpeldsp: fix put_pixels8_y2_{,no_rnd_}armv6
+- qt-faststart: Check offset_count before reading from the moov_atom buffer
+- arm: hpeldsp: prevent overreads in armv6 asm
+- configure: enable PIC on s390(x)
+- ituh263: reject b-frame with pp_time = 0
+- lagarith: reallocate rgb_planes when needed
+- truemotion1: check the header size
+- shorten: pad the internal bitstream buffer
+- samplefmt: avoid integer overflow in av_samples_get_buffer_size()
+- h264: Fix a typo from the previous commit
+- h264: Lower bound check for slice offsets
+- Add missing header to fix compilation after d2a0654
+- configure: Add missing dependency of Snow decoder on videodsp
+- rpza: limit the number of blocks to the total remaining blocks in the frame
+
+
version 9.11:
- oggparseogm: check timing variables
- mathematics: remove asserts from av_rescale_rnd()
diff --git a/gst-libs/ext/libav/RELEASE b/gst-libs/ext/libav/RELEASE
index d4ce17d..5cb42eb 100644
--- a/gst-libs/ext/libav/RELEASE
+++ b/gst-libs/ext/libav/RELEASE
@@ -1 +1 @@
-9.11
+9.12
diff --git a/gst-libs/ext/libav/configure b/gst-libs/ext/libav/configure
index dea4bde..3117b9f 100755
--- a/gst-libs/ext/libav/configure
+++ b/gst-libs/ext/libav/configure
@@ -738,6 +738,13 @@ check_ld(){
check_cmd $ld $LDFLAGS $flags $(ld_o $TMPE) $TMPO $libs $extralibs
}
+print_include(){
+ hdr=$1
+ test "${hdr%.h}" = "${hdr}" &&
+ echo "#include $hdr" ||
+ echo "#include <$hdr>"
+}
+
check_code(){
log check_code "$@"
check=$1
@@ -746,7 +753,7 @@ check_code(){
shift 3
{
for hdr in $headers; do
- echo "#include <$hdr>"
+ print_include $hdr
done
echo "int main(void) { $code; return 0; }"
} | check_$check "$@"
@@ -822,7 +829,7 @@ check_func_headers(){
shift 2
{
for hdr in $headers; do
- echo "#include <$hdr>"
+ print_include $hdr
done
for func in $funcs; do
echo "long check_$func(void) { return (long) $func; }"
@@ -1562,7 +1569,7 @@ rv30_decoder_select="error_resilience golomb h264chroma h264pred h264qpel mpegvi
rv40_decoder_select="error_resilience golomb h264chroma h264pred h264qpel mpegvideo"
shorten_decoder_select="golomb"
sipr_decoder_select="lsp"
-snow_decoder_select="dwt rangecoder"
+snow_decoder_select="dwt rangecoder videodsp"
snow_encoder_select="aandcttables dwt error_resilience mpegvideoenc rangecoder"
svq1_decoder_select="error_resilience mpegvideo"
svq1_encoder_select="aandcttables error_resilience mpegvideoenc"
@@ -2818,6 +2825,10 @@ case "$arch" in
check_64bit ppc ppc64 'sizeof(void *) > 4'
spic=$shared
;;
+ s390)
+ check_64bit s390 s390x 'sizeof(void *) > 4'
+ spic=$shared
+ ;;
sparc)
check_64bit sparc sparc64 'sizeof(void *) > 4'
spic=$shared
@@ -3481,7 +3492,7 @@ enabled frei0r && { check_header frei0r.h || die "ERROR: frei0r.h header not
enabled gnutls && require_pkg_config gnutls gnutls/gnutls.h gnutls_global_init
enabled libfaac && require2 libfaac "stdint.h faac.h" faacEncGetVersion -lfaac
enabled libfdk_aac && require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac
-enabled libfreetype && require_pkg_config freetype2 "ft2build.h freetype/freetype.h" FT_Init_FreeType
+enabled libfreetype && require_pkg_config freetype2 "ft2build.h FT_FREETYPE_H" FT_Init_FreeType
enabled libgsm && require libgsm gsm/gsm.h gsm_create -lgsm
enabled libilbc && require libilbc ilbc.h WebRtcIlbcfix_InitDecode -lilbc
enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame
diff --git a/gst-libs/ext/libav/libavcodec/arm/dsputil_armv6.S b/gst-libs/ext/libav/libavcodec/arm/dsputil_armv6.S
index 61535a1..2230613 100644
--- a/gst-libs/ext/libav/libavcodec/arm/dsputil_armv6.S
+++ b/gst-libs/ext/libav/libavcodec/arm/dsputil_armv6.S
@@ -144,10 +144,11 @@ function ff_put_pixels8_y2_armv6, export=1
eor r7, r5, r7
uadd8 r10, r10, r6
and r7, r7, r12
- ldr_pre r6, r1, r2
+ ldrc_pre ne, r6, r1, r2
uadd8 r11, r11, r7
strd_post r8, r9, r0, r2
- ldr r7, [r1, #4]
+ it ne
+ ldrne r7, [r1, #4]
strd_post r10, r11, r0, r2
bne 1b
@@ -196,9 +197,10 @@ function ff_put_pixels8_y2_no_rnd_armv6, export=1
uhadd8 r9, r5, r7
ldr r5, [r1, #4]
uhadd8 r12, r4, r6
- ldr_pre r6, r1, r2
+ ldrc_pre ne, r6, r1, r2
uhadd8 r14, r5, r7
- ldr r7, [r1, #4]
+ it ne
+ ldrne r7, [r1, #4]
stm r0, {r8,r9}
add r0, r0, r2
stm r0, {r12,r14}
diff --git a/gst-libs/ext/libav/libavcodec/h264.c b/gst-libs/ext/libav/libavcodec/h264.c
index b256969..d6d3d42 100644
--- a/gst-libs/ext/libav/libavcodec/h264.c
+++ b/gst-libs/ext/libav/libavcodec/h264.c
@@ -3157,8 +3157,8 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
get_se_golomb(&s->gb); /* slice_qs_delta */
h->deblocking_filter = 1;
- h->slice_alpha_c0_offset = 52;
- h->slice_beta_offset = 52;
+ h->slice_alpha_c0_offset = 0;
+ h->slice_beta_offset = 0;
if (h->pps.deblocking_filter_parameters_present) {
tmp = get_ue_golomb_31(&s->gb);
if (tmp > 2) {
@@ -3171,10 +3171,12 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
h->deblocking_filter ^= 1; // 1<->0
if (h->deblocking_filter) {
- h->slice_alpha_c0_offset += get_se_golomb(&s->gb) << 1;
- h->slice_beta_offset += get_se_golomb(&s->gb) << 1;
- if (h->slice_alpha_c0_offset > 104U ||
- h->slice_beta_offset > 104U) {
+ h->slice_alpha_c0_offset = get_se_golomb(&s->gb) * 2;
+ h->slice_beta_offset = get_se_golomb(&s->gb) * 2;
+ if (h->slice_alpha_c0_offset > 12 ||
+ h->slice_alpha_c0_offset < -12 ||
+ h->slice_beta_offset > 12 ||
+ h->slice_beta_offset < -12) {
av_log(s->avctx, AV_LOG_ERROR,
"deblocking filter parameters %d %d out of range\n",
h->slice_alpha_c0_offset, h->slice_beta_offset);
@@ -3211,7 +3213,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
}
}
}
- h->qp_thresh = 15 + 52 -
+ h->qp_thresh = 15 -
FFMIN(h->slice_alpha_c0_offset, h->slice_beta_offset) -
FFMAX3(0,
h->pps.chroma_qp_index_offset[0],
@@ -3280,7 +3282,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
h->ref_count[0], h->ref_count[1],
s->qscale,
h->deblocking_filter,
- h->slice_alpha_c0_offset / 2 - 26, h->slice_beta_offset / 2 - 26,
+ h->slice_alpha_c0_offset, h->slice_beta_offset,
h->use_weight,
h->use_weight == 1 && h->use_weight_chroma ? "c" : "",
h->slice_type == AV_PICTURE_TYPE_B ? (h->direct_spatial_mv_pred ? "SPAT" : "TEMP") : "");
diff --git a/gst-libs/ext/libav/libavcodec/h264_loopfilter.c b/gst-libs/ext/libav/libavcodec/h264_loopfilter.c
index b045d23..4417d79 100644
--- a/gst-libs/ext/libav/libavcodec/h264_loopfilter.c
+++ b/gst-libs/ext/libav/libavcodec/h264_loopfilter.c
@@ -254,8 +254,8 @@ static av_always_inline void h264_filter_mb_fast_internal(H264Context *h,
int top_type= h->top_type;
int qp_bd_offset = 6 * (h->sps.bit_depth_luma - 8);
- int a = h->slice_alpha_c0_offset - qp_bd_offset;
- int b = h->slice_beta_offset - qp_bd_offset;
+ int a = 52 + h->slice_alpha_c0_offset - qp_bd_offset;
+ int b = 52 + h->slice_beta_offset - qp_bd_offset;
int mb_type = s->current_picture.f.mb_type[mb_xy];
int qp = s->current_picture.f.qscale_table[mb_xy];
@@ -711,8 +711,8 @@ void ff_h264_filter_mb( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint
av_unused int dir;
int chroma = !(CONFIG_GRAY && (s->flags&CODEC_FLAG_GRAY));
int qp_bd_offset = 6 * (h->sps.bit_depth_luma - 8);
- int a = h->slice_alpha_c0_offset - qp_bd_offset;
- int b = h->slice_beta_offset - qp_bd_offset;
+ int a = 52 + h->slice_alpha_c0_offset - qp_bd_offset;
+ int b = 52 + h->slice_beta_offset - qp_bd_offset;
if (FRAME_MBAFF
// and current and left pair do not have the same interlaced type
diff --git a/gst-libs/ext/libav/libavcodec/ituh263dec.c b/gst-libs/ext/libav/libavcodec/ituh263dec.c
index cb26be2..3cbc7b8 100644
--- a/gst-libs/ext/libav/libavcodec/ituh263dec.c
+++ b/gst-libs/ext/libav/libavcodec/ituh263dec.c
@@ -753,6 +753,8 @@ int ff_h263_decode_mb(MpegEncContext *s,
}
if(IS_DIRECT(mb_type)){
+ if (!s->pp_time)
+ return AVERROR_INVALIDDATA;
s->mv_dir = MV_DIR_FORWARD | MV_DIR_BACKWARD | MV_DIRECT;
mb_type |= ff_mpeg4_set_direct_mv(s, 0, 0);
}else{
diff --git a/gst-libs/ext/libav/libavcodec/lagarith.c b/gst-libs/ext/libav/libavcodec/lagarith.c
index 33dd8b0..5290d39 100644
--- a/gst-libs/ext/libav/libavcodec/lagarith.c
+++ b/gst-libs/ext/libav/libavcodec/lagarith.c
@@ -53,6 +53,7 @@ typedef struct LagarithContext {
int zeros; /**< number of consecutive zero bytes encountered */
int zeros_rem; /**< number of zero bytes remaining to output */
uint8_t *rgb_planes;
+ int rgb_planes_allocated;
int rgb_stride;
} LagarithContext;
@@ -557,13 +558,12 @@ static int lag_decode_frame(AVCodecContext *avctx,
offs[1] = offset_gu;
offs[2] = offset_ry;
+ l->rgb_stride = FFALIGN(avctx->width, 16);
+ av_fast_malloc(&l->rgb_planes, &l->rgb_planes_allocated,
+ l->rgb_stride * avctx->height * planes + 1);
if (!l->rgb_planes) {
- l->rgb_stride = FFALIGN(avctx->width, 16);
- l->rgb_planes = av_malloc(l->rgb_stride * avctx->height * planes + 1);
- if (!l->rgb_planes) {
- av_log(avctx, AV_LOG_ERROR, "cannot allocate temporary buffer\n");
- return AVERROR(ENOMEM);
- }
+ av_log(avctx, AV_LOG_ERROR, "cannot allocate temporary buffer\n");
+ return AVERROR(ENOMEM);
}
for (i = 0; i < planes; i++)
srcs[i] = l->rgb_planes + (i + 1) * l->rgb_stride * avctx->height - l->rgb_stride;
diff --git a/gst-libs/ext/libav/libavcodec/rpza.c b/gst-libs/ext/libav/libavcodec/rpza.c
index 59b15c6..d8d689c 100644
--- a/gst-libs/ext/libav/libavcodec/rpza.c
+++ b/gst-libs/ext/libav/libavcodec/rpza.c
@@ -38,8 +38,10 @@
#include <stdlib.h>
#include <string.h>
+#include "libavutil/common.h"
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
+#include "libavutil/common.h"
#include "avcodec.h"
typedef struct RpzaContext {
@@ -126,6 +128,8 @@ static void rpza_decode_stream(RpzaContext *s)
}
}
+ n_blocks = FFMIN(n_blocks, total_blocks);
+
switch (opcode & 0xe0) {
/* Skip blocks */
diff --git a/gst-libs/ext/libav/libavcodec/shorten.c b/gst-libs/ext/libav/libavcodec/shorten.c
index 22976e0..31bd943 100644
--- a/gst-libs/ext/libav/libavcodec/shorten.c
+++ b/gst-libs/ext/libav/libavcodec/shorten.c
@@ -441,7 +441,7 @@ static int shorten_decode_frame(AVCodecContext *avctx, void *data,
void *tmp_ptr;
s->max_framesize = 1024; // should hopefully be enough for the first header
tmp_ptr = av_fast_realloc(s->bitstream, &s->allocated_bitstream_size,
- s->max_framesize);
+ s->max_framesize + FF_INPUT_BUFFER_PADDING_SIZE);
if (!tmp_ptr) {
av_log(avctx, AV_LOG_ERROR, "error allocating bitstream buffer\n");
return AVERROR(ENOMEM);
diff --git a/gst-libs/ext/libav/libavcodec/truemotion1.c b/gst-libs/ext/libav/libavcodec/truemotion1.c
index 63cd05b..2421dac 100644
--- a/gst-libs/ext/libav/libavcodec/truemotion1.c
+++ b/gst-libs/ext/libav/libavcodec/truemotion1.c
@@ -322,6 +322,11 @@ static int truemotion1_decode_header(TrueMotion1Context *s)
return -1;
}
+ if (header.header_size + 1 > s->size) {
+ av_log(s->avctx, AV_LOG_ERROR, "Input packet too small.\n");
+ return AVERROR_INVALIDDATA;
+ }
+
/* unscramble the header bytes with a XOR operation */
for (i = 1; i < header.header_size; i++)
header_buffer[i - 1] = s->buf[i] ^ s->buf[i + 1];
diff --git a/gst-libs/ext/libav/libavfilter/vf_drawtext.c b/gst-libs/ext/libav/libavfilter/vf_drawtext.c
index f8800d2..70f034f 100644
--- a/gst-libs/ext/libav/libavfilter/vf_drawtext.c
+++ b/gst-libs/ext/libav/libavfilter/vf_drawtext.c
@@ -47,7 +47,6 @@
#include "video.h"
#include <ft2build.h>
-#include <freetype/config/ftheader.h>
#include FT_FREETYPE_H
#include FT_GLYPH_H
diff --git a/gst-libs/ext/libav/libavutil/arm/asm.S b/gst-libs/ext/libav/libavutil/arm/asm.S
index a181789..f088857 100644
--- a/gst-libs/ext/libav/libavutil/arm/asm.S
+++ b/gst-libs/ext/libav/libavutil/arm/asm.S
@@ -212,6 +212,13 @@ T ldr \rt, [\rn]
T add \rn, \rn, \rm
.endm
+.macro ldrc_pre cc, rt, rn, rm:vararg
+A ldr\cc \rt, [\rn, \rm]!
+T itt \cc
+T add\cc \rn, \rn, \rm
+T ldr\cc \rt, [\rn]
+.endm
+
.macro ldrd_reg rt, rt2, rn, rm
A ldrd \rt, \rt2, [\rn, \rm]
T add \rt, \rn, \rm
diff --git a/gst-libs/ext/libav/libavutil/samplefmt.c b/gst-libs/ext/libav/libavutil/samplefmt.c
index 389f726..bff6004 100644
--- a/gst-libs/ext/libav/libavutil/samplefmt.c
+++ b/gst-libs/ext/libav/libavutil/samplefmt.c
@@ -118,6 +118,8 @@ int av_samples_get_buffer_size(int *linesize, int nb_channels, int nb_samples,
/* auto-select alignment if not specified */
if (!align) {
+ if (nb_samples > INT_MAX - 31)
+ return AVERROR(EINVAL);
align = 1;
nb_samples = FFALIGN(nb_samples, 32);
}
diff --git a/gst-libs/ext/libav/tools/qt-faststart.c b/gst-libs/ext/libav/tools/qt-faststart.c
index f33d6fa..47f5c73 100644
--- a/gst-libs/ext/libav/tools/qt-faststart.c
+++ b/gst-libs/ext/libav/tools/qt-faststart.c
@@ -225,6 +225,10 @@ int main(int argc, char *argv[])
goto error_out;
}
offset_count = BE_32(&moov_atom[i + 8]);
+ if (i + 12 + offset_count * UINT64_C(4) > moov_atom_size) {
+ printf(" bad atom size/element count\n");
+ goto error_out;
+ }
for (j = 0; j < offset_count; j++) {
current_offset = BE_32(&moov_atom[i + 12 + j * 4]);
current_offset += moov_atom_size;
@@ -242,6 +246,10 @@ int main(int argc, char *argv[])
goto error_out;
}
offset_count = BE_32(&moov_atom[i + 8]);
+ if (i + 12 + offset_count * UINT64_C(8) > moov_atom_size) {
+ printf(" bad atom size/element count\n");
+ goto error_out;
+ }
for (j = 0; j < offset_count; j++) {
current_offset = BE_64(&moov_atom[i + 12 + j * 8]);
current_offset += moov_atom_size;