Compare commits

..

2 Commits

Author SHA1 Message Date
Hendrik Leppkes
cebe51a625 Merge commit '9d58639e270f7612874681e0ca30fa461e2667b7'
* commit '9d58639e270f7612874681e0ca30fa461e2667b7':
  sws: Drop deprecated SWS_CPU_CAPS defines

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-05 15:58:52 +02:00
Vittorio Giovara
9d58639e27 sws: Drop deprecated SWS_CPU_CAPS defines
Deprecated in 07/2012.
2015-08-28 10:55:26 +02:00
68 changed files with 457 additions and 517 deletions

View File

@@ -1,51 +1,7 @@
Entries are sorted chronologically from oldest to youngest within each release,
releases are sorted from youngest to oldest.
version 2.8.1:
- swscale: fix ticket #4881
- doc: fix spelling errors
- hls: only seek if there is an offset
- asfdec: add more checks for size left in asf packet buffer
- asfdec: alloc enough space for storing name in asf_read_metadata_obj
- avcodec/pngdec: Check blend_op.
- h264_mp4toannexb: fix pps offfset fault when there are more than one sps in avcc
- avcodec/h264_mp4toannexb_bsf: Use av_freep() to free spspps_buf
- avformat/avidec: Workaround broken initial frame
- avformat/hls: fix some cases of HLS streams which require cookies
- avcodec/pngdec: reset has_trns after every decode_frame_png()
- lavf/img2dec: Fix memory leak
- avcodec/mp3: fix skipping zeros
- avformat/srtdec: make sure we probe a number
- configure: check for ID3D11VideoContext
- avformat/vobsub: compare correct packet stream IDs
- avformat/srtdec: more lenient first line probing
- avformat/srtdec: fix number check for the first character
- avcodec/mips: build fix for MSA 64bit
- avcodec/mips: build fix for MSA
- avformat/httpauth: Add space after commas in HTTP/RTSP auth header
- libavformat/hlsenc: Use of uninitialized memory unlinking old files
- avcodec/x86/sbrdsp: Fix using uninitialized upper 32bit of noise
- avcodec/ffv1dec: Fix off by 1 error in quant_table_count check
- avcodec/ffv1dec: Explicitly check read_quant_table() return value
- dnxhddata: correct weight tables
- dnxhddec: decode and use interlace mb flag
- swscale: fix ticket #4877
- avcodec/rangecoder: Check e
- avcodec/ffv1: seperate slice_count from max_slice_count
- swscale: fix ticket 4850
- cmdutils: Filter dst/srcw/h
- avutil/log: fix zero length gnu_printf format string warning
- lavf/webvttenc: Require webvtt file to contain exactly one WebVTT stream.
- swscale/swscale: Fix "unused variable" warning
- avcodec/mjpegdec: Fix decoding RGBA RCT LJPEG
- MAINTAINERS: add 2.8, drop 2.2
- doc: mention libavcodec can decode Opus natively
- hevc: properly handle no_rasl_output_flag when removing pictures from the DPB
- avfilter/af_ladspa: process all channels for nb_handles > 1
- configure: add libsoxr to swresample's pkgconfig
- lavc: Fix compilation with --disable-everything --enable-parser=mpeg4video.
version 2.8:
version <next>:
- colorkey video filter
- BFSTM/BCSTM demuxer
- little-endian ADPCM_THP decoder

View File

@@ -564,11 +564,11 @@ x86 Michael Niedermayer
Releases
========
2.8 Michael Niedermayer
2.7 Michael Niedermayer
2.6 Michael Niedermayer
2.5 Michael Niedermayer
2.4 Michael Niedermayer
2.2 Michael Niedermayer
If you want to maintain an older release, please contact us

View File

@@ -1 +1 @@
2.8.1
2.7.git

View File

@@ -1,15 +0,0 @@
┌────────────────────────────────────────┐
│ RELEASE NOTES for FFmpeg 2.8 "Feynman" │
└────────────────────────────────────────┘
The FFmpeg Project proudly presents FFmpeg 2.8 "Feynman", about 3
months after the release of FFmpeg 2.7.
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.

View File

@@ -563,12 +563,6 @@ int opt_default(void *optctx, const char *opt, const char *arg)
struct SwsContext *sws = sws_alloc_context();
int ret = av_opt_set(sws, opt, arg, 0);
sws_freeContext(sws);
if (!strcmp(opt, "srcw") || !strcmp(opt, "srch") ||
!strcmp(opt, "dstw") || !strcmp(opt, "dsth") ||
!strcmp(opt, "src_format") || !strcmp(opt, "dst_format")) {
av_log(NULL, AV_LOG_ERROR, "Directly using swscale dimensions/format options is not supported, please use the -s or -pix_fmt options\n");
return AVERROR(EINVAL);
}
if (ret < 0) {
av_log(NULL, AV_LOG_ERROR, "Error setting option %s.\n", opt);
return ret;

7
configure vendored
View File

@@ -2374,7 +2374,7 @@ zmbv_encoder_select="zlib"
# hardware accelerators
crystalhd_deps="libcrystalhd_libcrystalhd_if_h"
d3d11va_deps="d3d11_h dxva_h ID3D11VideoDecoder ID3D11VideoContext"
d3d11va_deps="d3d11_h dxva_h ID3D11VideoDecoder"
dxva2_deps="dxva2api_h DXVA2_ConfigPictureDecode"
vaapi_deps="va_va_h"
vda_deps="VideoDecodeAcceleration_VDADecoder_h pthreads CoreServices_CoreServices_h"
@@ -5147,7 +5147,6 @@ check_struct "sys/time.h sys/resource.h" "struct rusage" ru_maxrss
check_type "windows.h dxva.h" "DXVA_PicParams_HEVC" -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -D_CRT_BUILD_DESKTOP_APP=0
check_type "windows.h d3d11.h" "ID3D11VideoDecoder"
check_type "windows.h d3d11.h" "ID3D11VideoContext"
check_type "d3d9.h dxva2api.h" DXVA2_ConfigPictureDecode -D_WIN32_WINNT=0x0602
check_type "va/va.h" "VAPictureParameterBufferHEVC"
@@ -5262,7 +5261,7 @@ enabled libshine && require_pkg_config shine shine/layer3.h shine_encod
enabled libsmbclient && { use_pkg_config smbclient libsmbclient.h smbc_init ||
require smbclient libsmbclient.h smbc_init -lsmbclient; }
enabled libsnappy && require snappy snappy-c.h snappy_compress -lsnappy
enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr && LIBSOXR="-lsoxr"
enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr
enabled libssh && require_pkg_config libssh libssh/sftp.h sftp_init
enabled libspeex && require_pkg_config speex speex/speex.h speex_decoder_init -lspeex
enabled libstagefright_h264 && require_cpp libstagefright_h264 "binder/ProcessState.h media/stagefright/MetaData.h
@@ -6265,4 +6264,4 @@ pkgconfig_generate libavfilter "FFmpeg audio/video filtering library" "$LIBAVF
pkgconfig_generate libpostproc "FFmpeg postprocessing library" "$LIBPOSTPROC_VERSION" ""
pkgconfig_generate libavresample "Libav audio resampling library" "$LIBAVRESAMPLE_VERSION" "$LIBM"
pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "$LIBM"
pkgconfig_generate libswresample "FFmpeg audio resampling library" "$LIBSWRESAMPLE_VERSION" "$LIBM $LIBSOXR"
pkgconfig_generate libswresample "FFmpeg audio resampling library" "$LIBSWRESAMPLE_VERSION" "$LIBM"

View File

@@ -15,29 +15,27 @@ libavutil: 2014-08-09
API changes, most recent first:
-------- 8< --------- FFmpeg 2.8 was cut here -------- 8< ---------
2015-08-27 - 1dd854e1 - lavc 56.58.100 - vaapi.h
2015-xx-xx - lavc 56.58.100 - vaapi.h
Deprecate old VA-API context (vaapi_context) fields that were only
set and used by libavcodec. They are all managed internally now.
2015-08-19 - 9f8e57ef - lavu 54.31.100 - pixfmt.h
2015-xx-xx - lavu 54.31.100 - pixfmt.h
Add a unique pixel format for VA-API (AV_PIX_FMT_VAAPI) that
indicates the nature of the underlying storage: a VA surface. This
yields the same value as AV_PIX_FMT_VAAPI_VLD.
Deprecate old VA-API related pixel formats: AV_PIX_FMT_VAAPI_MOCO,
AV_PIX_FMT_VAAPI_IDCT, AV_PIX_FMT_VAAPI_VLD.
2015-08-02 - lavu 54.30.100 / 54.17.0
9ed59f1 / 7a7df34c - Add av_blowfish_alloc().
a130ec9 / ae365453 - Add av_rc4_alloc().
9ca1997 / 5d8bea3b - Add av_xtea_alloc().
3cf08e9 / d9e8b47e - Add av_des_alloc().
2015-xx-xx - lavu 54.30.0
xxxxxxx - Add av_blowfish_alloc().
xxxxxxx - Add av_rc4_alloc().
xxxxxxx - Add av_xtea_alloc().
xxxxxxx - Add av_des_alloc().
2015-07-27 - lavc 56.56.100 / 56.35.0 - avcodec.h
94d68a4 / 7c6eb0a1 - Rename CODEC_FLAG* defines to AV_CODEC_FLAG*.
444e987 / def97856 - Rename CODEC_CAP_* defines to AV_CODEC_CAP_*.
29d147c / 059a9348 - Rename FF_INPUT_BUFFER_PADDING_SIZE and FF_MIN_BUFFER_SIZE
2015-xx-xx - lavc 56.35.0 - avcodec.h
xxxxxxxxx - Rename CODEC_FLAG* defines to AV_CODEC_FLAG*.
xxxxxxxxx - Rename CODEC_CAP_* defines to AV_CODEC_CAP_*.
xxxxxxxxx - Rename FF_INPUT_BUFFER_PADDING_SIZE and FF_MIN_BUFFER_SIZE
to AV_INPUT_BUFFER_PADDING_SIZE and AV_INPUT_BUFFER_MIN_SIZE.
2015-07-22 - c40ecff - lavc 56.51.100 - avcodec.h

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 = 2.8.1
PROJECT_NUMBER =
# 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

@@ -1353,7 +1353,7 @@ can be selected with @code{-pred 1}.
@table @option
@item format
Can be set to either @code{j2k} or @code{jp2} (the default) that
makes it possible to store non-rgb pix_fmts.
allows to store non-rgb pix_fmts.
@end table

View File

@@ -1032,7 +1032,7 @@ Number_of_samples
For example full key look like this @code{lavfi.astats.1.DC_offset} or
this @code{lavfi.astats.Overall.Peak_count}.
For description what each key means read below.
For description what each key means read bellow.
@item reset
Set number of frame after which stats are going to be recalculated.
@@ -2199,7 +2199,7 @@ Amount of milliseconds the signal has to rise above the threshold before gain
reduction starts. Default is 20. Range is between 0.01 and 2000.
@item release
Amount of milliseconds the signal has to fall below the threshold before
Amount of milliseconds the signal has to fall bellow the threshold before
reduction is decreased again. Default is 250. Range is between 0.01 and 9000.
@item makeup
@@ -4118,7 +4118,7 @@ It accepts the following options:
@item threshold1
@item threshold2
@item threshold3
Limit the maximum change for each plane, default is 65535.
Allows to limit the maximum change for each plane, default is 65535.
If 0, plane will remain unchanged.
@end table
@@ -4321,7 +4321,7 @@ It accepts the following options:
@item threshold1
@item threshold2
@item threshold3
Limit the maximum change for each plane, default is 65535.
Allows to limit the maximum change for each plane, default is 65535.
If 0, plane will remain unchanged.
@item coordinates
@@ -5206,7 +5206,7 @@ It accepts the following options:
@item threshold1
@item threshold2
@item threshold3
Limit the maximum change for each plane, default is 65535.
Allows to limit the maximum change for each plane, default is 65535.
If 0, plane will remain unchanged.
@item coordinates
@@ -6900,7 +6900,7 @@ It accepts the following options:
@item threshold1
@item threshold2
@item threshold3
Limit the maximum change for each plane, default is 65535.
Allows to limit the maximum change for each plane, default is 65535.
If 0, plane will remain unchanged.
@end table
@@ -9881,7 +9881,7 @@ stereo3d=sbsl:aybd
@end example
@item
Convert input video from above below (left eye above, right eye below) to side by side crosseye.
Convert input video from above bellow (left eye above, right eye below) to side by side crosseye.
@example
stereo3d=abl:sbsr
@end example

View File

@@ -983,8 +983,8 @@ following image formats are supported:
@item Musepack SV8 @tab @tab X
@item Nellymoser Asao @tab X @tab X
@item On2 AVC (Audio for Video Codec) @tab @tab X
@item Opus @tab E @tab X
@tab encoding supported through external library libopus
@item Opus @tab E @tab E
@tab supported through external library libopus
@item PCM A-law @tab X @tab X
@item PCM mu-law @tab X @tab X
@item PCM signed 8-bit planar @tab X @tab X

View File

@@ -861,7 +861,7 @@ OBJS-$(CONFIG_MJPEG_PARSER) += mjpeg_parser.o
OBJS-$(CONFIG_MLP_PARSER) += mlp_parser.o mlp.o
OBJS-$(CONFIG_MPEG4VIDEO_PARSER) += mpeg4video_parser.o h263.o \
mpeg4videodec.o mpeg4video.o \
ituh263dec.o h263dec.o h263data.o
ituh263dec.o h263dec.o
OBJS-$(CONFIG_PNG_PARSER) += png_parser.o
OBJS-$(CONFIG_MPEGAUDIO_PARSER) += mpegaudio_parser.o \
mpegaudiodecheader.o mpegaudiodata.o

View File

@@ -48,7 +48,7 @@ static const uint8_t dnxhd_1235_chroma_weight[] = {
90, 90, 85, 79, 73, 73, 73, 73,
};
/* Used in CID 1237, 1253, 1259 */
/* Used in CID 1237, 1253 */
static const uint8_t dnxhd_1237_luma_weight[] = {
0, 32, 33, 34, 34, 36, 37, 36,
36, 37, 38, 38, 38, 39, 41, 44,
@@ -60,7 +60,7 @@ static const uint8_t dnxhd_1237_luma_weight[] = {
97, 100, 104, 102, 98, 98, 99, 99,
};
/* Used in CID 1237, 1253, 1259 */
/* Used in CID 1237, 1253 */
static const uint8_t dnxhd_1237_chroma_weight[] = {
0, 32, 36, 39, 39, 38, 39, 41,
45, 51, 57, 58, 53, 48, 47, 51,
@@ -204,7 +204,6 @@ static const uint8_t dnxhd_1251_chroma_weight[] = {
61, 59, 59, 59, 61, 62, 62, 62,
};
/* Used in CID 1252, 1258 */
static const uint8_t dnxhd_1252_luma_weight[] = {
0, 32, 34, 35, 36, 36, 36, 37,
36, 37, 39, 40, 41, 40, 40, 40,
@@ -215,8 +214,6 @@ static const uint8_t dnxhd_1252_luma_weight[] = {
71, 82, 90, 90, 88, 87, 90, 95,
100, 107, 103, 97, 95, 93, 99, 99,
};
/* Used in CID 1252, 1258 */
static const uint8_t dnxhd_1252_chroma_weight[] = {
0, 32, 35, 36, 37, 37, 38, 40,
42, 46, 49, 50, 50, 49, 49, 53,
@@ -229,36 +226,80 @@ static const uint8_t dnxhd_1252_chroma_weight[] = {
};
static const uint8_t dnxhd_1256_chroma_weight[] = {
0, 32, 32, 32, 32, 32, 32, 32,
32, 32, 32, 32, 32, 32, 32, 32,
32, 32, 32, 32, 32, 32, 37, 32,
32, 32, 32, 32, 33, 32, 32, 32,
32, 32, 33, 34, 37, 36, 32, 32,
32, 33, 34, 37, 36, 34, 35, 36,
39, 44, 40, 40, 39, 39, 44, 43,
43, 51, 56, 50, 49, 60, 61, 70,
0, 32, 32, 32, 32, 32, 32, 33,
32, 32, 32, 32, 32, 32, 32, 34,
32, 32, 32, 32, 32, 32, 33, 37,
32, 32, 32, 32, 32, 32, 36, 39,
32, 32, 32, 32, 32, 34, 39, 44,
32, 37, 32, 32, 35, 40, 43, 49,
32, 33, 36, 36, 40, 43, 50, 60,
34, 37, 39, 44, 51, 56, 61, 70,
};
static const uint8_t dnxhd_1258_luma_weight[] = {
0, 32, 36, 36, 40, 40, 55, 60,
34, 36, 37, 40, 41, 48, 57, 82,
35, 36, 41, 41, 46, 52, 73, 82,
37, 40, 42, 45, 50, 65, 80, 87,
39, 41, 44, 49, 62, 78, 88, 90,
41, 44, 49, 58, 73, 90, 95, 95,
43, 52, 55, 68, 90, 100, 97, 93,
52, 53, 71, 82, 107, 103, 99, 99,
};
static const uint8_t dnxhd_1258_chroma_weight[] = {
0, 32, 37, 38, 49, 53, 65, 66,
35, 37, 40, 49, 56, 64, 65, 82,
36, 42, 50, 56, 64, 67, 73, 85,
46, 50, 57, 63, 71, 72, 89, 87,
49, 58, 65, 72, 78, 88, 88, 90,
60, 64, 74, 81, 84, 90, 95, 134,
62, 74, 77, 80, 90, 114, 129, 125,
74, 74, 90, 100, 128, 125, 116, 116,
};
static const uint8_t dnxhd_1259_luma_weight[] = {
0, 32, 36, 37, 41, 44, 54, 60,
33, 34, 36, 39, 43, 51, 62, 78,
34, 36, 38, 41, 49, 59, 73, 79,
37, 38, 40, 47, 55, 66, 80, 95,
38, 41, 46, 54, 63, 79, 93, 96,
46, 47, 56, 64, 78, 90, 97, 98,
49, 58, 66, 78, 89, 97, 102, 98,
61, 65, 82, 87, 100, 104, 99, 99,
};
static const uint8_t dnxhd_1259_chroma_weight[] = {
0, 32, 38, 39, 47, 51, 77, 83,
36, 39, 41, 48, 55, 74, 85, 95,
39, 45, 53, 58, 72, 83, 105, 89,
51, 58, 66, 73, 82, 109, 92, 95,
57, 75, 78, 89, 105, 95, 93, 96,
81, 82, 99, 99, 94, 90, 97, 98,
83, 96, 97, 93, 89, 97, 102, 98,
90, 94, 92, 88, 100, 104, 99, 99,
};
static const uint8_t dnxhd_1260_luma_weight[] = {
0, 32, 33, 34, 36, 37, 37, 36,
34, 33, 34, 35, 37, 38, 40, 41,
40, 39, 38, 37, 34, 33, 34, 37,
40, 44, 48, 52, 53, 49, 47, 45,
42, 38, 36, 36, 38, 41, 43, 44,
46, 49, 52, 54, 54, 49, 44, 44,
44, 47, 51, 51, 52, 51, 48, 50,
52, 53, 53, 50, 50, 54, 54, 54,
0, 32, 37, 37, 40, 41, 52, 53,
33, 36, 36, 38, 40, 48, 49, 52,
34, 34, 37, 39, 44, 47, 49, 54,
33, 35, 38, 40, 45, 46, 54, 51,
34, 37, 37, 42, 44, 49, 52, 48,
34, 34, 38, 43, 44, 51, 50, 50,
33, 36, 41, 44, 51, 52, 50, 54,
36, 38, 44, 47, 53, 53, 54, 54,
};
static const uint8_t dnxhd_1260_chroma_weight[] = {
0, 32, 34, 38, 42, 40, 38, 36,
35, 35, 38, 42, 43, 43, 42, 40,
38, 39, 43, 43, 42, 41, 43, 43,
42, 44, 46, 45, 45, 46, 47, 46,
44, 44, 45, 46, 46, 46, 50, 50,
47, 47, 49, 49, 49, 49, 51, 53,
51, 49, 53, 57, 56, 52, 50, 52,
56, 56, 53, 53, 53, 54, 58, 58,
0, 32, 40, 38, 42, 40, 45, 45,
34, 42, 36, 43, 38, 46, 46, 49,
38, 35, 43, 39, 44, 47, 47, 49,
35, 42, 43, 42, 46, 47, 49, 52,
38, 43, 43, 44, 50, 49, 56, 50,
42, 43, 44, 50, 51, 57, 52, 53,
41, 45, 46, 53, 53, 56, 53, 54,
46, 46, 51, 49, 56, 53, 58, 58,
};
/* Used in CID 1235, 1241, 1250, 1256 */
@@ -1049,14 +1090,14 @@ const CIDEntry ff_dnxhd_cid_table[] = {
{ 350, 390, 440, 730, 880 },
{ { 24000, 1001 }, { 25, 1 }, { 30000, 1001 }, { 50, 1 }, { 60000, 1001 } } },
{ 1258, 960, 720, 0, 212992, 212992, 4, 8, 5,
dnxhd_1252_luma_weight, dnxhd_1252_chroma_weight,
dnxhd_1258_luma_weight, dnxhd_1258_chroma_weight,
dnxhd_1237_dc_codes, dnxhd_1237_dc_bits,
dnxhd_1252_ac_codes, dnxhd_1252_ac_bits, dnxhd_1252_ac_level,
dnxhd_1252_ac_flags,
dnxhd_1250_run_codes, dnxhd_1250_run_bits, dnxhd_1250_run,
{ 42, 60, 75, 115 } },
{ 1259, 1440, 1080, 0, 417792, 417792, 4, 8, 3,
dnxhd_1237_luma_weight, dnxhd_1237_chroma_weight,
dnxhd_1259_luma_weight, dnxhd_1259_chroma_weight,
dnxhd_1237_dc_codes, dnxhd_1237_dc_bits,
dnxhd_1237_ac_codes, dnxhd_1237_ac_bits, dnxhd_1237_ac_level,
dnxhd_1237_ac_flags,

View File

@@ -349,12 +349,7 @@ static int dnxhd_decode_macroblock(DNXHDContext *ctx, AVFrame *frame,
uint8_t *dest_y, *dest_u, *dest_v;
int dct_y_offset, dct_x_offset;
int qscale, i;
int interlaced_mb = 0;
if (ctx->cid_table->cid == 1260) {
interlaced_mb = get_bits1(&ctx->gb);
qscale = get_bits(&ctx->gb, 10);
} else
qscale = get_bits(&ctx->gb, 11);
skip_bits1(&ctx->gb);
@@ -391,12 +386,8 @@ static int dnxhd_decode_macroblock(DNXHDContext *ctx, AVFrame *frame,
dest_u += frame->linesize[1];
dest_v += frame->linesize[2];
}
if (interlaced_mb) {
dct_linesize_luma <<= 1;
dct_linesize_chroma <<= 1;
}
dct_y_offset = interlaced_mb ? frame->linesize[0] : (dct_linesize_luma << 3);
dct_y_offset = dct_linesize_luma << 3;
dct_x_offset = 8 << shift1;
if (!ctx->is_444) {
ctx->idsp.idct_put(dest_y, dct_linesize_luma, ctx->blocks[0]);
@@ -405,7 +396,7 @@ static int dnxhd_decode_macroblock(DNXHDContext *ctx, AVFrame *frame,
ctx->idsp.idct_put(dest_y + dct_y_offset + dct_x_offset, dct_linesize_luma, ctx->blocks[5]);
if (!(ctx->avctx->flags & AV_CODEC_FLAG_GRAY)) {
dct_y_offset = interlaced_mb ? frame->linesize[1] : (dct_linesize_chroma << 3);
dct_y_offset = dct_linesize_chroma << 3;
ctx->idsp.idct_put(dest_u, dct_linesize_chroma, ctx->blocks[2]);
ctx->idsp.idct_put(dest_v, dct_linesize_chroma, ctx->blocks[3]);
ctx->idsp.idct_put(dest_u + dct_y_offset, dct_linesize_chroma, ctx->blocks[6]);
@@ -418,7 +409,7 @@ static int dnxhd_decode_macroblock(DNXHDContext *ctx, AVFrame *frame,
ctx->idsp.idct_put(dest_y + dct_y_offset + dct_x_offset, dct_linesize_luma, ctx->blocks[7]);
if (!(ctx->avctx->flags & AV_CODEC_FLAG_GRAY)) {
dct_y_offset = interlaced_mb ? frame->linesize[1] : (dct_linesize_chroma << 3);
dct_y_offset = dct_linesize_chroma << 3;
ctx->idsp.idct_put(dest_u, dct_linesize_chroma, ctx->blocks[2]);
ctx->idsp.idct_put(dest_u + dct_x_offset, dct_linesize_chroma, ctx->blocks[3]);
ctx->idsp.idct_put(dest_u + dct_y_offset, dct_linesize_chroma, ctx->blocks[8]);

View File

@@ -101,7 +101,7 @@ av_cold int ff_ffv1_init_slice_state(FFV1Context *f, FFV1Context *fs)
av_cold int ff_ffv1_init_slices_state(FFV1Context *f)
{
int i, ret;
for (i = 0; i < f->max_slice_count; i++) {
for (i = 0; i < f->slice_count; i++) {
FFV1Context *fs = f->slice_context[i];
if ((ret = ff_ffv1_init_slice_state(f, fs)) < 0)
return AVERROR(ENOMEM);
@@ -113,10 +113,10 @@ av_cold int ff_ffv1_init_slice_contexts(FFV1Context *f)
{
int i;
f->max_slice_count = f->num_h_slices * f->num_v_slices;
av_assert0(f->max_slice_count > 0);
f->slice_count = f->num_h_slices * f->num_v_slices;
av_assert0(f->slice_count > 0);
for (i = 0; i < f->max_slice_count; i++) {
for (i = 0; i < f->slice_count; i++) {
int sx = i % f->num_h_slices;
int sy = i / f->num_h_slices;
int sxs = f->avctx->width * sx / f->num_h_slices;
@@ -210,7 +210,7 @@ av_cold int ff_ffv1_close(AVCodecContext *avctx)
ff_thread_release_buffer(avctx, &s->last_picture);
av_frame_free(&s->last_picture.f);
for (j = 0; j < s->max_slice_count; j++) {
for (j = 0; j < s->slice_count; j++) {
FFV1Context *fs = s->slice_context[j];
for (i = 0; i < s->plane_count; i++) {
PlaneContext *p = &fs->plane[i];
@@ -224,14 +224,14 @@ av_cold int ff_ffv1_close(AVCodecContext *avctx)
av_freep(&avctx->stats_out);
for (j = 0; j < s->quant_table_count; j++) {
av_freep(&s->initial_states[j]);
for (i = 0; i < s->max_slice_count; i++) {
for (i = 0; i < s->slice_count; i++) {
FFV1Context *sf = s->slice_context[i];
av_freep(&sf->rc_stat2[j]);
}
av_freep(&s->rc_stat2[j]);
}
for (i = 0; i < s->max_slice_count; i++)
for (i = 0; i < s->slice_count; i++)
av_freep(&s->slice_context[i]);
return 0;

View File

@@ -118,7 +118,6 @@ typedef struct FFV1Context {
struct FFV1Context *slice_context[MAX_SLICES];
int slice_count;
int max_slice_count;
int num_v_slices;
int num_h_slices;
int slice_width;

View File

@@ -47,11 +47,8 @@ static inline av_flatten int get_symbol_inline(RangeCoder *c, uint8_t *state,
else {
int i, e, a;
e = 0;
while (get_rac(c, state + 1 + FFMIN(e, 9))) { // 1..10
while (get_rac(c, state + 1 + FFMIN(e, 9))) // 1..10
e++;
if (e > 31)
return AVERROR_INVALIDDATA;
}
a = 1;
for (i = e - 1; i >= 0; i--)
@@ -305,7 +302,7 @@ static int decode_slice_header(FFV1Context *f, FFV1Context *fs)
for (i = 0; i < f->plane_count; i++) {
PlaneContext * const p = &fs->plane[i];
int idx = get_symbol(c, state, 0);
if (idx >= (unsigned)f->quant_table_count) {
if (idx > (unsigned)f->quant_table_count) {
av_log(f->avctx, AV_LOG_ERROR, "quant_table_index out of range\n");
return -1;
}
@@ -502,10 +499,7 @@ static int read_quant_tables(RangeCoder *c,
int context_count = 1;
for (i = 0; i < 5; i++) {
int ret = read_quant_table(c, quant_table[i], context_count);
if (ret < 0)
return ret;
context_count *= ret;
context_count *= read_quant_table(c, quant_table[i], context_count);
if (context_count > 32768U) {
return AVERROR_INVALIDDATA;
}
@@ -781,7 +775,6 @@ static int read_header(FFV1Context *f)
av_log(f->avctx, AV_LOG_ERROR, "read_quant_table error\n");
return AVERROR_INVALIDDATA;
}
f->slice_count = f->max_slice_count;
} else if (f->version < 3) {
f->slice_count = get_symbol(c, state, 0);
} else {
@@ -796,8 +789,8 @@ static int read_header(FFV1Context *f)
p -= size + trailer;
}
}
if (f->slice_count > (unsigned)MAX_SLICES || f->slice_count <= 0 || f->slice_count > f->max_slice_count) {
av_log(f->avctx, AV_LOG_ERROR, "slice count %d is invalid (max=%d)\n", f->slice_count, f->max_slice_count);
if (f->slice_count > (unsigned)MAX_SLICES || f->slice_count <= 0) {
av_log(f->avctx, AV_LOG_ERROR, "slice count %d is invalid\n", f->slice_count);
return AVERROR_INVALIDDATA;
}
@@ -1023,7 +1016,6 @@ static int init_thread_copy(AVCodecContext *avctx)
f->picture.f = NULL;
f->last_picture.f = NULL;
f->sample_buffer = NULL;
f->max_slice_count = 0;
f->slice_count = 0;
for (i = 0; i < f->quant_table_count; i++) {
@@ -1099,7 +1091,7 @@ static int update_thread_context(AVCodecContext *dst, const AVCodecContext *src)
av_assert0(!fdst->sample_buffer);
}
av_assert1(fdst->max_slice_count == fsrc->max_slice_count);
av_assert1(fdst->slice_count == fsrc->slice_count);
ff_thread_release_buffer(dst, &fdst->picture);

View File

@@ -977,7 +977,6 @@ slices_ok:
if ((ret = ff_ffv1_init_slice_contexts(s)) < 0)
return ret;
s->slice_count = s->max_slice_count;
if ((ret = ff_ffv1_init_slices_state(s)) < 0)
return ret;
@@ -987,7 +986,7 @@ slices_ok:
if (!avctx->stats_out)
return AVERROR(ENOMEM);
for (i = 0; i < s->quant_table_count; i++)
for (j = 0; j < s->max_slice_count; j++) {
for (j = 0; j < s->slice_count; j++) {
FFV1Context *sf = s->slice_context[j];
av_assert0(!sf->rc_stat2[i]);
sf->rc_stat2[i] = av_mallocz(s->context_count[i] *
@@ -1211,7 +1210,6 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
for (i = 0; i < f->quant_table_count; i++)
memset(f->rc_stat2[i], 0, f->context_count[i] * sizeof(*f->rc_stat2[i]));
av_assert0(f->slice_count == f->max_slice_count);
for (j = 0; j < f->slice_count; j++) {
FFV1Context *fs = f->slice_context[j];
for (i = 0; i < 256; i++) {

View File

@@ -32,7 +32,7 @@
/**
* G.726 11bit float.
* G.726 Standard uses rather odd 11bit floating point arithmetic for
* G.726 Standard uses rather odd 11bit floating point arithmentic for
* numerous occasions. It's a mystery to me why they did it this way
* instead of simply using 32bit integer arithmetic.
*/

View File

@@ -122,7 +122,7 @@ pps:
if (!unit_nb && !sps_done++) {
unit_nb = *extradata++; /* number of pps unit(s) */
if (unit_nb) {
ctx->pps_offset = total_size;
ctx->pps_offset = (extradata - 1) - (avctx->extradata + 4);
pps_seen = 1;
}
}
@@ -276,7 +276,7 @@ static void h264_mp4toannexb_filter_close(AVBitStreamFilterContext *bsfc)
{
H264BSFContext *ctx = bsfc->priv_data;
if (ctx->private_spspps)
av_freep(&ctx->spspps_buf);
av_free(ctx->spspps_buf);
}
AVBitStreamFilter ff_h264_mp4toannexb_bsf = {

View File

@@ -182,6 +182,8 @@ static int decode_registered_user_data_closed_caption(H264Context *h, int size)
}
} else {
int i;
avpriv_request_sample(h->avctx, "Subtitles with data type 0x%02x",
user_data_type_code);
for (i = 0; i < size - 1; i++)
skip_bits(&h->gb, 8);
}

View File

@@ -809,8 +809,6 @@ static int hls_slice_header(HEVCContext *s)
s->HEVClc->tu.cu_qp_offset_cb = 0;
s->HEVClc->tu.cu_qp_offset_cr = 0;
s->no_rasl_output_flag = IS_IDR(s) || IS_BLA(s) || (s->nal_unit_type == NAL_CRA_NUT && s->last_eos);
return 0;
}
@@ -3137,7 +3135,6 @@ static int hevc_update_thread_context(AVCodecContext *dst,
s->pocTid0 = s0->pocTid0;
s->max_ra = s0->max_ra;
s->eos = s0->eos;
s->no_rasl_output_flag = s0->no_rasl_output_flag;
s->is_nalff = s0->is_nalff;
s->nal_length_size = s0->nal_length_size;
@@ -3242,7 +3239,6 @@ static av_cold int hevc_decode_init(AVCodecContext *avctx)
s->enable_parallel_tiles = 0;
s->picture_struct = 0;
s->eos = 1;
if(avctx->active_thread_type & FF_THREAD_SLICE)
s->threads_number = avctx->thread_count;
@@ -3284,7 +3280,6 @@ static void hevc_decode_flush(AVCodecContext *avctx)
HEVCContext *s = avctx->priv_data;
ff_hevc_flush_dpb(s);
s->max_ra = INT_MAX;
s->eos = 1;
}
#define OFFSET(x) offsetof(HEVCContext, x)

View File

@@ -866,7 +866,6 @@ typedef struct HEVCContext {
int bs_height;
int is_decoded;
int no_rasl_output_flag;
HEVCPredContext hpc;
HEVCDSPContext hevcdsp;

View File

@@ -174,7 +174,7 @@ int ff_hevc_output_frame(HEVCContext *s, AVFrame *out, int flush)
int min_poc = INT_MAX;
int i, min_idx, ret;
if (s->sh.no_output_of_prior_pics_flag == 1 && s->no_rasl_output_flag == 1) {
if (s->sh.no_output_of_prior_pics_flag == 1) {
for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) {
HEVCFrame *frame = &s->DPB[i];
if (!(frame->flags & HEVC_FRAME_FLAG_BUMPING) && frame->poc != s->poc &&

View File

@@ -1915,24 +1915,24 @@ void ff_intra_pred_8_16x16_msa(HEVCContext *s, int x0, int y0, int c_idx)
v16u8 vec0;
HEVCLocalContext *lc = s->HEVClc;
int i;
int hshift = s->ps.sps->hshift[c_idx];
int vshift = s->ps.sps->vshift[c_idx];
int hshift = s->sps->hshift[c_idx];
int vshift = s->sps->vshift[c_idx];
int size_in_luma_h = 16 << hshift;
int size_in_tbs_h = size_in_luma_h >> s->ps.sps->log2_min_tb_size;
int size_in_tbs_h = size_in_luma_h >> s->sps->log2_min_tb_size;
int size_in_luma_v = 16 << vshift;
int size_in_tbs_v = size_in_luma_v >> s->ps.sps->log2_min_tb_size;
int size_in_tbs_v = size_in_luma_v >> s->sps->log2_min_tb_size;
int x = x0 >> hshift;
int y = y0 >> vshift;
int x_tb = (x0 >> s->ps.sps->log2_min_tb_size) & s->ps.sps->tb_mask;
int y_tb = (y0 >> s->ps.sps->log2_min_tb_size) & s->ps.sps->tb_mask;
int x_tb = (x0 >> s->sps->log2_min_tb_size) & s->sps->tb_mask;
int y_tb = (y0 >> s->sps->log2_min_tb_size) & s->sps->tb_mask;
int cur_tb_addr =
s->ps.pps->min_tb_addr_zs[(y_tb) * (s->ps.sps->tb_mask + 2) + (x_tb)];
s->pps->min_tb_addr_zs[(y_tb) * (s->sps->tb_mask + 2) + (x_tb)];
ptrdiff_t stride = s->frame->linesize[c_idx] / sizeof(uint8_t);
uint8_t *src = (uint8_t *) s->frame->data[c_idx] + x + y * stride;
int min_pu_width = s->ps.sps->min_pu_width;
int min_pu_width = s->sps->min_pu_width;
enum IntraPredMode mode = c_idx ? lc->tu.intra_pred_mode_c :
lc->tu.intra_pred_mode;
@@ -1948,41 +1948,41 @@ void ff_intra_pred_8_16x16_msa(HEVCContext *s, int x0, int y0, int c_idx)
uint8_t *filtered_top = filtered_top_array + 1;
int cand_bottom_left = lc->na.cand_bottom_left
&& cur_tb_addr >
s->ps.pps->min_tb_addr_zs[((y_tb + size_in_tbs_v) & s->ps.sps->tb_mask) *
(s->ps.sps->tb_mask + 2) + (x_tb - 1)];
s->pps->min_tb_addr_zs[((y_tb + size_in_tbs_v) & s->sps->tb_mask) *
(s->sps->tb_mask + 2) + (x_tb - 1)];
int cand_left = lc->na.cand_left;
int cand_up_left = lc->na.cand_up_left;
int cand_up = lc->na.cand_up;
int cand_up_right = lc->na.cand_up_right
&& cur_tb_addr >
s->ps.pps->min_tb_addr_zs[(y_tb - 1) * (s->ps.sps->tb_mask + 2) +
((x_tb + size_in_tbs_h) & s->ps.sps->tb_mask)];
s->pps->min_tb_addr_zs[(y_tb - 1) * (s->sps->tb_mask + 2) +
((x_tb + size_in_tbs_h) & s->sps->tb_mask)];
int bottom_left_size =
(((y0 + 2 * size_in_luma_v) >
(s->ps.sps->height) ? (s->ps.sps->height) : (y0 +
(s->sps->height) ? (s->sps->height) : (y0 +
2 * size_in_luma_v)) -
(y0 + size_in_luma_v)) >> vshift;
int top_right_size =
(((x0 + 2 * size_in_luma_h) >
(s->ps.sps->width) ? (s->ps.sps->width) : (x0 + 2 * size_in_luma_h)) -
(s->sps->width) ? (s->sps->width) : (x0 + 2 * size_in_luma_h)) -
(x0 + size_in_luma_h)) >> hshift;
if (s->ps.pps->constrained_intra_pred_flag == 1) {
int size_in_luma_pu_v = ((size_in_luma_v) >> s->ps.sps->log2_min_pu_size);
int size_in_luma_pu_h = ((size_in_luma_h) >> s->ps.sps->log2_min_pu_size);
int on_pu_edge_x = !(x0 & ((1 << s->ps.sps->log2_min_pu_size) - 1));
int on_pu_edge_y = !(y0 & ((1 << s->ps.sps->log2_min_pu_size) - 1));
if (s->pps->constrained_intra_pred_flag == 1) {
int size_in_luma_pu_v = ((size_in_luma_v) >> s->sps->log2_min_pu_size);
int size_in_luma_pu_h = ((size_in_luma_h) >> s->sps->log2_min_pu_size);
int on_pu_edge_x = !(x0 & ((1 << s->sps->log2_min_pu_size) - 1));
int on_pu_edge_y = !(y0 & ((1 << s->sps->log2_min_pu_size) - 1));
if (!size_in_luma_pu_h)
size_in_luma_pu_h++;
if (cand_bottom_left == 1 && on_pu_edge_x) {
int x_left_pu = ((x0 - 1) >> s->ps.sps->log2_min_pu_size);
int x_left_pu = ((x0 - 1) >> s->sps->log2_min_pu_size);
int y_bottom_pu =
((y0 + size_in_luma_v) >> s->ps.sps->log2_min_pu_size);
((y0 + size_in_luma_v) >> s->sps->log2_min_pu_size);
int max =
((size_in_luma_pu_v) >
(s->ps.sps->min_pu_height -
y_bottom_pu) ? (s->ps.sps->min_pu_height -
(s->sps->min_pu_height -
y_bottom_pu) ? (s->sps->min_pu_height -
y_bottom_pu) : (size_in_luma_pu_v));
cand_bottom_left = 0;
for (i = 0; i < max; i += 2)
@@ -1993,12 +1993,12 @@ void ff_intra_pred_8_16x16_msa(HEVCContext *s, int x0, int y0, int c_idx)
PF_INTRA);
}
if (cand_left == 1 && on_pu_edge_x) {
int x_left_pu = ((x0 - 1) >> s->ps.sps->log2_min_pu_size);
int y_left_pu = ((y0) >> s->ps.sps->log2_min_pu_size);
int x_left_pu = ((x0 - 1) >> s->sps->log2_min_pu_size);
int y_left_pu = ((y0) >> s->sps->log2_min_pu_size);
int max =
((size_in_luma_pu_v) >
(s->ps.sps->min_pu_height -
y_left_pu) ? (s->ps.sps->min_pu_height -
(s->sps->min_pu_height -
y_left_pu) ? (s->sps->min_pu_height -
y_left_pu) : (size_in_luma_pu_v));
cand_left = 0;
for (i = 0; i < max; i += 2)
@@ -2009,20 +2009,20 @@ void ff_intra_pred_8_16x16_msa(HEVCContext *s, int x0, int y0, int c_idx)
PF_INTRA);
}
if (cand_up_left == 1) {
int x_left_pu = ((x0 - 1) >> s->ps.sps->log2_min_pu_size);
int y_top_pu = ((y0 - 1) >> s->ps.sps->log2_min_pu_size);
int x_left_pu = ((x0 - 1) >> s->sps->log2_min_pu_size);
int y_top_pu = ((y0 - 1) >> s->sps->log2_min_pu_size);
cand_up_left =
(s->ref->tab_mvf[(x_left_pu) +
(y_top_pu) * min_pu_width]).pred_flag ==
PF_INTRA;
}
if (cand_up == 1 && on_pu_edge_y) {
int x_top_pu = ((x0) >> s->ps.sps->log2_min_pu_size);
int y_top_pu = ((y0 - 1) >> s->ps.sps->log2_min_pu_size);
int x_top_pu = ((x0) >> s->sps->log2_min_pu_size);
int y_top_pu = ((y0 - 1) >> s->sps->log2_min_pu_size);
int max =
((size_in_luma_pu_h) >
(s->ps.sps->min_pu_width -
x_top_pu) ? (s->ps.sps->min_pu_width -
(s->sps->min_pu_width -
x_top_pu) ? (s->sps->min_pu_width -
x_top_pu) : (size_in_luma_pu_h));
cand_up = 0;
for (i = 0; i < max; i += 2)
@@ -2032,13 +2032,13 @@ void ff_intra_pred_8_16x16_msa(HEVCContext *s, int x0, int y0, int c_idx)
min_pu_width]).pred_flag == PF_INTRA);
}
if (cand_up_right == 1 && on_pu_edge_y) {
int y_top_pu = ((y0 - 1) >> s->ps.sps->log2_min_pu_size);
int y_top_pu = ((y0 - 1) >> s->sps->log2_min_pu_size);
int x_right_pu =
((x0 + size_in_luma_h) >> s->ps.sps->log2_min_pu_size);
((x0 + size_in_luma_h) >> s->sps->log2_min_pu_size);
int max =
((size_in_luma_pu_h) >
(s->ps.sps->min_pu_width -
x_right_pu) ? (s->ps.sps->min_pu_width -
(s->sps->min_pu_width -
x_right_pu) ? (s->sps->min_pu_width -
x_right_pu) : (size_in_luma_pu_h));
cand_up_right = 0;
for (i = 0; i < max; i += 2)
@@ -2093,56 +2093,56 @@ void ff_intra_pred_8_16x16_msa(HEVCContext *s, int x0, int y0, int c_idx)
} while (0);
}
if (s->ps.pps->constrained_intra_pred_flag == 1) {
if (s->pps->constrained_intra_pred_flag == 1) {
if (cand_bottom_left || cand_left || cand_up_left || cand_up
|| cand_up_right) {
int size_max_x =
x0 + ((2 * 16) << hshift) <
s->ps.sps->width ? 2 * 16 : (s->ps.sps->width - x0) >> hshift;
s->sps->width ? 2 * 16 : (s->sps->width - x0) >> hshift;
int size_max_y =
y0 + ((2 * 16) << vshift) <
s->ps.sps->height ? 2 * 16 : (s->ps.sps->height - y0) >> vshift;
s->sps->height ? 2 * 16 : (s->sps->height - y0) >> vshift;
int j = 16 + (cand_bottom_left ? bottom_left_size : 0) - 1;
if (!cand_up_right) {
size_max_x = x0 + ((16) << hshift) < s->ps.sps->width ?
16 : (s->ps.sps->width - x0) >> hshift;
size_max_x = x0 + ((16) << hshift) < s->sps->width ?
16 : (s->sps->width - x0) >> hshift;
}
if (!cand_bottom_left) {
size_max_y = y0 + ((16) << vshift) < s->ps.sps->height ?
16 : (s->ps.sps->height - y0) >> vshift;
size_max_y = y0 + ((16) << vshift) < s->sps->height ?
16 : (s->sps->height - y0) >> vshift;
}
if (cand_bottom_left || cand_left || cand_up_left) {
while (j > -1
&&
!((s->ref->tab_mvf[(((x0 +
((-1) << hshift)) >> s->ps.sps->
((-1) << hshift)) >> s->sps->
log2_min_pu_size)) + (((y0 +
((j) <<
vshift))
>> s->ps.sps->
>> s->sps->
log2_min_pu_size))
* min_pu_width]).pred_flag ==
PF_INTRA))
j--;
if (!
((s->ref->tab_mvf[(((x0 +
((-1) << hshift)) >> s->ps.sps->
((-1) << hshift)) >> s->sps->
log2_min_pu_size)) + (((y0 + ((j)
<<
vshift))
>> s->ps.sps->
>> s->sps->
log2_min_pu_size))
* min_pu_width]).pred_flag == PF_INTRA)) {
j = 0;
while (j < size_max_x
&&
!((s->ref->tab_mvf[(((x0 +
((j) << hshift)) >> s->ps.sps->
((j) << hshift)) >> s->sps->
log2_min_pu_size)) + (((y0 +
((-1) <<
vshift))
>> s->
ps.sps->
sps->
log2_min_pu_size))
* min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2151,12 +2151,12 @@ void ff_intra_pred_8_16x16_msa(HEVCContext *s, int x0, int y0, int c_idx)
if (!
((s->ref->tab_mvf[(((x0 +
((i -
1) << hshift)) >> s->ps.sps->
1) << hshift)) >> s->sps->
log2_min_pu_size)) + (((y0 +
((-1) <<
vshift))
>> s->
ps.sps->
sps->
log2_min_pu_size))
* min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2168,11 +2168,11 @@ void ff_intra_pred_8_16x16_msa(HEVCContext *s, int x0, int y0, int c_idx)
while (j < size_max_x
&&
!((s->ref->tab_mvf[(((x0 +
((j) << hshift)) >> s->ps.sps->
((j) << hshift)) >> s->sps->
log2_min_pu_size)) + (((y0 + ((-1)
<<
vshift))
>> s->ps.sps->
>> s->sps->
log2_min_pu_size))
* min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2184,11 +2184,11 @@ void ff_intra_pred_8_16x16_msa(HEVCContext *s, int x0, int y0, int c_idx)
((s->ref->tab_mvf[(((x0 +
((i -
1) << hshift)) >>
s->ps.sps->log2_min_pu_size))
s->sps->log2_min_pu_size))
+ (((y0 + ((-1)
<< vshift))
>>
s->ps.sps->log2_min_pu_size))
s->sps->log2_min_pu_size))
*
min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2199,11 +2199,11 @@ void ff_intra_pred_8_16x16_msa(HEVCContext *s, int x0, int y0, int c_idx)
((s->ref->tab_mvf[(((x0 +
((i -
1) << hshift)) >>
s->ps.sps->log2_min_pu_size))
s->sps->log2_min_pu_size))
+ (((y0 + ((-1)
<< vshift))
>>
s->ps.sps->log2_min_pu_size))
s->sps->log2_min_pu_size))
*
min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2218,11 +2218,11 @@ void ff_intra_pred_8_16x16_msa(HEVCContext *s, int x0, int y0, int c_idx)
for (i = 0; i < (0) + (size_max_y); i += 4)
if (!
((s->ref->tab_mvf[(((x0 +
((-1) << hshift)) >> s->ps.sps->
((-1) << hshift)) >> s->sps->
log2_min_pu_size)) + (((y0 +
((i) <<
vshift))
>> s->ps.sps->
>> s->sps->
log2_min_pu_size))
* min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2247,12 +2247,12 @@ void ff_intra_pred_8_16x16_msa(HEVCContext *s, int x0, int y0, int c_idx)
i > (size_max_y - 1) - (size_max_y); i -= 4)
if (!
((s->ref->tab_mvf[(((x0 +
((-1) << hshift)) >> s->ps.sps->
((-1) << hshift)) >> s->sps->
log2_min_pu_size)) + (((y0 +
((i -
3) <<
vshift))
>> s->ps.sps->
>> s->sps->
log2_min_pu_size))
* min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2261,11 +2261,11 @@ void ff_intra_pred_8_16x16_msa(HEVCContext *s, int x0, int y0, int c_idx)
a = ((left[i - 3]) * 0x01010101U);
if (!
((s->ref->tab_mvf[(((x0 +
((-1) << hshift)) >> s->ps.sps->
((-1) << hshift)) >> s->sps->
log2_min_pu_size)) + (((y0 + ((-1)
<<
vshift))
>> s->ps.sps->
>> s->sps->
log2_min_pu_size))
* min_pu_width]).pred_flag == PF_INTRA))
left[-1] = left[0];
@@ -2281,12 +2281,12 @@ void ff_intra_pred_8_16x16_msa(HEVCContext *s, int x0, int y0, int c_idx)
i > (size_max_y - 1) - (size_max_y); i -= 4)
if (!
((s->ref->tab_mvf[(((x0 +
((-1) << hshift)) >> s->ps.sps->
((-1) << hshift)) >> s->sps->
log2_min_pu_size)) + (((y0 +
((i -
3) <<
vshift))
>> s->ps.sps->
>> s->sps->
log2_min_pu_size))
* min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2300,11 +2300,11 @@ void ff_intra_pred_8_16x16_msa(HEVCContext *s, int x0, int y0, int c_idx)
for (i = 0; i < (0) + (size_max_x); i += 4)
if (!
((s->ref->tab_mvf[(((x0 +
((i) << hshift)) >> s->ps.sps->
((i) << hshift)) >> s->sps->
log2_min_pu_size)) + (((y0 + ((-1)
<<
vshift))
>> s->ps.sps->
>> s->sps->
log2_min_pu_size))
* min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2376,8 +2376,8 @@ void ff_intra_pred_8_16x16_msa(HEVCContext *s, int x0, int y0, int c_idx)
top[-1] = left[-1];
if (!s->ps.sps->intra_smoothing_disabled_flag
&& (c_idx == 0 || s->ps.sps->chroma_format_idc == 3)) {
if (!s->sps->intra_smoothing_disabled_flag
&& (c_idx == 0 || s->sps->chroma_format_idc == 3)) {
if (mode != INTRA_DC && 16 != 4) {
int intra_hor_ver_dist_thresh[] = { 7, 1, 0 };
int min_dist_vert_hor =
@@ -2432,24 +2432,24 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
v8i16 mul_val1 = { 1, 2, 3, 4, 5, 6, 7, 8 };
HEVCLocalContext *lc = s->HEVClc;
int i;
int hshift = s->ps.sps->hshift[c_idx];
int vshift = s->ps.sps->vshift[c_idx];
int hshift = s->sps->hshift[c_idx];
int vshift = s->sps->vshift[c_idx];
int size_in_luma_h = 32 << hshift;
int size_in_tbs_h = size_in_luma_h >> s->ps.sps->log2_min_tb_size;
int size_in_tbs_h = size_in_luma_h >> s->sps->log2_min_tb_size;
int size_in_luma_v = 32 << vshift;
int size_in_tbs_v = size_in_luma_v >> s->ps.sps->log2_min_tb_size;
int size_in_tbs_v = size_in_luma_v >> s->sps->log2_min_tb_size;
int x = x0 >> hshift;
int y = y0 >> vshift;
int x_tb = (x0 >> s->ps.sps->log2_min_tb_size) & s->ps.sps->tb_mask;
int y_tb = (y0 >> s->ps.sps->log2_min_tb_size) & s->ps.sps->tb_mask;
int x_tb = (x0 >> s->sps->log2_min_tb_size) & s->sps->tb_mask;
int y_tb = (y0 >> s->sps->log2_min_tb_size) & s->sps->tb_mask;
int cur_tb_addr =
s->ps.pps->min_tb_addr_zs[(y_tb) * (s->ps.sps->tb_mask + 2) + (x_tb)];
s->pps->min_tb_addr_zs[(y_tb) * (s->sps->tb_mask + 2) + (x_tb)];
ptrdiff_t stride = s->frame->linesize[c_idx] / sizeof(uint8_t);
uint8_t *src = (uint8_t *) s->frame->data[c_idx] + x + y * stride;
int min_pu_width = s->ps.sps->min_pu_width;
int min_pu_width = s->sps->min_pu_width;
enum IntraPredMode mode = c_idx ? lc->tu.intra_pred_mode_c :
lc->tu.intra_pred_mode;
@@ -2465,41 +2465,41 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
uint8_t *filtered_top = filtered_top_array + 1;
int cand_bottom_left = lc->na.cand_bottom_left
&& cur_tb_addr >
s->ps.pps->min_tb_addr_zs[((y_tb + size_in_tbs_v) & s->ps.sps->tb_mask) *
(s->ps.sps->tb_mask + 2) + (x_tb - 1)];
s->pps->min_tb_addr_zs[((y_tb + size_in_tbs_v) & s->sps->tb_mask) *
(s->sps->tb_mask + 2) + (x_tb - 1)];
int cand_left = lc->na.cand_left;
int cand_up_left = lc->na.cand_up_left;
int cand_up = lc->na.cand_up;
int cand_up_right = lc->na.cand_up_right
&& cur_tb_addr >
s->ps.pps->min_tb_addr_zs[(y_tb - 1) * (s->ps.sps->tb_mask + 2) +
((x_tb + size_in_tbs_h) & s->ps.sps->tb_mask)];
s->pps->min_tb_addr_zs[(y_tb - 1) * (s->sps->tb_mask + 2) +
((x_tb + size_in_tbs_h) & s->sps->tb_mask)];
int bottom_left_size =
(((y0 + 2 * size_in_luma_v) >
(s->ps.sps->height) ? (s->ps.sps->height) : (y0 +
(s->sps->height) ? (s->sps->height) : (y0 +
2 * size_in_luma_v)) -
(y0 + size_in_luma_v)) >> vshift;
int top_right_size =
(((x0 + 2 * size_in_luma_h) >
(s->ps.sps->width) ? (s->ps.sps->width) : (x0 + 2 * size_in_luma_h)) -
(s->sps->width) ? (s->sps->width) : (x0 + 2 * size_in_luma_h)) -
(x0 + size_in_luma_h)) >> hshift;
if (s->ps.pps->constrained_intra_pred_flag == 1) {
int size_in_luma_pu_v = ((size_in_luma_v) >> s->ps.sps->log2_min_pu_size);
int size_in_luma_pu_h = ((size_in_luma_h) >> s->ps.sps->log2_min_pu_size);
int on_pu_edge_x = !(x0 & ((1 << s->ps.sps->log2_min_pu_size) - 1));
int on_pu_edge_y = !(y0 & ((1 << s->ps.sps->log2_min_pu_size) - 1));
if (s->pps->constrained_intra_pred_flag == 1) {
int size_in_luma_pu_v = ((size_in_luma_v) >> s->sps->log2_min_pu_size);
int size_in_luma_pu_h = ((size_in_luma_h) >> s->sps->log2_min_pu_size);
int on_pu_edge_x = !(x0 & ((1 << s->sps->log2_min_pu_size) - 1));
int on_pu_edge_y = !(y0 & ((1 << s->sps->log2_min_pu_size) - 1));
if (!size_in_luma_pu_h)
size_in_luma_pu_h++;
if (cand_bottom_left == 1 && on_pu_edge_x) {
int x_left_pu = ((x0 - 1) >> s->ps.sps->log2_min_pu_size);
int x_left_pu = ((x0 - 1) >> s->sps->log2_min_pu_size);
int y_bottom_pu =
((y0 + size_in_luma_v) >> s->ps.sps->log2_min_pu_size);
((y0 + size_in_luma_v) >> s->sps->log2_min_pu_size);
int max =
((size_in_luma_pu_v) >
(s->ps.sps->min_pu_height -
y_bottom_pu) ? (s->ps.sps->min_pu_height -
(s->sps->min_pu_height -
y_bottom_pu) ? (s->sps->min_pu_height -
y_bottom_pu) : (size_in_luma_pu_v));
cand_bottom_left = 0;
for (i = 0; i < max; i += 2)
@@ -2510,12 +2510,12 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
PF_INTRA);
}
if (cand_left == 1 && on_pu_edge_x) {
int x_left_pu = ((x0 - 1) >> s->ps.sps->log2_min_pu_size);
int y_left_pu = ((y0) >> s->ps.sps->log2_min_pu_size);
int x_left_pu = ((x0 - 1) >> s->sps->log2_min_pu_size);
int y_left_pu = ((y0) >> s->sps->log2_min_pu_size);
int max =
((size_in_luma_pu_v) >
(s->ps.sps->min_pu_height -
y_left_pu) ? (s->ps.sps->min_pu_height -
(s->sps->min_pu_height -
y_left_pu) ? (s->sps->min_pu_height -
y_left_pu) : (size_in_luma_pu_v));
cand_left = 0;
for (i = 0; i < max; i += 2)
@@ -2526,20 +2526,20 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
PF_INTRA);
}
if (cand_up_left == 1) {
int x_left_pu = ((x0 - 1) >> s->ps.sps->log2_min_pu_size);
int y_top_pu = ((y0 - 1) >> s->ps.sps->log2_min_pu_size);
int x_left_pu = ((x0 - 1) >> s->sps->log2_min_pu_size);
int y_top_pu = ((y0 - 1) >> s->sps->log2_min_pu_size);
cand_up_left =
(s->ref->tab_mvf[(x_left_pu) +
(y_top_pu) * min_pu_width]).pred_flag ==
PF_INTRA;
}
if (cand_up == 1 && on_pu_edge_y) {
int x_top_pu = ((x0) >> s->ps.sps->log2_min_pu_size);
int y_top_pu = ((y0 - 1) >> s->ps.sps->log2_min_pu_size);
int x_top_pu = ((x0) >> s->sps->log2_min_pu_size);
int y_top_pu = ((y0 - 1) >> s->sps->log2_min_pu_size);
int max =
((size_in_luma_pu_h) >
(s->ps.sps->min_pu_width -
x_top_pu) ? (s->ps.sps->min_pu_width -
(s->sps->min_pu_width -
x_top_pu) ? (s->sps->min_pu_width -
x_top_pu) : (size_in_luma_pu_h));
cand_up = 0;
for (i = 0; i < max; i += 2)
@@ -2549,13 +2549,13 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
min_pu_width]).pred_flag == PF_INTRA);
}
if (cand_up_right == 1 && on_pu_edge_y) {
int y_top_pu = ((y0 - 1) >> s->ps.sps->log2_min_pu_size);
int y_top_pu = ((y0 - 1) >> s->sps->log2_min_pu_size);
int x_right_pu =
((x0 + size_in_luma_h) >> s->ps.sps->log2_min_pu_size);
((x0 + size_in_luma_h) >> s->sps->log2_min_pu_size);
int max =
((size_in_luma_pu_h) >
(s->ps.sps->min_pu_width -
x_right_pu) ? (s->ps.sps->min_pu_width -
(s->sps->min_pu_width -
x_right_pu) ? (s->sps->min_pu_width -
x_right_pu) : (size_in_luma_pu_h));
cand_up_right = 0;
for (i = 0; i < max; i += 2)
@@ -2608,56 +2608,56 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
} while (0);
}
if (s->ps.pps->constrained_intra_pred_flag == 1) {
if (s->pps->constrained_intra_pred_flag == 1) {
if (cand_bottom_left || cand_left || cand_up_left || cand_up
|| cand_up_right) {
int size_max_x =
x0 + ((2 * 32) << hshift) <
s->ps.sps->width ? 2 * 32 : (s->ps.sps->width - x0) >> hshift;
s->sps->width ? 2 * 32 : (s->sps->width - x0) >> hshift;
int size_max_y =
y0 + ((2 * 32) << vshift) <
s->ps.sps->height ? 2 * 32 : (s->ps.sps->height - y0) >> vshift;
s->sps->height ? 2 * 32 : (s->sps->height - y0) >> vshift;
int j = 32 + (cand_bottom_left ? bottom_left_size : 0) - 1;
if (!cand_up_right) {
size_max_x = x0 + ((32) << hshift) < s->ps.sps->width ?
32 : (s->ps.sps->width - x0) >> hshift;
size_max_x = x0 + ((32) << hshift) < s->sps->width ?
32 : (s->sps->width - x0) >> hshift;
}
if (!cand_bottom_left) {
size_max_y = y0 + ((32) << vshift) < s->ps.sps->height ?
32 : (s->ps.sps->height - y0) >> vshift;
size_max_y = y0 + ((32) << vshift) < s->sps->height ?
32 : (s->sps->height - y0) >> vshift;
}
if (cand_bottom_left || cand_left || cand_up_left) {
while (j > -1
&&
!((s->ref->tab_mvf[(((x0 +
((-1) << hshift)) >> s->ps.sps->
((-1) << hshift)) >> s->sps->
log2_min_pu_size)) + (((y0 +
((j) <<
vshift))
>> s->ps.sps->
>> s->sps->
log2_min_pu_size))
* min_pu_width]).pred_flag ==
PF_INTRA))
j--;
if (!
((s->ref->tab_mvf[(((x0 +
((-1) << hshift)) >> s->ps.sps->
((-1) << hshift)) >> s->sps->
log2_min_pu_size)) + (((y0 + ((j)
<<
vshift))
>> s->ps.sps->
>> s->sps->
log2_min_pu_size))
* min_pu_width]).pred_flag == PF_INTRA)) {
j = 0;
while (j < size_max_x
&&
!((s->ref->tab_mvf[(((x0 +
((j) << hshift)) >> s->ps.sps->
((j) << hshift)) >> s->sps->
log2_min_pu_size)) + (((y0 +
((-1) <<
vshift))
>> s->
ps.sps->
sps->
log2_min_pu_size))
* min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2666,12 +2666,12 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
if (!
((s->ref->tab_mvf[(((x0 +
((i -
1) << hshift)) >> s->ps.sps->
1) << hshift)) >> s->sps->
log2_min_pu_size)) + (((y0 +
((-1) <<
vshift))
>> s->
ps.sps->
sps->
log2_min_pu_size))
* min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2683,11 +2683,11 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
while (j < size_max_x
&&
!((s->ref->tab_mvf[(((x0 +
((j) << hshift)) >> s->ps.sps->
((j) << hshift)) >> s->sps->
log2_min_pu_size)) + (((y0 + ((-1)
<<
vshift))
>> s->ps.sps->
>> s->sps->
log2_min_pu_size))
* min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2699,11 +2699,11 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
((s->ref->tab_mvf[(((x0 +
((i -
1) << hshift)) >>
s->ps.sps->log2_min_pu_size))
s->sps->log2_min_pu_size))
+ (((y0 + ((-1)
<< vshift))
>>
s->ps.sps->log2_min_pu_size))
s->sps->log2_min_pu_size))
*
min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2714,11 +2714,11 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
((s->ref->tab_mvf[(((x0 +
((i -
1) << hshift)) >>
s->ps.sps->log2_min_pu_size))
s->sps->log2_min_pu_size))
+ (((y0 + ((-1)
<< vshift))
>>
s->ps.sps->log2_min_pu_size))
s->sps->log2_min_pu_size))
*
min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2733,11 +2733,11 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
for (i = 0; i < (0) + (size_max_y); i += 4)
if (!
((s->ref->tab_mvf[(((x0 +
((-1) << hshift)) >> s->ps.sps->
((-1) << hshift)) >> s->sps->
log2_min_pu_size)) + (((y0 +
((i) <<
vshift))
>> s->ps.sps->
>> s->sps->
log2_min_pu_size))
* min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2761,12 +2761,12 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
i > (size_max_y - 1) - (size_max_y); i -= 4)
if (!
((s->ref->tab_mvf[(((x0 +
((-1) << hshift)) >> s->ps.sps->
((-1) << hshift)) >> s->sps->
log2_min_pu_size)) + (((y0 +
((i -
3) <<
vshift))
>> s->ps.sps->
>> s->sps->
log2_min_pu_size))
* min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2775,11 +2775,11 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
a = ((left[i - 3]) * 0x01010101U);
if (!
((s->ref->tab_mvf[(((x0 +
((-1) << hshift)) >> s->ps.sps->
((-1) << hshift)) >> s->sps->
log2_min_pu_size)) + (((y0 + ((-1)
<<
vshift))
>> s->ps.sps->
>> s->sps->
log2_min_pu_size))
* min_pu_width]).pred_flag == PF_INTRA))
left[-1] = left[0];
@@ -2795,12 +2795,12 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
i > (size_max_y - 1) - (size_max_y); i -= 4)
if (!
((s->ref->tab_mvf[(((x0 +
((-1) << hshift)) >> s->ps.sps->
((-1) << hshift)) >> s->sps->
log2_min_pu_size)) + (((y0 +
((i -
3) <<
vshift))
>> s->ps.sps->
>> s->sps->
log2_min_pu_size))
* min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2814,11 +2814,11 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
for (i = 0; i < (0) + (size_max_x); i += 4)
if (!
((s->ref->tab_mvf[(((x0 +
((i) << hshift)) >> s->ps.sps->
((i) << hshift)) >> s->sps->
log2_min_pu_size)) + (((y0 + ((-1)
<<
vshift))
>> s->ps.sps->
>> s->sps->
log2_min_pu_size))
* min_pu_width]).pred_flag ==
PF_INTRA))
@@ -2893,8 +2893,8 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
top[-1] = left[-1];
if (!s->ps.sps->intra_smoothing_disabled_flag
&& (c_idx == 0 || s->ps.sps->chroma_format_idc == 3)) {
if (!s->sps->intra_smoothing_disabled_flag
&& (c_idx == 0 || s->sps->chroma_format_idc == 3)) {
if (mode != INTRA_DC && 32 != 4) {
int intra_hor_ver_dist_thresh[] = { 7, 1, 0 };
int min_dist_vert_hor =
@@ -2908,7 +2908,7 @@ void ff_intra_pred_8_32x32_msa(HEVCContext *s, int x0, int y0, int c_idx)
0 ? ((int) (mode - 26U)) : (-((int) (mode - 26U))))));
if (min_dist_vert_hor > intra_hor_ver_dist_thresh[5 - 3]) {
int threshold = 1 << (8 - 5);
if (s->ps.sps->sps_strong_intra_smoothing_enable_flag
if (s->sps->sps_strong_intra_smoothing_enable_flag
&& c_idx == 0
&& ((top[-1] + top[63] - 2 * top[31]) >=
0 ? (top[-1] + top[63] -

View File

@@ -49,6 +49,8 @@ static av_cold void idctdsp_init_mmi(IDCTDSPContext *c, AVCodecContext *avctx,
(avctx->bits_per_raw_sample != 10) &&
(avctx->bits_per_raw_sample != 12) &&
(avctx->idct_algo == FF_IDCT_AUTO)) {
c->idct_put = ff_simple_idct_put_mmi;
c->idct_add = ff_simple_idct_add_mmi;
c->idct = ff_simple_idct_mmi;
c->perm_type = FF_IDCT_PERM_NONE;
}

View File

@@ -54,7 +54,7 @@ DECLARE_ALIGNED(8, static const int16_t, coeffs)[]= {
C3, -C1, C3, -C1
};
void ff_simple_idct_mmi(int16_t *block)
static void simple_idct_mmi(int16_t *block)
{
DECLARE_ALIGNED(8, int64_t, align_tmp)[16];
int16_t * const temp= (int16_t*)align_tmp;
@@ -814,3 +814,20 @@ void ff_simple_idct_mmi(int16_t *block)
: "$10","$11"
);
}
void ff_simple_idct_mmi(int16_t *block)
{
simple_idct_mmi(block);
}
void ff_simple_idct_put_mmi(uint8_t *dest, int32_t line_size, int16_t *block)
{
simple_idct_mmi(block);
ff_put_pixels_clamped_mmi(block, dest, line_size);
}
void ff_simple_idct_add_mmi(uint8_t *dest, int32_t line_size, int16_t *block)
{
simple_idct_mmi(block);
ff_add_pixels_clamped_mmi(block, dest, line_size);
}

View File

@@ -259,7 +259,7 @@
mask_out = __msa_xori_b(mask_out, 0xff); \
}
void ff_loop_filter_v_4_8_msa(uint8_t *src, ptrdiff_t pitch,
void ff_loop_filter_v_4_8_msa(uint8_t *src, int32_t pitch,
int32_t b_limit_ptr,
int32_t limit_ptr,
int32_t thresh_ptr)
@@ -288,7 +288,7 @@ void ff_loop_filter_v_4_8_msa(uint8_t *src, ptrdiff_t pitch,
}
void ff_loop_filter_v_44_16_msa(uint8_t *src, ptrdiff_t pitch,
void ff_loop_filter_v_44_16_msa(uint8_t *src, int32_t pitch,
int32_t b_limit_ptr,
int32_t limit_ptr,
int32_t thresh_ptr)
@@ -318,7 +318,7 @@ void ff_loop_filter_v_44_16_msa(uint8_t *src, ptrdiff_t pitch,
ST_UB4(p1, p0, q0, q1, (src - 2 * pitch), pitch);
}
void ff_loop_filter_v_8_8_msa(uint8_t *src, ptrdiff_t pitch,
void ff_loop_filter_v_8_8_msa(uint8_t *src, int32_t pitch,
int32_t b_limit_ptr,
int32_t limit_ptr,
int32_t thresh_ptr)
@@ -392,7 +392,7 @@ void ff_loop_filter_v_8_8_msa(uint8_t *src, ptrdiff_t pitch,
}
}
void ff_loop_filter_v_88_16_msa(uint8_t *src, ptrdiff_t pitch,
void ff_loop_filter_v_88_16_msa(uint8_t *src, int32_t pitch,
int32_t b_limit_ptr,
int32_t limit_ptr,
int32_t thresh_ptr)
@@ -471,7 +471,7 @@ void ff_loop_filter_v_88_16_msa(uint8_t *src, ptrdiff_t pitch,
}
}
void ff_loop_filter_v_84_16_msa(uint8_t *src, ptrdiff_t pitch,
void ff_loop_filter_v_84_16_msa(uint8_t *src, int32_t pitch,
int32_t b_limit_ptr,
int32_t limit_ptr,
int32_t thresh_ptr)
@@ -542,7 +542,7 @@ void ff_loop_filter_v_84_16_msa(uint8_t *src, ptrdiff_t pitch,
}
}
void ff_loop_filter_v_48_16_msa(uint8_t *src, ptrdiff_t pitch,
void ff_loop_filter_v_48_16_msa(uint8_t *src, int32_t pitch,
int32_t b_limit_ptr,
int32_t limit_ptr,
int32_t thresh_ptr)
@@ -614,7 +614,7 @@ void ff_loop_filter_v_48_16_msa(uint8_t *src, ptrdiff_t pitch,
}
}
static int32_t vp9_hz_lpf_t4_and_t8_16w(uint8_t *src, ptrdiff_t pitch,
static int32_t vp9_hz_lpf_t4_and_t8_16w(uint8_t *src, int32_t pitch,
uint8_t *filter48,
int32_t b_limit_ptr,
int32_t limit_ptr,
@@ -689,7 +689,7 @@ static int32_t vp9_hz_lpf_t4_and_t8_16w(uint8_t *src, ptrdiff_t pitch,
}
}
static void vp9_hz_lpf_t16_16w(uint8_t *src, ptrdiff_t pitch, uint8_t *filter48)
static void vp9_hz_lpf_t16_16w(uint8_t *src, int32_t pitch, uint8_t *filter48)
{
v16u8 flat, flat2, filter8;
v16i8 zero = { 0 };
@@ -1021,7 +1021,7 @@ static void vp9_hz_lpf_t16_16w(uint8_t *src, ptrdiff_t pitch, uint8_t *filter48)
}
}
void ff_loop_filter_v_16_16_msa(uint8_t *src, ptrdiff_t pitch,
void ff_loop_filter_v_16_16_msa(uint8_t *src, int32_t pitch,
int32_t b_limit_ptr,
int32_t limit_ptr,
int32_t thresh_ptr)
@@ -1037,7 +1037,7 @@ void ff_loop_filter_v_16_16_msa(uint8_t *src, ptrdiff_t pitch,
}
}
void ff_loop_filter_v_16_8_msa(uint8_t *src, ptrdiff_t pitch,
void ff_loop_filter_v_16_8_msa(uint8_t *src, int32_t pitch,
int32_t b_limit_ptr,
int32_t limit_ptr,
int32_t thresh_ptr)
@@ -1261,7 +1261,7 @@ void ff_loop_filter_v_16_8_msa(uint8_t *src, ptrdiff_t pitch,
}
}
void ff_loop_filter_h_4_8_msa(uint8_t *src, ptrdiff_t pitch,
void ff_loop_filter_h_4_8_msa(uint8_t *src, int32_t pitch,
int32_t b_limit_ptr,
int32_t limit_ptr,
int32_t thresh_ptr)
@@ -1290,7 +1290,7 @@ void ff_loop_filter_h_4_8_msa(uint8_t *src, ptrdiff_t pitch,
ST4x4_UB(vec3, vec3, 0, 1, 2, 3, src, pitch);
}
void ff_loop_filter_h_44_16_msa(uint8_t *src, ptrdiff_t pitch,
void ff_loop_filter_h_44_16_msa(uint8_t *src, int32_t pitch,
int32_t b_limit_ptr,
int32_t limit_ptr,
int32_t thresh_ptr)
@@ -1337,7 +1337,7 @@ void ff_loop_filter_h_44_16_msa(uint8_t *src, ptrdiff_t pitch,
ST4x8_UB(tmp4, tmp5, src, pitch);
}
void ff_loop_filter_h_8_8_msa(uint8_t *src, ptrdiff_t pitch,
void ff_loop_filter_h_8_8_msa(uint8_t *src, int32_t pitch,
int32_t b_limit_ptr,
int32_t limit_ptr,
int32_t thresh_ptr)
@@ -1417,7 +1417,7 @@ void ff_loop_filter_h_8_8_msa(uint8_t *src, ptrdiff_t pitch,
}
}
void ff_loop_filter_h_88_16_msa(uint8_t *src, ptrdiff_t pitch,
void ff_loop_filter_h_88_16_msa(uint8_t *src, int32_t pitch,
int32_t b_limit_ptr,
int32_t limit_ptr,
int32_t thresh_ptr)
@@ -1531,7 +1531,7 @@ void ff_loop_filter_h_88_16_msa(uint8_t *src, ptrdiff_t pitch,
}
}
void ff_loop_filter_h_84_16_msa(uint8_t *src, ptrdiff_t pitch,
void ff_loop_filter_h_84_16_msa(uint8_t *src, int32_t pitch,
int32_t b_limit_ptr,
int32_t limit_ptr,
int32_t thresh_ptr)
@@ -1635,7 +1635,7 @@ void ff_loop_filter_h_84_16_msa(uint8_t *src, ptrdiff_t pitch,
}
}
void ff_loop_filter_h_48_16_msa(uint8_t *src, ptrdiff_t pitch,
void ff_loop_filter_h_48_16_msa(uint8_t *src, int32_t pitch,
int32_t b_limit_ptr,
int32_t limit_ptr,
int32_t thresh_ptr)
@@ -1912,7 +1912,7 @@ static int32_t vp9_vt_lpf_t4_and_t8_8w(uint8_t *src, uint8_t *filter48,
}
}
static int32_t vp9_vt_lpf_t16_8w(uint8_t *src, uint8_t *src_org, ptrdiff_t pitch,
static int32_t vp9_vt_lpf_t16_8w(uint8_t *src, uint8_t *src_org, int32_t pitch,
uint8_t *filter48)
{
v16i8 zero = { 0 };
@@ -2136,7 +2136,7 @@ static int32_t vp9_vt_lpf_t16_8w(uint8_t *src, uint8_t *src_org, ptrdiff_t pitch
}
}
void ff_loop_filter_h_16_8_msa(uint8_t *src, ptrdiff_t pitch,
void ff_loop_filter_h_16_8_msa(uint8_t *src, int32_t pitch,
int32_t b_limit_ptr,
int32_t limit_ptr,
int32_t thresh_ptr)
@@ -2162,7 +2162,7 @@ void ff_loop_filter_h_16_8_msa(uint8_t *src, ptrdiff_t pitch,
}
static int32_t vp9_vt_lpf_t4_and_t8_16w(uint8_t *src, uint8_t *filter48,
uint8_t *src_org, ptrdiff_t pitch,
uint8_t *src_org, int32_t pitch,
int32_t b_limit_ptr,
int32_t limit_ptr,
int32_t thresh_ptr)
@@ -2246,7 +2246,7 @@ static int32_t vp9_vt_lpf_t4_and_t8_16w(uint8_t *src, uint8_t *filter48,
}
}
static int32_t vp9_vt_lpf_t16_16w(uint8_t *src, uint8_t *src_org, ptrdiff_t pitch,
static int32_t vp9_vt_lpf_t16_16w(uint8_t *src, uint8_t *src_org, int32_t pitch,
uint8_t *filter48)
{
v16u8 flat, flat2, filter8;
@@ -2573,7 +2573,7 @@ static int32_t vp9_vt_lpf_t16_16w(uint8_t *src, uint8_t *src_org, ptrdiff_t pitc
}
}
void ff_loop_filter_h_16_16_msa(uint8_t *src, ptrdiff_t pitch,
void ff_loop_filter_h_16_16_msa(uint8_t *src, int32_t pitch,
int32_t b_limit_ptr,
int32_t limit_ptr,
int32_t thresh_ptr)

View File

@@ -995,14 +995,7 @@ static int ljpeg_decode_rgb_scan(MJpegDecodeContext *s, int nb_components, int p
skip_bits(&s->gb, 16); /* skip RSTn */
}
}
if (s->rct && s->nb_components == 4) {
for (mb_x = 0; mb_x < s->mb_width; mb_x++) {
ptr[4*mb_x + 2] = buffer[mb_x][0] - ((buffer[mb_x][1] + buffer[mb_x][2] - 0x200) >> 2);
ptr[4*mb_x + 1] = buffer[mb_x][1] + ptr[4*mb_x + 2];
ptr[4*mb_x + 3] = buffer[mb_x][2] + ptr[4*mb_x + 2];
ptr[4*mb_x + 0] = buffer[mb_x][3];
}
} else if (s->nb_components == 4) {
if (s->nb_components == 4) {
for(i=0; i<nb_components; i++) {
int c= s->comp_index[i];
if (s->bits <= 8) {

View File

@@ -1657,11 +1657,9 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *got_frame_ptr,
uint32_t header;
int ret;
int skipped = 0;
while(buf_size && !*buf){
buf++;
buf_size--;
skipped++;
}
if (buf_size < HEADER_SIZE)
@@ -1716,7 +1714,7 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *got_frame_ptr,
return ret;
}
s->frame_size = 0;
return buf_size + skipped;
return buf_size;
}
static void mp_flush(MPADecodeContext *ctx)

View File

@@ -20,8 +20,6 @@
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* non linear quantizers with large QPs and VBV with restrictive qmin fixes sponsored by NOA GmbH
*/
/**

View File

@@ -912,11 +912,6 @@ static int decode_fctl_chunk(AVCodecContext *avctx, PNGDecContext *s,
cur_w > s->width - x_offset|| cur_h > s->height - y_offset)
return AVERROR_INVALIDDATA;
if (blend_op != APNG_BLEND_OP_OVER && blend_op != APNG_BLEND_OP_SOURCE) {
av_log(avctx, AV_LOG_ERROR, "Invalid blend_op %d\n", blend_op);
return AVERROR_INVALIDDATA;
}
if (sequence_number == 0 && dispose_op == APNG_DISPOSE_OP_PREVIOUS) {
// No previous frame to revert to for the first frame
// Spec says to just treat it as a APNG_DISPOSE_OP_BACKGROUND
@@ -1259,7 +1254,7 @@ static int decode_frame_png(AVCodecContext *avctx,
return AVERROR_INVALIDDATA;
}
s->y = s->state = s->has_trns = 0;
s->y = s->state = 0;
/* init the zlib */
s->zstream.zalloc = ff_png_zalloc;

View File

@@ -565,8 +565,6 @@ static inline int get_symbol(RangeCoder *c, uint8_t *state, int is_signed){
e= 0;
while(get_rac(c, state+1 + FFMIN(e,9))){ //1..10
e++;
if (e > 31)
return AVERROR_INVALIDDATA;
}
a= 1;

View File

@@ -31,7 +31,7 @@
*/
#include <stdint.h>
#include "libavutil/attributes.h"
#include <libavutil/attributes.h>
#include "version.h"
/**

View File

@@ -205,7 +205,7 @@ static void fill_picture_parameters(const HEVCContext *h, VAPictureParameterBuff
pp->pps_tc_offset_div2 = h->ps.pps->tc_offset / 2;
pp->log2_parallel_merge_level_minus2 = h->ps.pps->log2_parallel_merge_level - 2;
/* Different chroma/luma bit depths are currently not supported by ffmpeg. */
/* Diffrent chroma/luma bit depths are currently not supported by ffmpeg. */
pp->bit_depth_luma_minus8 = h->ps.sps->bit_depth - 8;
pp->bit_depth_chroma_minus8 = h->ps.sps->bit_depth - 8;

View File

@@ -382,7 +382,6 @@ apply_noise_main:
%else
%define count m_maxq
%endif
movsxdifnidn noiseq, noised
dec noiseq
shl count, 2
%ifdef PIC

View File

@@ -205,7 +205,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
delta = pts - s->pts - get_delay(s);
out_size = avresample_available(s->avr);
if (llabs(delta) > s->min_delta ||
if (labs(delta) > s->min_delta ||
(s->first_frame && delta && s->first_pts != AV_NOPTS_VALUE)) {
av_log(ctx, AV_LOG_VERBOSE, "Discontinuity - %"PRId64" samples.\n", delta);
out_size = av_clipl_int32((int64_t)out_size + delta);

View File

@@ -142,7 +142,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
AVFilterContext *ctx = inlink->dst;
LADSPAContext *s = ctx->priv;
AVFrame *out;
int i, h, p;
int i, h;
if (!s->nb_outputs ||
(av_frame_is_writable(in) && s->nb_inputs == s->nb_outputs &&
@@ -159,15 +159,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
for (h = 0; h < s->nb_handles; h++) {
for (i = 0; i < s->nb_inputs; i++) {
p = s->nb_handles > 1 ? h : i;
s->desc->connect_port(s->handles[h], s->ipmap[i],
(LADSPA_Data*)in->extended_data[p]);
(LADSPA_Data*)in->extended_data[i]);
}
for (i = 0; i < s->nb_outputs; i++) {
p = s->nb_handles > 1 ? h : i;
s->desc->connect_port(s->handles[h], s->opmap[i],
(LADSPA_Data*)out->extended_data[p]);
(LADSPA_Data*)out->extended_data[i]);
}
s->desc->run(s->handles[h], in->nb_samples);

View File

@@ -359,7 +359,7 @@ cglobal rg_fl_mode_6, 4, 5, 16, 0, dst, src, stride, pixels
paddw m2, m7 ; c2
paddw m3, m6 ; c3
paddw m4, m5 ; c4
; As the differences (d1..d4) can only be positive, there is no need to
; As the differences (d1..d4) can only be postive, there is no need to
; clip to zero. Also, the maximum positive value is less than 768.
pminsw m1, m2
@@ -485,7 +485,7 @@ cglobal rg_fl_mode_8, 4, 5, 16, 0, dst, src, stride, pixels
paddw m2, m7 ; c1
paddw m3, m6 ; c1
paddw m4, m5 ; c1
; As the differences (d1..d4) can only be positive, there is no need to
; As the differences (d1..d4) can only be postive, there is no need to
; clip to zero. Also, the maximum positive value is less than 768.
pminsw m1, m2

View File

@@ -583,7 +583,7 @@ static int asf_read_metadata_obj(AVFormatContext *s, const GUIDParseTable *g)
break;
type = avio_rl16(pb);
val_len = avio_rl32(pb);
name = av_malloc(buflen);
name = av_malloc(name_len);
if (!name)
return AVERROR(ENOMEM);
avio_get_str16le(pb, name_len, name,
@@ -1042,8 +1042,8 @@ static const GUIDParseTable gdef[] = {
{ "Mutex Language", { 0xD6, 0xE2, 0x2A, 0x00, 0x25, 0xDA, 0x11, 0xD1, 0x90, 0x34, 0x00, 0xA0, 0xC9, 0x03, 0x49, 0xBE }, asf_read_unknown, 1 },
{ "Mutex Bitrate", { 0xD6, 0xE2, 0x2A, 0x01, 0x25, 0xDA, 0x11, 0xD1, 0x90, 0x34, 0x00, 0xA0, 0xC9, 0x03, 0x49, 0xBE }, asf_read_unknown, 1 },
{ "Mutex Unknown", { 0xD6, 0xE2, 0x2A, 0x02, 0x25, 0xDA, 0x11, 0xD1, 0x90, 0x34, 0x00, 0xA0, 0xC9, 0x03, 0x49, 0xBE }, asf_read_unknown, 1 },
{ "Bandwidth Sharing Exclusive", { 0xAF, 0x60, 0x60, 0xAA, 0x51, 0x97, 0x11, 0xD2, 0xB6, 0xAF, 0x00, 0xC0, 0x4F, 0xD9, 0x08, 0xE9 }, asf_read_unknown, 1 },
{ "Bandwidth Sharing Partial", { 0xAF, 0x60, 0x60, 0xAB, 0x51, 0x97, 0x11, 0xD2, 0xB6, 0xAF, 0x00, 0xC0, 0x4F, 0xD9, 0x08, 0xE9 }, asf_read_unknown, 1 },
{ "Bandwith Sharing Exclusive", { 0xAF, 0x60, 0x60, 0xAA, 0x51, 0x97, 0x11, 0xD2, 0xB6, 0xAF, 0x00, 0xC0, 0x4F, 0xD9, 0x08, 0xE9 }, asf_read_unknown, 1 },
{ "Bandwith Sharing Partial", { 0xAF, 0x60, 0x60, 0xAB, 0x51, 0x97, 0x11, 0xD2, 0xB6, 0xAF, 0x00, 0xC0, 0x4F, 0xD9, 0x08, 0xE9 }, asf_read_unknown, 1 },
{ "Payload Extension System Timecode", { 0x39, 0x95, 0x95, 0xEC, 0x86, 0x67, 0x4E, 0x2D, 0x8F, 0xDB, 0x98, 0x81, 0x4C, 0xE7, 0x6C, 0x1E }, asf_read_unknown, 1 },
{ "Payload Extension System File Name", { 0xE1, 0x65, 0xEC, 0x0E, 0x19, 0xED, 0x45, 0xD7, 0xB4, 0xA7, 0x25, 0xCB, 0xD1, 0xE2, 0x8E, 0x9B }, asf_read_unknown, 1 },
{ "Payload Extension System Content Type", { 0xD5, 0x90, 0xDC, 0x20, 0x07, 0xBC, 0x43, 0x6C, 0x9C, 0xF7, 0xF3, 0xBB, 0xFB, 0xF1, 0xA4, 0xDC }, asf_read_unknown, 1 },
@@ -1141,7 +1141,7 @@ static int asf_read_replicated_data(AVFormatContext *s, ASFPacket *asf_pkt)
if (!asf_pkt->data_size) {
asf_pkt->data_size = asf_pkt->size_left = avio_rl32(pb); // read media object size
if (asf_pkt->data_size <= 0)
return AVERROR_INVALIDDATA;
return AVERROR_EOF;
if ((ret = av_new_packet(&asf_pkt->avpkt, asf_pkt->data_size)) < 0)
return ret;
} else
@@ -1163,7 +1163,7 @@ static int asf_read_multiple_payload(AVFormatContext *s, AVPacket *pkt,
int ret;
int skip = 0;
// if replicated length is 1, subpayloads are present
// if replicated lenght is 1, subpayloads are present
if (asf->rep_data_len == 1) {
asf->sub_left = 1;
asf->state = READ_MULTI_SUB;
@@ -1190,8 +1190,6 @@ static int asf_read_multiple_payload(AVFormatContext *s, AVPacket *pkt,
skip = pay_len - asf_pkt->size_left;
pay_len = asf_pkt->size_left;
}
if (asf_pkt->size_left <= 0)
return AVERROR_INVALIDDATA;
if ((ret = avio_read(pb, p, pay_len)) < 0)
return ret;
if (s->key && s->keylen == 20)
@@ -1239,7 +1237,7 @@ static int asf_read_single_payload(AVFormatContext *s, AVPacket *pkt,
return AVERROR_INVALIDDATA;
}
p = asf_pkt->avpkt.data + asf_pkt->data_size - asf_pkt->size_left;
if (size > asf_pkt->size_left || asf_pkt->size_left <= 0)
if (size > asf_pkt->size_left)
return AVERROR_INVALIDDATA;
if (asf_pkt->size_left > size)
asf_pkt->size_left -= size;

View File

@@ -170,7 +170,7 @@ static int async_open(URLContext *h, const char *arg, int flags, AVDictionary **
c->interrupt_callback = h->interrupt_callback;
ret = ffurl_open(&c->inner, arg, flags, &interrupt_callback, options);
if (ret != 0) {
av_log(h, AV_LOG_ERROR, "ffurl_open failed : %s, %s\n", av_err2str(ret), arg);
av_log(h, AV_LOG_ERROR, "ffurl_open failed : %s, %s\n", strerror(ret), arg);
goto url_fail;
}
@@ -179,25 +179,25 @@ static int async_open(URLContext *h, const char *arg, int flags, AVDictionary **
ret = pthread_mutex_init(&c->mutex, NULL);
if (ret != 0) {
av_log(h, AV_LOG_ERROR, "pthread_mutex_init failed : %s\n", av_err2str(ret));
av_log(h, AV_LOG_ERROR, "pthread_mutex_init failed : %s\n", strerror(ret));
goto mutex_fail;
}
ret = pthread_cond_init(&c->cond_wakeup_main, NULL);
if (ret != 0) {
av_log(h, AV_LOG_ERROR, "pthread_cond_init failed : %s\n", av_err2str(ret));
av_log(h, AV_LOG_ERROR, "pthread_cond_init failed : %s\n", strerror(ret));
goto cond_wakeup_main_fail;
}
ret = pthread_cond_init(&c->cond_wakeup_background, NULL);
if (ret != 0) {
av_log(h, AV_LOG_ERROR, "pthread_cond_init failed : %s\n", av_err2str(ret));
av_log(h, AV_LOG_ERROR, "pthread_cond_init failed : %s\n", strerror(ret));
goto cond_wakeup_background_fail;
}
ret = pthread_create(&c->async_buffer_thread, NULL, async_buffer_task, h);
if (ret) {
av_log(h, AV_LOG_ERROR, "pthread_create failed : %s\n", av_err2str(ret));
av_log(h, AV_LOG_ERROR, "pthread_create failed : %s\n", strerror(ret));
goto thread_fail;
}
@@ -229,7 +229,7 @@ static int async_close(URLContext *h)
ret = pthread_join(c->async_buffer_thread, NULL);
if (ret != 0)
av_log(h, AV_LOG_ERROR, "pthread_join(): %s\n", av_err2str(ret));
av_log(h, AV_LOG_ERROR, "pthread_join(): %s\n", strerror(ret));
pthread_cond_destroy(&c->cond_wakeup_background);
pthread_cond_destroy(&c->cond_wakeup_main);

View File

@@ -1581,8 +1581,7 @@ static int avi_read_idx1(AVFormatContext *s, int size)
ast = st->priv_data;
if (first_packet && first_packet_pos) {
if (avi->movi_list + 4 != pos || pos + 500 > first_packet_pos)
data_offset = first_packet_pos - pos;
data_offset = first_packet_pos - pos;
first_packet = 0;
}
pos += data_offset;

View File

@@ -151,7 +151,7 @@ static int ffm_read_data(AVFormatContext *s,
return size1 - size;
}
/* ensure that actual seeking happens between FFM_PACKET_SIZE
/* ensure that acutal seeking happens between FFM_PACKET_SIZE
and file_size - FFM_PACKET_SIZE */
static int64_t ffm_seek1(AVFormatContext *s, int64_t pos1)
{

View File

@@ -516,11 +516,15 @@ static int url_connect(struct playlist *pls, AVDictionary *opts, AVDictionary *o
av_dict_copy(&tmp, opts, 0);
av_dict_copy(&tmp, opts2, 0);
if ((ret = ffurl_connect(pls->input, &tmp)) < 0) {
if ((ret = av_opt_set_dict(pls->input, &tmp)) < 0)
goto fail;
if ((ret = ffurl_connect(pls->input, NULL)) < 0) {
ffurl_close(pls->input);
pls->input = NULL;
}
fail:
av_dict_free(&tmp);
return ret;
}
@@ -1043,7 +1047,7 @@ static int open_input(HLSContext *c, struct playlist *pls)
/* Seek to the requested position. If this was a HTTP request, the offset
* should already be where want it to, but this allows e.g. local testing
* without a HTTP server. */
if (ret == 0 && seg->key_type == KEY_NONE && seg->url_offset) {
if (ret == 0 && seg->key_type == KEY_NONE) {
int seekret = ffurl_seek(pls->input, seg->url_offset, SEEK_SET);
if (seekret < 0) {
av_log(pls->parent, AV_LOG_ERROR, "Unable to seek to offset %"PRId64" of HLS segment '%s'\n", seg->url_offset, seg->url);

View File

@@ -163,6 +163,12 @@ static int hls_delete_old_segments(HLSContext *hls) {
ret = AVERROR(ENOMEM);
goto fail;
}
sub_path_size = strlen(dirname) + strlen(segment->sub_filename) + 1;
sub_path = av_malloc(sub_path_size);
if (!sub_path) {
ret = AVERROR(ENOMEM);
goto fail;
}
av_strlcpy(path, dirname, path_size);
av_strlcat(path, segment->filename, path_size);
@@ -171,23 +177,14 @@ static int hls_delete_old_segments(HLSContext *hls) {
path, strerror(errno));
}
if (segment->sub_filename[0] != '\0') {
sub_path_size = strlen(dirname) + strlen(segment->sub_filename) + 1;
sub_path = av_malloc(sub_path_size);
if (!sub_path) {
ret = AVERROR(ENOMEM);
goto fail;
}
av_strlcpy(sub_path, dirname, sub_path_size);
av_strlcat(sub_path, segment->sub_filename, sub_path_size);
if (unlink(sub_path) < 0) {
av_log(hls, AV_LOG_ERROR, "failed to delete old segment %s: %s\n",
sub_path, strerror(errno));
}
av_free(sub_path);
av_strlcpy(sub_path, dirname, sub_path_size);
av_strlcat(sub_path, segment->sub_filename, sub_path_size);
if (unlink(sub_path) < 0) {
av_log(hls, AV_LOG_ERROR, "failed to delete old segment %s: %s\n",
sub_path, strerror(errno));
}
av_freep(&path);
av_free(sub_path);
previous_segment = segment;
segment = previous_segment->next;
av_free(previous_segment);
@@ -313,8 +310,6 @@ static int hls_append_segment(HLSContext *hls, double duration, int64_t pos,
if(hls->has_subtitle)
av_strlcpy(en->sub_filename, av_basename(hls->vtt_avf->filename), sizeof(en->sub_filename));
else
en->sub_filename[0] = '\0';
en->duration = duration;
en->pos = pos;

View File

@@ -220,21 +220,21 @@ static char *make_digest_auth(HTTPAuthState *state, const char *username,
/* TODO: Escape the quoted strings properly. */
av_strlcatf(authstr, len, "username=\"%s\"", username);
av_strlcatf(authstr, len, ", realm=\"%s\"", state->realm);
av_strlcatf(authstr, len, ", nonce=\"%s\"", digest->nonce);
av_strlcatf(authstr, len, ", uri=\"%s\"", uri);
av_strlcatf(authstr, len, ", response=\"%s\"", response);
av_strlcatf(authstr, len, ",realm=\"%s\"", state->realm);
av_strlcatf(authstr, len, ",nonce=\"%s\"", digest->nonce);
av_strlcatf(authstr, len, ",uri=\"%s\"", uri);
av_strlcatf(authstr, len, ",response=\"%s\"", response);
// we are violating the RFC and use "" because all others seem to do that too.
if (digest->algorithm[0])
av_strlcatf(authstr, len, ", algorithm=\"%s\"", digest->algorithm);
av_strlcatf(authstr, len, ",algorithm=\"%s\"", digest->algorithm);
if (digest->opaque[0])
av_strlcatf(authstr, len, ", opaque=\"%s\"", digest->opaque);
av_strlcatf(authstr, len, ",opaque=\"%s\"", digest->opaque);
if (digest->qop[0]) {
av_strlcatf(authstr, len, ", qop=\"%s\"", digest->qop);
av_strlcatf(authstr, len, ", cnonce=\"%s\"", cnonce);
av_strlcatf(authstr, len, ", nc=%s", nc);
av_strlcatf(authstr, len, ",qop=\"%s\"", digest->qop);
av_strlcatf(authstr, len, ",cnonce=\"%s\"", cnonce);
av_strlcatf(authstr, len, ",nc=%s", nc);
}
av_strlcatf(authstr, len, "\r\n");

View File

@@ -444,17 +444,14 @@ int ff_img_read_packet(AVFormatContext *s1, AVPacket *pkt)
}
res = av_new_packet(pkt, size[0] + size[1] + size[2]);
if (res < 0) {
goto fail;
}
if (res < 0)
return res;
pkt->stream_index = 0;
pkt->flags |= AV_PKT_FLAG_KEY;
if (s->ts_from_file) {
struct stat img_stat;
if (stat(filename, &img_stat)) {
res = AVERROR(EIO);
goto fail;
}
if (stat(filename, &img_stat))
return AVERROR(EIO);
pkt->pts = (int64_t)img_stat.st_mtime;
#if HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC
if (s->ts_from_file == 2)
@@ -488,29 +485,18 @@ int ff_img_read_packet(AVFormatContext *s1, AVPacket *pkt)
if (ret[0] <= 0 || ret[1] < 0 || ret[2] < 0) {
av_free_packet(pkt);
if (ret[0] < 0) {
res = ret[0];
return ret[0];
} else if (ret[1] < 0) {
res = ret[1];
} else if (ret[2] < 0) {
res = ret[2];
} else {
res = AVERROR_EOF;
}
goto fail;
return ret[1];
} else if (ret[2] < 0)
return ret[2];
return AVERROR_EOF;
} else {
s->img_count++;
s->img_number++;
s->pts++;
return 0;
}
fail:
if (!s->is_pipe) {
for (i = 0; i < 3; i++) {
avio_closep(&f[i]);
}
}
return res;
}
static int img_read_close(struct AVFormatContext* s1)

View File

@@ -838,9 +838,9 @@ static int mov_read_adrm(MOVContext *c, AVIOContext *pb, MOVAtom atom)
}
/* drm blob processing */
avio_read(pb, output, 8); // go to offset 8, absolute position 0x251
avio_read(pb, output, 8); // go to offset 8, absolute postion 0x251
avio_read(pb, input, DRM_BLOB_SIZE);
avio_read(pb, output, 4); // go to offset 4, absolute position 0x28d
avio_read(pb, output, 4); // go to offset 4, absolute postion 0x28d
avio_read(pb, file_checksum, 20);
av_log(c->fc, AV_LOG_INFO, "[aax] file checksum == "); // required by external tools

View File

@@ -939,7 +939,7 @@ static int vobsub_read_packet(AVFormatContext *s, AVPacket *pkt)
total_read += pkt_size;
/* the current chunk doesn't match the stream index (unlikely) */
if ((startcode & 0x1f) != s->streams[idx_pkt.stream_index]->id)
if ((startcode & 0x1f) != idx_pkt.stream_index)
break;
ret = av_grow_packet(pkt, to_read);

View File

@@ -18,8 +18,6 @@
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* signal_standard, color_siting and klv_fill_key version fixes sponsored by NOA GmbH
*/
/*

View File

@@ -41,17 +41,15 @@ static int srt_probe(AVProbeData *p)
ff_text_r8(&tr);
/* Check if the first non-empty line is a number. We do not check what the
* number is because in practice it can be anything.
* Also, that number can be followed by random garbage, so we can not
* unfortunately check that we only have a number. */
* number is because in practice it can be anything. */
if (ff_subtitles_read_line(&tr, buf, sizeof(buf)) < 0 ||
strtol(buf, &pbuf, 10) < 0 || pbuf == buf)
strtol(buf, &pbuf, 10) < 0 || *pbuf)
return 0;
/* Check if the next line matches a SRT timestamp */
if (ff_subtitles_read_line(&tr, buf, sizeof(buf)) < 0)
return 0;
if (buf[0] >= '0' && buf[0] <= '9' && strstr(buf, " --> ")
if (buf[0] >= '0' && buf[1] <= '9' && strstr(buf, " --> ")
&& sscanf(buf, "%*d:%*2d:%*2d%*1[,.]%*3d --> %*d:%*2d:%*2d%*1[,.]%3d", &v) == 1)
return AVPROBE_SCORE_MAX;

View File

@@ -46,14 +46,8 @@ static void webvtt_write_time(AVIOContext *pb, int64_t millisec)
static int webvtt_write_header(AVFormatContext *ctx)
{
AVStream *s = ctx->streams[0];
AVCodecContext *avctx = ctx->streams[0]->codec;
AVIOContext *pb = ctx->pb;
if (ctx->nb_streams != 1 || avctx->codec_id != AV_CODEC_ID_WEBVTT) {
av_log(ctx, AV_LOG_ERROR, "Exactly one WebVTT stream is needed.\n");
return AVERROR(EINVAL);
}
avpriv_set_pts_info(s, 64, 1, 1000);
avio_printf(pb, "WEBVTT\n");

View File

@@ -27,6 +27,15 @@
#include "mem.h"
#include "blowfish.h"
#if !FF_API_CRYPTO_CONTEXT
#define AV_BF_ROUNDS 16
struct AVBlowfish {
uint32_t p[AV_BF_ROUNDS + 2];
uint32_t s[4][256];
};
#endif
static const uint32_t orig_p[AV_BF_ROUNDS + 2] = {
0x243F6A88, 0x85A308D3, 0x13198A2E, 0x03707344,
0xA4093822, 0x299F31D0, 0x082EFA98, 0xEC4E6C89,

View File

@@ -31,12 +31,16 @@
* @{
*/
#if FF_API_CRYPTO_CONTEXT
#define AV_BF_ROUNDS 16
typedef struct AVBlowfish {
uint32_t p[AV_BF_ROUNDS + 2];
uint32_t s[4][256];
} AVBlowfish;
#else
typedef struct AVBlowfish AVBlowfish;
#endif
/**
* Allocate an AVBlowfish context.

View File

@@ -25,6 +25,13 @@
#include "mem.h"
#include "des.h"
#if !FF_API_CRYPTO_CONTEXT
struct AVDES {
uint64_t round_keys[3][16];
int triple_des;
};
#endif
#define T(a, b, c, d, e, f, g, h) 64-a,64-b,64-c,64-d,64-e,64-f,64-g,64-h
static const uint8_t IP_shuffle[] = {
T(58, 50, 42, 34, 26, 18, 10, 2),

View File

@@ -30,10 +30,14 @@
* @{
*/
#if FF_API_CRYPTO_CONTEXT
typedef struct AVDES {
uint64_t round_keys[3][16];
int triple_des;
} AVDES;
#else
typedef struct AVDES AVDES;
#endif
/**
* Allocate an AVDES context.

View File

@@ -343,7 +343,7 @@ void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl)
#if CONFIG_VALGRIND_BACKTRACE
if (level <= BACKTRACE_LOGLEVEL)
VALGRIND_PRINTF_BACKTRACE("%s", "");
VALGRIND_PRINTF_BACKTRACE("");
#endif
end:
av_bprint_finalize(part+3, NULL);

View File

@@ -25,6 +25,13 @@
#include "mem.h"
#include "rc4.h"
#if !FF_API_CRYPTO_CONTEXT
struct AVRC4 {
uint8_t state[256];
int x, y;
};
#endif
AVRC4 *av_rc4_alloc(void)
{
return av_mallocz(sizeof(struct AVRC4));

View File

@@ -30,10 +30,14 @@
* @{
*/
#if FF_API_CRYPTO_CONTEXT
typedef struct AVRC4 {
uint8_t state[256];
int x, y;
} AVRC4;
#else
typedef struct AVRC4 AVRC4;
#endif
/**
* Allocate an AVRC4 context.

View File

@@ -129,6 +129,9 @@
#ifndef FF_API_HMAC
#define FF_API_HMAC (LIBAVUTIL_VERSION_MAJOR < 55)
#endif
#ifndef FF_API_CRYPTO_CONTEXT
#define FF_API_CRYPTO_CONTEXT (LIBAVUTIL_VERSION_MAJOR < 56)
#endif
#ifndef FF_API_VAAPI
#define FF_API_VAAPI (LIBAVUTIL_VERSION_MAJOR < 56)
#endif

View File

@@ -34,6 +34,12 @@
#include "mem.h"
#include "xtea.h"
#if !FF_API_CRYPTO_CONTEXT
struct AVXTEA {
uint32_t key[16];
};
#endif
AVXTEA *av_xtea_alloc(void)
{
return av_mallocz(sizeof(struct AVXTEA));

View File

@@ -33,9 +33,13 @@
* @{
*/
#if FF_API_CRYPTO_CONTEXT
typedef struct AVXTEA {
uint32_t key[16];
} AVXTEA;
#else
typedef struct AVXTEA AVXTEA;
#endif
/**
* Allocate an AVXTEA context.

View File

@@ -144,7 +144,7 @@ int ff_rotate_slice(SwsSlice *s, int lum, int chr)
return 0;
}
int ff_init_slice_from_src(SwsSlice * s, uint8_t *src[4], int stride[4], int srcW, int lumY, int lumH, int chrY, int chrH, int relative)
int ff_init_slice_from_src(SwsSlice * s, uint8_t *src[4], int stride[4], int srcW, int lumY, int lumH, int chrY, int chrH)
{
int i = 0;
@@ -158,32 +158,30 @@ int ff_init_slice_from_src(SwsSlice * s, uint8_t *src[4], int stride[4], int src
chrY + chrH,
lumY + lumH};
const uint8_t *src_[4] = {src[0] + (relative ? 0 : start[0]) * stride[0],
src[1] + (relative ? 0 : start[1]) * stride[0],
src[2] + (relative ? 0 : start[2]) * stride[0],
src[3] + (relative ? 0 : start[3]) * stride[0]};
s->width = srcW;
for (i = 0; i < 4; ++i) {
int j;
int first = s->plane[i].sliceY;
int n = s->plane[i].available_lines;
int lines = end[i] - start[i];
int tot_lines = end[i] - first;
int lines = end[i];
lines = s->plane[i].available_lines < lines ? s->plane[i].available_lines : lines;
if (start[i] >= first && n >= tot_lines) {
s->plane[i].sliceH = FFMAX(tot_lines, s->plane[i].sliceH);
for (j = 0; j < lines; j+= 1)
s->plane[i].line[start[i] - first + j] = src_[i] + j * stride[i];
if (end[i] > s->plane[i].sliceY+s->plane[i].sliceH) {
if (start[i] <= s->plane[i].sliceY+1)
s->plane[i].sliceY = FFMIN(start[i], s->plane[i].sliceY);
else
s->plane[i].sliceY = start[i];
s->plane[i].sliceH = end[i] - s->plane[i].sliceY;
} else {
if (end[i] >= s->plane[i].sliceY)
s->plane[i].sliceH = s->plane[i].sliceY + s->plane[i].sliceH - start[i];
else
s->plane[i].sliceH = end[i] - start[i];
s->plane[i].sliceY = start[i];
lines = lines > n ? n : lines;
s->plane[i].sliceH = lines;
for (j = 0; j < lines; j+= 1)
s->plane[i].line[j] = src_[i] + j * stride[i];
}
for (j = start[i]; j < lines; j+= 1)
s->plane[i].line[j] = src[i] + (start[i] + j) * stride[i];
}
return 0;

View File

@@ -359,7 +359,6 @@ static int swscale(SwsContext *c, const uint8_t *src[],
#ifndef NEW_FILTER
uint8_t *formatConvBuffer = c->formatConvBuffer;
uint32_t *pal = c->pal_yuv;
int perform_gamma = c->is_internal_gamma;
#endif
yuv2planar1_fn yuv2plane1 = c->yuv2plane1;
yuv2planarX_fn yuv2planeX = c->yuv2planeX;
@@ -380,6 +379,7 @@ static int swscale(SwsContext *c, const uint8_t *src[],
int chrBufIndex = c->chrBufIndex;
int lastInLumBuf = c->lastInLumBuf;
int lastInChrBuf = c->lastInChrBuf;
int perform_gamma = c->is_internal_gamma;
#ifdef NEW_FILTER
int lumStart = 0;
@@ -471,23 +471,22 @@ static int swscale(SwsContext *c, const uint8_t *src[],
yuv2packed1, yuv2packed2, yuv2packedX, yuv2anyX, c->use_mmx_vfilter);
ff_init_slice_from_src(src_slice, (uint8_t**)src, srcStride, c->srcW,
srcSliceY, srcSliceH, chrSrcSliceY, chrSrcSliceH, 1);
srcSliceY, srcSliceH, chrSrcSliceY, chrSrcSliceH);
ff_init_slice_from_src(vout_slice, (uint8_t**)dst, dstStride, c->dstW,
dstY, dstH, dstY >> c->chrDstVSubSample,
FF_CEIL_RSHIFT(dstH, c->chrDstVSubSample), 0);
if (srcSliceY == 0) {
hout_slice->plane[0].sliceY = lastInLumBuf + 1;
hout_slice->plane[1].sliceY = lastInChrBuf + 1;
hout_slice->plane[2].sliceY = lastInChrBuf + 1;
hout_slice->plane[3].sliceY = lastInLumBuf + 1;
FF_CEIL_RSHIFT(dstH, c->chrDstVSubSample));
hout_slice->plane[0].sliceH =
hout_slice->plane[1].sliceH =
hout_slice->plane[2].sliceH =
hout_slice->plane[3].sliceH = 0;
hout_slice->width = dstW;
}
hout_slice->plane[0].sliceY = lastInLumBuf + 1;
hout_slice->plane[1].sliceY = lastInChrBuf + 1;
hout_slice->plane[2].sliceY = lastInChrBuf + 1;
hout_slice->plane[3].sliceY = lastInLumBuf + 1;
hout_slice->plane[0].sliceH =
hout_slice->plane[1].sliceH =
hout_slice->plane[2].sliceH =
hout_slice->plane[3].sliceH = 0;
hout_slice->width = dstW;
#endif
for (; dstY < dstH; dstY++) {
@@ -523,8 +522,8 @@ static int swscale(SwsContext *c, const uint8_t *src[],
#ifdef NEW_FILTER
hasLumHoles = lastInLumBuf != firstLumSrcY - 1;
if (hasLumHoles) {
hout_slice->plane[0].sliceY = firstLumSrcY;
hout_slice->plane[3].sliceY = firstLumSrcY;
hout_slice->plane[0].sliceY = lastInLumBuf + 1;
hout_slice->plane[3].sliceY = lastInLumBuf + 1;
hout_slice->plane[0].sliceH =
hout_slice->plane[3].sliceH = 0;
}
@@ -535,8 +534,8 @@ static int swscale(SwsContext *c, const uint8_t *src[],
#ifdef NEW_FILTER
hasChrHoles = lastInChrBuf != firstChrSrcY - 1;
if (hasChrHoles) {
hout_slice->plane[1].sliceY = firstChrSrcY;
hout_slice->plane[2].sliceY = firstChrSrcY;
hout_slice->plane[1].sliceY = lastInChrBuf + 1;
hout_slice->plane[2].sliceY = lastInChrBuf + 1;
hout_slice->plane[1].sliceH =
hout_slice->plane[2].sliceH = 0;
}

View File

@@ -82,22 +82,6 @@ const char *swscale_license(void);
#define SWS_BITEXACT 0x80000
#define SWS_ERROR_DIFFUSION 0x800000
#if FF_API_SWS_CPU_CAPS
/**
* CPU caps are autodetected now, those flags
* are only provided for API compatibility.
*/
#define SWS_CPU_CAPS_MMX 0x80000000
#define SWS_CPU_CAPS_MMXEXT 0x20000000
#define SWS_CPU_CAPS_MMX2 0x20000000
#define SWS_CPU_CAPS_3DNOW 0x40000000
#define SWS_CPU_CAPS_ALTIVEC 0x10000000
#if FF_API_ARCH_BFIN
#define SWS_CPU_CAPS_BFIN 0x01000000
#endif
#define SWS_CPU_CAPS_SSE2 0x02000000
#endif
#define SWS_MAX_REDUCE_CUTOFF 0.002
#define SWS_CS_ITU709 1

View File

@@ -1012,8 +1012,7 @@ typedef struct VScalerContext
} VScalerContext;
// warp input lines in the form (src + width*i + j) to slice format (line[i][j])
// relative=true means first line src[x][0] otherwise first line is src[x][lum/crh Y]
int ff_init_slice_from_src(SwsSlice * s, uint8_t *src[4], int stride[4], int srcW, int lumY, int lumH, int chrY, int chrH, int relative);
int ff_init_slice_from_src(SwsSlice * s, uint8_t *src[4], int stride[4], int srcW, int lumY, int lumH, int chrY, int chrH);
// Initialize scaler filter descriptor chain
int ff_init_filters(SwsContext *c);

View File

@@ -46,11 +46,4 @@
* the public API and may change, break or disappear at any time.
*/
#ifndef FF_API_SWS_CPU_CAPS
#define FF_API_SWS_CPU_CAPS (LIBSWSCALE_VERSION_MAJOR < 4)
#endif
#ifndef FF_API_ARCH_BFIN
#define FF_API_ARCH_BFIN (LIBSWSCALE_VERSION_MAJOR < 4)
#endif
#endif /* SWSCALE_VERSION_H */

View File

@@ -148,7 +148,7 @@ fate-aac-aref-encode: REF = ./tests/data/asynth-44100-2.wav
fate-aac-aref-encode: CMP_SHIFT = -4096
fate-aac-aref-encode: CMP_TARGET = 594
fate-aac-aref-encode: SIZE_TOLERANCE = 2464
fate-aac-aref-encode: FUZZ = 6
fate-aac-aref-encode: FUZZ = 5
FATE_AAC_ENCODE += fate-aac-ln-encode
fate-aac-ln-encode: CMD = enc_dec_pcm adts wav s16le $(TARGET_SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav -strict -2 -c:a aac -aac_is 0 -aac_pns 0 -b:a 512k