Compare commits
128 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
043f326060 | ||
![]() |
9a641b909c | ||
![]() |
5405ba7b63 | ||
![]() |
70f6d553d9 | ||
![]() |
25fc3deed8 | ||
![]() |
a8a6cdfcd7 | ||
![]() |
39518589e7 | ||
![]() |
857e391697 | ||
![]() |
04aa2ffbcf | ||
![]() |
63523485f4 | ||
![]() |
35bc67503e | ||
![]() |
1f636a697f | ||
![]() |
24d725f455 | ||
![]() |
66fcf1fa40 | ||
![]() |
c7b7e0790c | ||
![]() |
3f3e5f8f60 | ||
![]() |
8e95ddbe82 | ||
![]() |
8cba067fe5 | ||
![]() |
73c6520c09 | ||
![]() |
ca47574e16 | ||
![]() |
045670a6f7 | ||
![]() |
30a0622a5d | ||
![]() |
e4d921dc71 | ||
![]() |
2185103bcd | ||
![]() |
bf7ee2524b | ||
![]() |
5a1efc7b85 | ||
![]() |
71af22097d | ||
![]() |
f3d34cff76 | ||
![]() |
81b38caf21 | ||
![]() |
20071ff1a4 | ||
![]() |
3b7db9c4f5 | ||
![]() |
0ddcee172e | ||
![]() |
13ecdb06f8 | ||
![]() |
ca8c62d187 | ||
![]() |
e443165c32 | ||
![]() |
0b41eeac45 | ||
![]() |
de31f85707 | ||
![]() |
d61454e7c1 | ||
![]() |
b02e4faa3e | ||
![]() |
09256527be | ||
![]() |
84d26ab6eb | ||
![]() |
1d99adc953 | ||
![]() |
67991f3a3e | ||
![]() |
32e8922faf | ||
![]() |
32dbd1f342 | ||
![]() |
eefc3ca7be | ||
![]() |
a16558e122 | ||
![]() |
506368f563 | ||
![]() |
c0c24bc9b3 | ||
![]() |
b89f279cd6 | ||
![]() |
7f90eef87a | ||
![]() |
71f0a3c4ad | ||
![]() |
d9bef14e41 | ||
![]() |
4b4ed88e89 | ||
![]() |
f6476944e1 | ||
![]() |
03d30d4c2c | ||
![]() |
853a27e345 | ||
![]() |
f7c0f8355e | ||
![]() |
6f5c505109 | ||
![]() |
b29f9897e3 | ||
![]() |
1d987a34d8 | ||
![]() |
6099d1ca0e | ||
![]() |
a9b9751bc8 | ||
![]() |
da5e52010c | ||
![]() |
e1fd837888 | ||
![]() |
1d10997488 | ||
![]() |
76a5cf1f80 | ||
![]() |
16c3d6d392 | ||
![]() |
9d79848f84 | ||
![]() |
b8d34604ff | ||
![]() |
7a02b9cb2d | ||
![]() |
ff6d440d10 | ||
![]() |
a88a57cd24 | ||
![]() |
0cda7baa8b | ||
![]() |
31baa6f199 | ||
![]() |
3b364ac18a | ||
![]() |
63660277fd | ||
![]() |
6101187c55 | ||
![]() |
91ff803a74 | ||
![]() |
4f4f78ea48 | ||
![]() |
ff24824a72 | ||
![]() |
570cefb02b | ||
![]() |
ce0972ecdd | ||
![]() |
09c848855a | ||
![]() |
e1ce4f805f | ||
![]() |
bb5c0ac922 | ||
![]() |
d389438296 | ||
![]() |
3b57d7769a | ||
![]() |
b7f2719951 | ||
![]() |
dc4e34a2f0 | ||
![]() |
d694ab846c | ||
![]() |
ab02548c8a | ||
![]() |
9eb442cca2 | ||
![]() |
b45ab61b24 | ||
![]() |
cc73b4f574 | ||
![]() |
8ac3b2cdb7 | ||
![]() |
ace90ee265 | ||
![]() |
703bd31647 | ||
![]() |
c16e80ee3d | ||
![]() |
66ac5b96e8 | ||
![]() |
547cad8c81 | ||
![]() |
55b1a1e9c1 | ||
![]() |
f851477889 | ||
![]() |
4f2d4b98fc | ||
![]() |
7d8ebb8774 | ||
![]() |
07b0ccf511 | ||
![]() |
9d3e69ae30 | ||
![]() |
480633c6c2 | ||
![]() |
b5d4f49e3c | ||
![]() |
4cde8bae49 | ||
![]() |
5b740d1eaa | ||
![]() |
152e09fde7 | ||
![]() |
110841c3ab | ||
![]() |
5694831e06 | ||
![]() |
1f52f82a55 | ||
![]() |
e62f08ca8d | ||
![]() |
ee099059e7 | ||
![]() |
e2a89f7f0f | ||
![]() |
7c46855074 | ||
![]() |
c2d6cc2971 | ||
![]() |
8c91414803 | ||
![]() |
0263750a0d | ||
![]() |
63795fe5b9 | ||
![]() |
d2bad216f7 | ||
![]() |
d04fb11868 | ||
![]() |
e8f2823f06 | ||
![]() |
7dfccac20c | ||
![]() |
04361427e6 |
74
Changelog
74
Changelog
@@ -2,6 +2,80 @@ Entries are sorted chronologically from oldest to youngest within each release,
|
||||
releases are sorted from youngest to oldest.
|
||||
|
||||
version <next>:
|
||||
|
||||
version 2.4.3:
|
||||
- avcodec/svq1dec: zero terminate embedded message before printing
|
||||
- avcodec/cook: check that the subpacket sizes fit in block_align
|
||||
- avcodec/g2meet: check tile dimensions to avoid integer overflow
|
||||
- avcodec/utils: Align dimensions by at least their chroma sub-sampling factors.
|
||||
- avcodec/dnxhddec: treat pix_fmt like width/height
|
||||
- avcodec/dxa: check dimensions
|
||||
- avcodec/dirac_arith: fix integer overflow
|
||||
- avcodec/diracdec: Tighter checks on CODEBLOCKS_X/Y
|
||||
- avcodec/diracdec: Use 64bit in calculation of codeblock coordinates
|
||||
- avcodec/sgidec: fix count check
|
||||
- avcodec/sgidec: fix linesize for 16bit
|
||||
- avcodec/hevc_ps: Check default display window bitstream and skip if invalid
|
||||
- avcodec/tiffenc: properly compute packet size
|
||||
- lavd: export all symbols with av_ prefix
|
||||
- avformat/mxfdec: Fix termination of mxf_data_essence_container_uls
|
||||
- postproc: fix qp count
|
||||
- postproc/postprocess: fix quant store for fq mode
|
||||
- vf_drawtext: add missing clear of pointers after av_expr_free()
|
||||
- utvideoenc: properly set slice height/last line
|
||||
- swresample: fix sample drop loop end condition
|
||||
- resample: Avoid off-by-1 errors in PTS calcs.
|
||||
- imc: fix order of operations in coefficients read
|
||||
- hevc_mvs: make sure to always initialize the temporal MV fully
|
||||
- hevc_mvs: initialize the temporal MV in case of missing reference
|
||||
|
||||
version 2.4.2:
|
||||
- avcodec/on2avc: Check number of channels
|
||||
- avcodec/hevc: fix chroma transform_add size
|
||||
- avcodec/h264: Check mode before considering mixed mode intra prediction
|
||||
- avformat/mpegts: use a padded buffer in read_sl_header()
|
||||
- avformat/mpegts: Check desc_len / get8() return code
|
||||
- avcodec/vorbisdec: Fix off by 1 error in ptns_to_read
|
||||
- sdp: add support for H.261
|
||||
- avcodec/svq3: Do not memcpy AVFrame
|
||||
- avcodec/smc: fix off by 1 error
|
||||
- avcodec/qpeg: fix off by 1 error in MV bounds check
|
||||
- avcodec/gifdec: factorize interleave end handling out
|
||||
- avcodec/cinepak: fix integer underflow
|
||||
- avcodec/pngdec: Check bits per pixel before setting monoblack pixel format
|
||||
- avcodec/pngdec: Calculate MPNG bytewidth more defensively
|
||||
- avcodec/tiff: more completely check bpp/bppcount
|
||||
- avcodec/mmvideo: Bounds check 2nd line of HHV Intra blocks
|
||||
- avcodec/h263dec: Fix decoding messenger.h263
|
||||
- avcodec/utils: Add case for jv to avcodec_align_dimensions2()
|
||||
- avcodec/mjpegdec: check bits per pixel for changes similar to dimensions
|
||||
- avcodec/jpeglsdec: Check run value more completely in ls_decode_line()
|
||||
- avformat/hlsenc: export inner muxer timebase
|
||||
- configure: add noexecstack to linker options if supported.
|
||||
- avcodec/ac3enc_template: fix out of array read
|
||||
- avutil/x86/cpu: fix cpuid sub-leaf selection
|
||||
- avformat/img2dec: enable generic seeking for image pipes
|
||||
- avformat/img2dec: initialize pkt->pos for image pipes
|
||||
- avformat/img2dec: pass error code and signal EOF
|
||||
- avformat/img2dec: fix error code at EOF for pipes
|
||||
- libavutil/opt: fix av_opt_set_channel_layout() to access correct memory address
|
||||
- tests/fate-run.sh: Cat .err file in case of error with V>0
|
||||
- avformat/riffenc: Filter out "BottomUp" in ff_put_bmp_header()
|
||||
- avcodec/webp: fix default palette color 0xff000000 -> 0x00000000
|
||||
- avcodec/asvenc: fix AAN scaling
|
||||
- Fix compile error on arm4/arm5 platform
|
||||
|
||||
|
||||
version 2.4.1:
|
||||
- swscale: Allow chroma samples to be above and to the left of luma samples
|
||||
- avcodec/libilbc: support for latest git of libilbc
|
||||
- avcodec/webp: treat out-of-bound palette index as translucent black
|
||||
- vf_deshake: rename Transform.vector to Transform.vec to avoid compiler confusion
|
||||
- apetag: Fix APE tag size check
|
||||
- tools/crypto_bench: fix build when AV_READ_TIME is unavailable
|
||||
|
||||
|
||||
version 2.4:
|
||||
- Icecast protocol
|
||||
- ported lenscorrection filter from frei0r filter
|
||||
- large optimizations in dctdnoiz to make it usable
|
||||
|
@@ -534,7 +534,7 @@ x86 Michael Niedermayer
|
||||
Releases
|
||||
========
|
||||
|
||||
2.3 Michael Niedermayer
|
||||
2.4 Michael Niedermayer
|
||||
2.2 Michael Niedermayer
|
||||
1.2 Michael Niedermayer
|
||||
|
||||
|
@@ -53,6 +53,8 @@
|
||||
• API for live metadata updates through event flags.
|
||||
• UTF-16 support in text subtitles formats.
|
||||
• The ASS muxer now reorders the Dialogue events properly.
|
||||
• support for H.261 RTP payload format (RFC 4587)
|
||||
• HEVC/H.265 RTP payload format (draft v6) depacketizer
|
||||
|
||||
┌────────────────────────────┐
|
||||
│ libavfilter │
|
||||
|
1
configure
vendored
1
configure
vendored
@@ -4608,6 +4608,7 @@ fi
|
||||
check_code cc arm_neon.h "int16x8_t test = vdupq_n_s16(0)" && enable intrinsics_neon
|
||||
|
||||
check_ldflags -Wl,--as-needed
|
||||
check_ldflags -Wl,-z,noexecstack
|
||||
|
||||
if check_func dlopen; then
|
||||
ldl=
|
||||
|
@@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg
|
||||
# This could be handy for archiving the generated documentation or
|
||||
# if some version control system is used.
|
||||
|
||||
PROJECT_NUMBER =
|
||||
PROJECT_NUMBER = 2.4.3
|
||||
|
||||
# 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
|
||||
|
@@ -199,8 +199,7 @@ int main(int argc, char **argv)
|
||||
fmt, dst_ch_layout, dst_nb_channels, dst_rate, dst_filename);
|
||||
|
||||
end:
|
||||
if (dst_file)
|
||||
fclose(dst_file);
|
||||
fclose(dst_file);
|
||||
|
||||
if (src_data)
|
||||
av_freep(&src_data[0]);
|
||||
|
@@ -132,8 +132,7 @@ int main(int argc, char **argv)
|
||||
av_get_pix_fmt_name(dst_pix_fmt), dst_w, dst_h, dst_filename);
|
||||
|
||||
end:
|
||||
if (dst_file)
|
||||
fclose(dst_file);
|
||||
fclose(dst_file);
|
||||
av_freep(&src_data[0]);
|
||||
av_freep(&dst_data[0]);
|
||||
sws_freeContext(sws_ctx);
|
||||
|
@@ -263,7 +263,7 @@ static void apply_channel_coupling(AC3EncodeContext *s)
|
||||
energy_cpl = energy[blk][CPL_CH][bnd];
|
||||
energy_ch = energy[blk][ch][bnd];
|
||||
blk1 = blk+1;
|
||||
while (!s->blocks[blk1].new_cpl_coords[ch] && blk1 < s->num_blocks) {
|
||||
while (blk1 < s->num_blocks && !s->blocks[blk1].new_cpl_coords[ch]) {
|
||||
if (s->blocks[blk1].cpl_in_use) {
|
||||
energy_cpl += energy[blk1][CPL_CH][bnd];
|
||||
energy_ch += energy[blk1][ch][bnd];
|
||||
|
@@ -107,8 +107,10 @@ av_cold void ff_h264dsp_init_arm(H264DSPContext *c, const int bit_depth,
|
||||
{
|
||||
int cpu_flags = av_get_cpu_flags();
|
||||
|
||||
#if HAVE_ARMV6
|
||||
if (have_setend(cpu_flags))
|
||||
c->startcode_find_candidate = ff_startcode_find_candidate_armv6;
|
||||
#endif
|
||||
if (have_neon(cpu_flags))
|
||||
h264dsp_init_neon(c, bit_depth, chroma_format_idc);
|
||||
}
|
||||
|
@@ -28,8 +28,10 @@ av_cold void ff_vc1dsp_init_arm(VC1DSPContext *dsp)
|
||||
{
|
||||
int cpu_flags = av_get_cpu_flags();
|
||||
|
||||
#if HAVE_ARMV6
|
||||
if (have_setend(cpu_flags))
|
||||
dsp->startcode_find_candidate = ff_startcode_find_candidate_armv6;
|
||||
#endif
|
||||
if (have_neon(cpu_flags))
|
||||
ff_vc1dsp_init_neon(dsp);
|
||||
}
|
||||
|
@@ -26,8 +26,10 @@
|
||||
#include "libavutil/attributes.h"
|
||||
#include "libavutil/mem.h"
|
||||
|
||||
#include "aandcttab.h"
|
||||
#include "asv.h"
|
||||
#include "avcodec.h"
|
||||
#include "dct.h"
|
||||
#include "fdctdsp.h"
|
||||
#include "internal.h"
|
||||
#include "mathops.h"
|
||||
@@ -331,8 +333,13 @@ static av_cold int encode_init(AVCodecContext *avctx)
|
||||
((uint32_t *) avctx->extradata)[1] = av_le2ne32(AV_RL32("ASUS"));
|
||||
|
||||
for (i = 0; i < 64; i++) {
|
||||
int q = 32 * scale * ff_mpeg1_default_intra_matrix[i];
|
||||
a->q_intra_matrix[i] = ((a->inv_qscale << 16) + q / 2) / q;
|
||||
if (a->fdsp.fdct == ff_fdct_ifast) {
|
||||
int q = 32LL * scale * ff_mpeg1_default_intra_matrix[i] * ff_aanscales[i];
|
||||
a->q_intra_matrix[i] = (((int64_t)a->inv_qscale << 30) + q / 2) / q;
|
||||
} else {
|
||||
int q = 32 * scale * ff_mpeg1_default_intra_matrix[i];
|
||||
a->q_intra_matrix[i] = ((a->inv_qscale << 16) + q / 2) / q;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@@ -135,7 +135,7 @@ static int cinepak_decode_vectors (CinepakContext *s, cvid_strip *strip,
|
||||
const uint8_t *eod = (data + size);
|
||||
uint32_t flag, mask;
|
||||
uint8_t *cb0, *cb1, *cb2, *cb3;
|
||||
unsigned int x, y;
|
||||
int x, y;
|
||||
char *ip0, *ip1, *ip2, *ip3;
|
||||
|
||||
flag = 0;
|
||||
|
@@ -1215,8 +1215,8 @@ static av_cold int cook_decode_init(AVCodecContext *avctx)
|
||||
|
||||
q->num_subpackets++;
|
||||
s++;
|
||||
if (s > MAX_SUBPACKETS) {
|
||||
avpriv_request_sample(avctx, "subpackets > %d", MAX_SUBPACKETS);
|
||||
if (s > FFMIN(MAX_SUBPACKETS, avctx->block_align)) {
|
||||
avpriv_request_sample(avctx, "subpackets > %d", FFMIN(MAX_SUBPACKETS, avctx->block_align));
|
||||
return AVERROR_PATCHWELCOME;
|
||||
}
|
||||
}
|
||||
|
@@ -171,6 +171,10 @@ static inline int dirac_get_arith_uint(DiracArith *c, int follow_ctx, int data_c
|
||||
{
|
||||
int ret = 1;
|
||||
while (!dirac_get_arith_bit(c, follow_ctx)) {
|
||||
if (ret >= 0x40000000) {
|
||||
av_log(NULL, AV_LOG_ERROR, "dirac_get_arith_uint overflow\n");
|
||||
return -1;
|
||||
}
|
||||
ret <<= 1;
|
||||
ret += dirac_get_arith_bit(c, data_ctx);
|
||||
follow_ctx = ff_dirac_next_ctx[follow_ctx];
|
||||
|
@@ -612,10 +612,10 @@ static av_always_inline void decode_subband_internal(DiracContext *s, SubBand *b
|
||||
|
||||
top = 0;
|
||||
for (cb_y = 0; cb_y < cb_height; cb_y++) {
|
||||
bottom = (b->height * (cb_y+1)) / cb_height;
|
||||
bottom = (b->height * (cb_y+1LL)) / cb_height;
|
||||
left = 0;
|
||||
for (cb_x = 0; cb_x < cb_width; cb_x++) {
|
||||
right = (b->width * (cb_x+1)) / cb_width;
|
||||
right = (b->width * (cb_x+1LL)) / cb_width;
|
||||
codeblock(s, b, &gb, &c, left, right, top, bottom, blockcnt_one, is_arith);
|
||||
left = right;
|
||||
}
|
||||
@@ -1004,8 +1004,8 @@ static int dirac_unpack_idwt_params(DiracContext *s)
|
||||
/* Codeblock parameters (core syntax only) */
|
||||
if (get_bits1(gb)) {
|
||||
for (i = 0; i <= s->wavelet_depth; i++) {
|
||||
CHECKEDREAD(s->codeblock[i].width , tmp < 1, "codeblock width invalid\n")
|
||||
CHECKEDREAD(s->codeblock[i].height, tmp < 1, "codeblock height invalid\n")
|
||||
CHECKEDREAD(s->codeblock[i].width , tmp < 1 || tmp > (s->avctx->width >>s->wavelet_depth-i), "codeblock width invalid\n")
|
||||
CHECKEDREAD(s->codeblock[i].height, tmp < 1 || tmp > (s->avctx->height>>s->wavelet_depth-i), "codeblock height invalid\n")
|
||||
}
|
||||
|
||||
CHECKEDREAD(s->codeblock_mode, tmp > 1, "unknown codeblock mode\n")
|
||||
|
@@ -38,6 +38,7 @@ typedef struct DNXHDContext {
|
||||
BlockDSPContext bdsp;
|
||||
int64_t cid; ///< compression id
|
||||
unsigned int width, height;
|
||||
enum AVPixelFormat pix_fmt;
|
||||
unsigned int mb_width, mb_height;
|
||||
uint32_t mb_scan_index[68]; /* max for 1080p */
|
||||
int cur_field; ///< current interlaced field
|
||||
@@ -141,7 +142,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame,
|
||||
|
||||
ctx->is_444 = 0;
|
||||
if (buf[0x4] == 0x2) {
|
||||
ctx->avctx->pix_fmt = AV_PIX_FMT_YUV444P10;
|
||||
ctx->pix_fmt = AV_PIX_FMT_YUV444P10;
|
||||
ctx->avctx->bits_per_raw_sample = 10;
|
||||
if (ctx->bit_depth != 10) {
|
||||
ff_blockdsp_init(&ctx->bdsp, ctx->avctx);
|
||||
@@ -151,7 +152,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame,
|
||||
}
|
||||
ctx->is_444 = 1;
|
||||
} else if (buf[0x21] & 0x40) {
|
||||
ctx->avctx->pix_fmt = AV_PIX_FMT_YUV422P10;
|
||||
ctx->pix_fmt = AV_PIX_FMT_YUV422P10;
|
||||
ctx->avctx->bits_per_raw_sample = 10;
|
||||
if (ctx->bit_depth != 10) {
|
||||
ff_blockdsp_init(&ctx->bdsp, ctx->avctx);
|
||||
@@ -160,7 +161,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame,
|
||||
ctx->decode_dct_block = dnxhd_decode_dct_block_10;
|
||||
}
|
||||
} else {
|
||||
ctx->avctx->pix_fmt = AV_PIX_FMT_YUV422P;
|
||||
ctx->pix_fmt = AV_PIX_FMT_YUV422P;
|
||||
ctx->avctx->bits_per_raw_sample = 8;
|
||||
if (ctx->bit_depth != 8) {
|
||||
ff_blockdsp_init(&ctx->bdsp, ctx->avctx);
|
||||
@@ -446,7 +447,13 @@ decode_coding_unit:
|
||||
avctx->width, avctx->height, ctx->width, ctx->height);
|
||||
first_field = 1;
|
||||
}
|
||||
if (avctx->pix_fmt != AV_PIX_FMT_NONE && avctx->pix_fmt != ctx->pix_fmt) {
|
||||
av_log(avctx, AV_LOG_WARNING, "pix_fmt changed: %s -> %s\n",
|
||||
av_get_pix_fmt_name(avctx->pix_fmt), av_get_pix_fmt_name(ctx->pix_fmt));
|
||||
first_field = 1;
|
||||
}
|
||||
|
||||
avctx->pix_fmt = ctx->pix_fmt;
|
||||
ret = ff_set_dimensions(avctx, ctx->width, ctx->height);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
@@ -329,6 +329,11 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
{
|
||||
DxaDecContext * const c = avctx->priv_data;
|
||||
|
||||
if (avctx->width%4 || avctx->height%4) {
|
||||
avpriv_request_sample(avctx, "dimensions are not a multiple of 4");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
c->prev = av_frame_alloc();
|
||||
if (!c->prev)
|
||||
return AVERROR(ENOMEM);
|
||||
|
@@ -736,8 +736,10 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data,
|
||||
}
|
||||
c->tile_width = bytestream2_get_be32(&bc);
|
||||
c->tile_height = bytestream2_get_be32(&bc);
|
||||
if (!c->tile_width || !c->tile_height ||
|
||||
((c->tile_width | c->tile_height) & 0xF)) {
|
||||
if (c->tile_width <= 0 || c->tile_height <= 0 ||
|
||||
((c->tile_width | c->tile_height) & 0xF) ||
|
||||
c->tile_width * 4LL * c->tile_height >= INT_MAX
|
||||
) {
|
||||
av_log(avctx, AV_LOG_ERROR,
|
||||
"Invalid tile dimensions %dx%d\n",
|
||||
c->tile_width, c->tile_height);
|
||||
|
@@ -271,26 +271,21 @@ static int gif_read_image(GifState *s, AVFrame *frame)
|
||||
case 1:
|
||||
y1 += 8;
|
||||
ptr += linesize * 8;
|
||||
if (y1 >= height) {
|
||||
y1 = pass ? 2 : 4;
|
||||
ptr = ptr1 + linesize * y1;
|
||||
pass++;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
y1 += 4;
|
||||
ptr += linesize * 4;
|
||||
if (y1 >= height) {
|
||||
y1 = 1;
|
||||
ptr = ptr1 + linesize;
|
||||
pass++;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
y1 += 2;
|
||||
ptr += linesize * 2;
|
||||
break;
|
||||
}
|
||||
while (y1 >= height) {
|
||||
y1 = 4 >> pass;
|
||||
ptr = ptr1 + linesize * y1;
|
||||
pass++;
|
||||
}
|
||||
} else {
|
||||
ptr += linesize;
|
||||
}
|
||||
|
@@ -336,6 +336,14 @@ static int decode_slice(MpegEncContext *s)
|
||||
s->padding_bug_score += 32;
|
||||
}
|
||||
|
||||
if (s->codec_id == AV_CODEC_ID_H263 &&
|
||||
(s->workaround_bugs & FF_BUG_AUTODETECT) &&
|
||||
get_bits_left(&s->gb) >= 64 &&
|
||||
AV_RB64(s->gb.buffer_end - 8) == 0xCDCDCDCDFC7F0000) {
|
||||
|
||||
s->padding_bug_score += 32;
|
||||
}
|
||||
|
||||
if (s->workaround_bugs & FF_BUG_AUTODETECT) {
|
||||
if (s->padding_bug_score > -2 && !s->data_partitioning)
|
||||
s->workaround_bugs |= FF_BUG_NO_PADDING;
|
||||
|
@@ -215,18 +215,18 @@ int ff_h264_check_intra_pred_mode(H264Context *h, int mode, int is_chroma)
|
||||
|
||||
if ((h->left_samples_available & 0x8080) != 0x8080) {
|
||||
mode = left[mode];
|
||||
if (is_chroma && (h->left_samples_available & 0x8080)) {
|
||||
// mad cow disease mode, aka MBAFF + constrained_intra_pred
|
||||
mode = ALZHEIMER_DC_L0T_PRED8x8 +
|
||||
(!(h->left_samples_available & 0x8000)) +
|
||||
2 * (mode == DC_128_PRED8x8);
|
||||
}
|
||||
if (mode < 0) {
|
||||
av_log(h->avctx, AV_LOG_ERROR,
|
||||
"left block unavailable for requested intra mode at %d %d\n",
|
||||
h->mb_x, h->mb_y);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
if (is_chroma && (h->left_samples_available & 0x8080)) {
|
||||
// mad cow disease mode, aka MBAFF + constrained_intra_pred
|
||||
mode = ALZHEIMER_DC_L0T_PRED8x8 +
|
||||
(!(h->left_samples_available & 0x8000)) +
|
||||
2 * (mode == DC_128_PRED8x8);
|
||||
}
|
||||
}
|
||||
|
||||
return mode;
|
||||
@@ -1330,43 +1330,6 @@ int ff_set_ref_count(H264Context *h)
|
||||
|
||||
static const uint8_t start_code[] = { 0x00, 0x00, 0x01 };
|
||||
|
||||
static int find_start_code(const uint8_t *buf, int buf_size,
|
||||
int buf_index, int next_avc)
|
||||
{
|
||||
// start code prefix search
|
||||
for (; buf_index + 3 < next_avc; buf_index++)
|
||||
// This should always succeed in the first iteration.
|
||||
if (buf[buf_index] == 0 &&
|
||||
buf[buf_index + 1] == 0 &&
|
||||
buf[buf_index + 2] == 1)
|
||||
break;
|
||||
|
||||
buf_index += 3;
|
||||
|
||||
if (buf_index >= buf_size)
|
||||
return buf_size;
|
||||
|
||||
return buf_index;
|
||||
}
|
||||
|
||||
static int get_avc_nalsize(H264Context *h, const uint8_t *buf,
|
||||
int buf_size, int *buf_index)
|
||||
{
|
||||
int i, nalsize = 0;
|
||||
|
||||
if (*buf_index >= buf_size - h->nal_length_size)
|
||||
return -1;
|
||||
|
||||
for (i = 0; i < h->nal_length_size; i++)
|
||||
nalsize = (nalsize << 8) | buf[(*buf_index)++];
|
||||
if (nalsize <= 0 || nalsize > buf_size - *buf_index) {
|
||||
av_log(h->avctx, AV_LOG_ERROR,
|
||||
"AVC: nal size %d\n", nalsize);
|
||||
return -1;
|
||||
}
|
||||
return nalsize;
|
||||
}
|
||||
|
||||
static int get_bit_length(H264Context *h, const uint8_t *buf,
|
||||
const uint8_t *ptr, int dst_length,
|
||||
int i, int next_avc)
|
||||
|
@@ -36,6 +36,7 @@
|
||||
#include "h264dsp.h"
|
||||
#include "h264pred.h"
|
||||
#include "h264qpel.h"
|
||||
#include "internal.h" // for avpriv_find_start_code()
|
||||
#include "me_cmp.h"
|
||||
#include "mpegutils.h"
|
||||
#include "parser.h"
|
||||
@@ -1092,6 +1093,34 @@ static av_always_inline int get_dct8x8_allowed(H264Context *h)
|
||||
0x0001000100010001ULL));
|
||||
}
|
||||
|
||||
static inline int find_start_code(const uint8_t *buf, int buf_size,
|
||||
int buf_index, int next_avc)
|
||||
{
|
||||
uint32_t state = -1;
|
||||
|
||||
buf_index = avpriv_find_start_code(buf + buf_index, buf + next_avc + 1, &state) - buf - 1;
|
||||
|
||||
return FFMIN(buf_index, buf_size);
|
||||
}
|
||||
|
||||
static inline int get_avc_nalsize(H264Context *h, const uint8_t *buf,
|
||||
int buf_size, int *buf_index)
|
||||
{
|
||||
int i, nalsize = 0;
|
||||
|
||||
if (*buf_index >= buf_size - h->nal_length_size)
|
||||
return -1;
|
||||
|
||||
for (i = 0; i < h->nal_length_size; i++)
|
||||
nalsize = ((unsigned)nalsize << 8) | buf[(*buf_index)++];
|
||||
if (nalsize <= 0 || nalsize > buf_size - *buf_index) {
|
||||
av_log(h->avctx, AV_LOG_ERROR,
|
||||
"AVC: nal size %d\n", nalsize);
|
||||
return -1;
|
||||
}
|
||||
return nalsize;
|
||||
}
|
||||
|
||||
int ff_h264_field_end(H264Context *h, int in_setup);
|
||||
|
||||
int ff_h264_ref_picture(H264Context *h, H264Picture *dst, H264Picture *src);
|
||||
|
@@ -202,10 +202,10 @@ static int scan_mmco_reset(AVCodecParserContext *s)
|
||||
*/
|
||||
static inline int parse_nal_units(AVCodecParserContext *s,
|
||||
AVCodecContext *avctx,
|
||||
const uint8_t *buf, int buf_size)
|
||||
const uint8_t * const buf, int buf_size)
|
||||
{
|
||||
H264Context *h = s->priv_data;
|
||||
const uint8_t *buf_end = buf + buf_size;
|
||||
int buf_index, next_avc;
|
||||
unsigned int pps_id;
|
||||
unsigned int slice_type;
|
||||
int state = -1, got_reset = 0;
|
||||
@@ -225,26 +225,26 @@ static inline int parse_nal_units(AVCodecParserContext *s,
|
||||
if (!buf_size)
|
||||
return 0;
|
||||
|
||||
buf_index = 0;
|
||||
next_avc = h->is_avc ? 0 : buf_size;
|
||||
for (;;) {
|
||||
int src_length, dst_length, consumed, nalsize = 0;
|
||||
if (h->is_avc) {
|
||||
int i;
|
||||
if (h->nal_length_size >= buf_end - buf) break;
|
||||
nalsize = 0;
|
||||
for (i = 0; i < h->nal_length_size; i++)
|
||||
nalsize = (nalsize << 8) | *buf++;
|
||||
if (nalsize <= 0 || nalsize > buf_end - buf) {
|
||||
av_log(h->avctx, AV_LOG_ERROR, "AVC: nal size %d\n", nalsize);
|
||||
|
||||
if (buf_index >= next_avc) {
|
||||
nalsize = get_avc_nalsize(h, buf, buf_size, &buf_index);
|
||||
if (nalsize < 0)
|
||||
break;
|
||||
}
|
||||
src_length = nalsize;
|
||||
next_avc = buf_index + nalsize;
|
||||
} else {
|
||||
buf = avpriv_find_start_code(buf, buf_end, &state);
|
||||
if (buf >= buf_end)
|
||||
break;
|
||||
--buf;
|
||||
src_length = buf_end - buf;
|
||||
buf_index = find_start_code(buf, buf_size, buf_index, next_avc);
|
||||
if (buf_index >= buf_size)
|
||||
break;
|
||||
if (buf_index >= next_avc)
|
||||
continue;
|
||||
}
|
||||
src_length = next_avc - buf_index;
|
||||
|
||||
state = buf[buf_index];
|
||||
switch (state & 0x1f) {
|
||||
case NAL_SLICE:
|
||||
case NAL_IDR_SLICE:
|
||||
@@ -261,10 +261,13 @@ static inline int parse_nal_units(AVCodecParserContext *s,
|
||||
}
|
||||
break;
|
||||
}
|
||||
ptr = ff_h264_decode_nal(h, buf, &dst_length, &consumed, src_length);
|
||||
ptr = ff_h264_decode_nal(h, buf + buf_index, &dst_length,
|
||||
&consumed, src_length);
|
||||
if (!ptr || dst_length < 0)
|
||||
break;
|
||||
|
||||
buf_index += consumed;
|
||||
|
||||
init_get_bits(&h->gb, ptr, 8 * dst_length);
|
||||
switch (h->nal_unit_type) {
|
||||
case NAL_SPS:
|
||||
@@ -439,7 +442,6 @@ static inline int parse_nal_units(AVCodecParserContext *s,
|
||||
|
||||
return 0; /* no need to evaluate the rest */
|
||||
}
|
||||
buf += h->is_avc ? nalsize : consumed;
|
||||
}
|
||||
if (q264)
|
||||
return 0;
|
||||
|
@@ -585,6 +585,17 @@ int ff_h264_update_thread_context(AVCodecContext *dst,
|
||||
h->mb_type_pool = NULL;
|
||||
h->ref_index_pool = NULL;
|
||||
h->motion_val_pool = NULL;
|
||||
h->intra4x4_pred_mode= NULL;
|
||||
h->non_zero_count = NULL;
|
||||
h->slice_table_base = NULL;
|
||||
h->slice_table = NULL;
|
||||
h->cbp_table = NULL;
|
||||
h->chroma_pred_mode_table = NULL;
|
||||
memset(h->mvd_table, 0, sizeof(h->mvd_table));
|
||||
h->direct_table = NULL;
|
||||
h->list_counts = NULL;
|
||||
h->mb2b_xy = NULL;
|
||||
h->mb2br_xy = NULL;
|
||||
for (i = 0; i < 2; i++) {
|
||||
h->rbsp_buffer[i] = NULL;
|
||||
h->rbsp_buffer_size[i] = 0;
|
||||
@@ -1025,76 +1036,79 @@ static int clone_slice(H264Context *dst, H264Context *src)
|
||||
|
||||
static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback)
|
||||
{
|
||||
enum AVPixelFormat pix_fmts[2];
|
||||
const enum AVPixelFormat *choices = pix_fmts;
|
||||
int i;
|
||||
|
||||
pix_fmts[1] = AV_PIX_FMT_NONE;
|
||||
|
||||
switch (h->sps.bit_depth_luma) {
|
||||
case 9:
|
||||
if (CHROMA444(h)) {
|
||||
if (h->avctx->colorspace == AVCOL_SPC_RGB) {
|
||||
return AV_PIX_FMT_GBRP9;
|
||||
pix_fmts[0] = AV_PIX_FMT_GBRP9;
|
||||
} else
|
||||
return AV_PIX_FMT_YUV444P9;
|
||||
pix_fmts[0] = AV_PIX_FMT_YUV444P9;
|
||||
} else if (CHROMA422(h))
|
||||
return AV_PIX_FMT_YUV422P9;
|
||||
pix_fmts[0] = AV_PIX_FMT_YUV422P9;
|
||||
else
|
||||
return AV_PIX_FMT_YUV420P9;
|
||||
pix_fmts[0] = AV_PIX_FMT_YUV420P9;
|
||||
break;
|
||||
case 10:
|
||||
if (CHROMA444(h)) {
|
||||
if (h->avctx->colorspace == AVCOL_SPC_RGB) {
|
||||
return AV_PIX_FMT_GBRP10;
|
||||
pix_fmts[0] = AV_PIX_FMT_GBRP10;
|
||||
} else
|
||||
return AV_PIX_FMT_YUV444P10;
|
||||
pix_fmts[0] = AV_PIX_FMT_YUV444P10;
|
||||
} else if (CHROMA422(h))
|
||||
return AV_PIX_FMT_YUV422P10;
|
||||
pix_fmts[0] = AV_PIX_FMT_YUV422P10;
|
||||
else
|
||||
return AV_PIX_FMT_YUV420P10;
|
||||
pix_fmts[0] = AV_PIX_FMT_YUV420P10;
|
||||
break;
|
||||
case 12:
|
||||
if (CHROMA444(h)) {
|
||||
if (h->avctx->colorspace == AVCOL_SPC_RGB) {
|
||||
return AV_PIX_FMT_GBRP12;
|
||||
pix_fmts[0] = AV_PIX_FMT_GBRP12;
|
||||
} else
|
||||
return AV_PIX_FMT_YUV444P12;
|
||||
pix_fmts[0] = AV_PIX_FMT_YUV444P12;
|
||||
} else if (CHROMA422(h))
|
||||
return AV_PIX_FMT_YUV422P12;
|
||||
pix_fmts[0] = AV_PIX_FMT_YUV422P12;
|
||||
else
|
||||
return AV_PIX_FMT_YUV420P12;
|
||||
pix_fmts[0] = AV_PIX_FMT_YUV420P12;
|
||||
break;
|
||||
case 14:
|
||||
if (CHROMA444(h)) {
|
||||
if (h->avctx->colorspace == AVCOL_SPC_RGB) {
|
||||
return AV_PIX_FMT_GBRP14;
|
||||
pix_fmts[0] = AV_PIX_FMT_GBRP14;
|
||||
} else
|
||||
return AV_PIX_FMT_YUV444P14;
|
||||
pix_fmts[0] = AV_PIX_FMT_YUV444P14;
|
||||
} else if (CHROMA422(h))
|
||||
return AV_PIX_FMT_YUV422P14;
|
||||
pix_fmts[0] = AV_PIX_FMT_YUV422P14;
|
||||
else
|
||||
return AV_PIX_FMT_YUV420P14;
|
||||
pix_fmts[0] = AV_PIX_FMT_YUV420P14;
|
||||
break;
|
||||
case 8:
|
||||
if (CHROMA444(h)) {
|
||||
if (h->avctx->colorspace == AVCOL_SPC_RGB) {
|
||||
av_log(h->avctx, AV_LOG_DEBUG, "Detected GBR colorspace.\n");
|
||||
return AV_PIX_FMT_GBR24P;
|
||||
} else if (h->avctx->colorspace == AVCOL_SPC_YCGCO) {
|
||||
if (h->avctx->colorspace == AVCOL_SPC_YCGCO)
|
||||
av_log(h->avctx, AV_LOG_WARNING, "Detected unsupported YCgCo colorspace.\n");
|
||||
}
|
||||
return h->avctx->color_range == AVCOL_RANGE_JPEG ? AV_PIX_FMT_YUVJ444P
|
||||
: AV_PIX_FMT_YUV444P;
|
||||
if (h->avctx->colorspace == AVCOL_SPC_RGB)
|
||||
pix_fmts[0] = AV_PIX_FMT_GBRP;
|
||||
else if (h->avctx->color_range == AVCOL_RANGE_JPEG)
|
||||
pix_fmts[0] = AV_PIX_FMT_YUVJ444P;
|
||||
else
|
||||
pix_fmts[0] = AV_PIX_FMT_YUV444P;
|
||||
} else if (CHROMA422(h)) {
|
||||
return h->avctx->color_range == AVCOL_RANGE_JPEG ? AV_PIX_FMT_YUVJ422P
|
||||
: AV_PIX_FMT_YUV422P;
|
||||
if (h->avctx->color_range == AVCOL_RANGE_JPEG)
|
||||
pix_fmts[0] = AV_PIX_FMT_YUVJ422P;
|
||||
else
|
||||
pix_fmts[0] = AV_PIX_FMT_YUV422P;
|
||||
} else {
|
||||
int i;
|
||||
const enum AVPixelFormat * fmt = h->avctx->codec->pix_fmts ?
|
||||
h->avctx->codec->pix_fmts :
|
||||
h->avctx->color_range == AVCOL_RANGE_JPEG ?
|
||||
h264_hwaccel_pixfmt_list_jpeg_420 :
|
||||
h264_hwaccel_pixfmt_list_420;
|
||||
|
||||
for (i=0; fmt[i] != AV_PIX_FMT_NONE; i++)
|
||||
if (fmt[i] == h->avctx->pix_fmt && !force_callback)
|
||||
return fmt[i];
|
||||
return ff_thread_get_format(h->avctx, fmt);
|
||||
if (h->avctx->codec->pix_fmts)
|
||||
choices = h->avctx->codec->pix_fmts;
|
||||
else if (h->avctx->color_range == AVCOL_RANGE_JPEG)
|
||||
choices = h264_hwaccel_pixfmt_list_jpeg_420;
|
||||
else
|
||||
choices = h264_hwaccel_pixfmt_list_420;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -1102,6 +1116,11 @@ static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback)
|
||||
"Unsupported bit depth %d\n", h->sps.bit_depth_luma);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
for (i=0; choices[i] != AV_PIX_FMT_NONE; i++)
|
||||
if (choices[i] == h->avctx->pix_fmt && !force_callback)
|
||||
return choices[i];
|
||||
return ff_thread_get_format(h->avctx, choices);
|
||||
}
|
||||
|
||||
/* export coded and cropped frame dimensions to AVCodecContext */
|
||||
|
@@ -981,7 +981,7 @@ static int hls_transform_unit(HEVCContext *s, int x0, int y0,
|
||||
for (i = 0; i < (size * size); i++) {
|
||||
coeffs[i] = ((lc->tu.res_scale_val * coeffs_y[i]) >> 3);
|
||||
}
|
||||
s->hevcdsp.transform_add[log2_trafo_size-2](dst, coeffs, stride);
|
||||
s->hevcdsp.transform_add[log2_trafo_size_c-2](dst, coeffs, stride);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1010,7 +1010,7 @@ static int hls_transform_unit(HEVCContext *s, int x0, int y0,
|
||||
for (i = 0; i < (size * size); i++) {
|
||||
coeffs[i] = ((lc->tu.res_scale_val * coeffs_y[i]) >> 3);
|
||||
}
|
||||
s->hevcdsp.transform_add[log2_trafo_size-2](dst, coeffs, stride);
|
||||
s->hevcdsp.transform_add[log2_trafo_size_c-2](dst, coeffs, stride);
|
||||
}
|
||||
}
|
||||
} else if (blk_idx == 3) {
|
||||
|
@@ -227,8 +227,10 @@ static int temporal_luma_motion_vector(HEVCContext *s, int x0, int y0,
|
||||
|
||||
HEVCFrame *ref = s->ref->collocated_ref;
|
||||
|
||||
if (!ref)
|
||||
if (!ref) {
|
||||
memset(mvLXCol, 0, sizeof(*mvLXCol));
|
||||
return 0;
|
||||
}
|
||||
|
||||
tab_mvf = ref->tab_mvf;
|
||||
colPic = ref->poc;
|
||||
@@ -415,14 +417,10 @@ static void derive_spatial_merge_candidates(HEVCContext *s, int x0, int y0,
|
||||
|
||||
if (available_l0 || available_l1) {
|
||||
mergecandlist[nb_merge_cand].pred_flag = available_l0 + (available_l1 << 1);
|
||||
if (available_l0) {
|
||||
mergecandlist[nb_merge_cand].mv[0] = mv_l0_col;
|
||||
mergecandlist[nb_merge_cand].ref_idx[0] = 0;
|
||||
}
|
||||
if (available_l1) {
|
||||
mergecandlist[nb_merge_cand].mv[1] = mv_l1_col;
|
||||
mergecandlist[nb_merge_cand].ref_idx[1] = 0;
|
||||
}
|
||||
AV_ZERO16(mergecandlist[nb_merge_cand].ref_idx);
|
||||
mergecandlist[nb_merge_cand].mv[0] = mv_l0_col;
|
||||
mergecandlist[nb_merge_cand].mv[1] = mv_l1_col;
|
||||
|
||||
if (merge_idx == nb_merge_cand)
|
||||
return;
|
||||
nb_merge_cand++;
|
||||
|
@@ -525,7 +525,11 @@ static void decode_vui(HEVCContext *s, HEVCSPS *sps)
|
||||
vui->field_seq_flag = get_bits1(gb);
|
||||
vui->frame_field_info_present_flag = get_bits1(gb);
|
||||
|
||||
vui->default_display_window_flag = get_bits1(gb);
|
||||
if (get_bits_left(gb) >= 68 && show_bits_long(gb, 21) == 0x100000) {
|
||||
vui->default_display_window_flag = 0;
|
||||
av_log(s->avctx, AV_LOG_WARNING, "Invalid default display window\n");
|
||||
} else
|
||||
vui->default_display_window_flag = get_bits1(gb);
|
||||
// Backup context in case an alternate header is detected
|
||||
memcpy(&backup, gb, sizeof(backup));
|
||||
|
||||
|
@@ -887,14 +887,14 @@ static int imc_decode_block(AVCodecContext *avctx, IMCContext *q, int ch)
|
||||
|
||||
flag = get_bits1(&q->gb);
|
||||
if (stream_format_code & 0x1)
|
||||
imc_decode_level_coefficients_raw(q, chctx->levlCoeffBuf,
|
||||
chctx->flcoeffs1, chctx->flcoeffs2);
|
||||
else if (stream_format_code & 0x1)
|
||||
imc_read_level_coeffs_raw(q, stream_format_code, chctx->levlCoeffBuf);
|
||||
else
|
||||
imc_read_level_coeffs(q, stream_format_code, chctx->levlCoeffBuf);
|
||||
|
||||
if (stream_format_code & 0x4)
|
||||
if (stream_format_code & 0x1)
|
||||
imc_decode_level_coefficients_raw(q, chctx->levlCoeffBuf,
|
||||
chctx->flcoeffs1, chctx->flcoeffs2);
|
||||
else if (stream_format_code & 0x4)
|
||||
imc_decode_level_coefficients(q, chctx->levlCoeffBuf,
|
||||
chctx->flcoeffs1, chctx->flcoeffs2);
|
||||
else
|
||||
|
@@ -269,6 +269,11 @@ static inline void ls_decode_line(JLSState *state, MJpegDecodeContext *s,
|
||||
x += stride;
|
||||
}
|
||||
|
||||
if (x >= w) {
|
||||
av_log(NULL, AV_LOG_ERROR, "run overflow\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* decode run termination value */
|
||||
Rb = R(last, x);
|
||||
RItype = (FFABS(Ra - Rb) <= state->near) ? 1 : 0;
|
||||
|
@@ -96,8 +96,7 @@ static int ilbc_decode_frame(AVCodecContext *avctx, void *data,
|
||||
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
|
||||
return ret;
|
||||
|
||||
WebRtcIlbcfix_DecodeImpl((WebRtc_Word16*) frame->data[0],
|
||||
(const WebRtc_UWord16*) buf, &s->decoder, 1);
|
||||
WebRtcIlbcfix_DecodeImpl((int16_t *) frame->data[0], (const uint16_t *) buf, &s->decoder, 1);
|
||||
|
||||
*got_frame_ptr = 1;
|
||||
|
||||
@@ -170,7 +169,7 @@ static int ilbc_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
|
||||
if ((ret = ff_alloc_packet2(avctx, avpkt, 50)) < 0)
|
||||
return ret;
|
||||
|
||||
WebRtcIlbcfix_EncodeImpl((WebRtc_UWord16*) avpkt->data, (const WebRtc_Word16*) frame->data[0], &s->encoder);
|
||||
WebRtcIlbcfix_EncodeImpl((uint16_t *) avpkt->data, (const int16_t *) frame->data[0], &s->encoder);
|
||||
|
||||
avpkt->size = s->encoder.no_of_bytes;
|
||||
*got_packet_ptr = 1;
|
||||
|
@@ -244,7 +244,7 @@ int ff_mjpeg_decode_dht(MJpegDecodeContext *s)
|
||||
|
||||
int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
|
||||
{
|
||||
int len, nb_components, i, width, height, pix_fmt_id, ret;
|
||||
int len, nb_components, i, width, height, bits, pix_fmt_id, ret;
|
||||
int h_count[MAX_COMPONENTS];
|
||||
int v_count[MAX_COMPONENTS];
|
||||
|
||||
@@ -254,11 +254,11 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
|
||||
/* XXX: verify len field validity */
|
||||
len = get_bits(&s->gb, 16);
|
||||
s->avctx->bits_per_raw_sample =
|
||||
s->bits = get_bits(&s->gb, 8);
|
||||
bits = get_bits(&s->gb, 8);
|
||||
|
||||
if (s->pegasus_rct)
|
||||
s->bits = 9;
|
||||
if (s->bits == 9 && !s->pegasus_rct)
|
||||
bits = 9;
|
||||
if (bits == 9 && !s->pegasus_rct)
|
||||
s->rct = 1; // FIXME ugly
|
||||
|
||||
if(s->lossless && s->avctx->lowres){
|
||||
@@ -291,7 +291,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
}
|
||||
if (s->ls && !(s->bits <= 8 || nb_components == 1)) {
|
||||
if (s->ls && !(bits <= 8 || nb_components == 1)) {
|
||||
avpriv_report_missing_feature(s->avctx,
|
||||
"JPEG-LS that is not <= 8 "
|
||||
"bits/component or 16-bit gray");
|
||||
@@ -337,11 +337,13 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
|
||||
|
||||
/* if different size, realloc/alloc picture */
|
||||
if ( width != s->width || height != s->height
|
||||
|| bits != s->bits
|
||||
|| memcmp(s->h_count, h_count, sizeof(h_count))
|
||||
|| memcmp(s->v_count, v_count, sizeof(v_count))) {
|
||||
|
||||
s->width = width;
|
||||
s->height = height;
|
||||
s->bits = bits;
|
||||
memcpy(s->h_count, h_count, sizeof(h_count));
|
||||
memcpy(s->v_count, v_count, sizeof(v_count));
|
||||
s->interlaced = 0;
|
||||
|
@@ -241,7 +241,7 @@ AVCodec ff_amv_encoder = {
|
||||
.encode2 = amv_encode_picture,
|
||||
.close = ff_mpv_encode_end,
|
||||
.pix_fmts = (const enum AVPixelFormat[]){
|
||||
AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_NONE
|
||||
AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_NONE
|
||||
},
|
||||
};
|
||||
#endif
|
||||
|
@@ -109,7 +109,7 @@ static int mm_decode_intra(MmContext * s, int half_horiz, int half_vert)
|
||||
|
||||
if (color) {
|
||||
memset(s->frame->data[0] + y*s->frame->linesize[0] + x, color, run_length);
|
||||
if (half_vert)
|
||||
if (half_vert && y + half_vert < s->avctx->height)
|
||||
memset(s->frame->data[0] + (y+1)*s->frame->linesize[0] + x, color, run_length);
|
||||
}
|
||||
x+= run_length;
|
||||
|
@@ -1209,6 +1209,16 @@ static const enum AVPixelFormat mpeg2_hwaccel_pixfmt_list_420[] = {
|
||||
AV_PIX_FMT_NONE
|
||||
};
|
||||
|
||||
static const enum AVPixelFormat mpeg12_pixfmt_list_422[] = {
|
||||
AV_PIX_FMT_YUV422P,
|
||||
AV_PIX_FMT_NONE
|
||||
};
|
||||
|
||||
static const enum AVPixelFormat mpeg12_pixfmt_list_444[] = {
|
||||
AV_PIX_FMT_YUV444P,
|
||||
AV_PIX_FMT_NONE
|
||||
};
|
||||
|
||||
static inline int uses_vdpau(AVCodecContext *avctx) {
|
||||
return avctx->pix_fmt == AV_PIX_FMT_VDPAU_MPEG1 || avctx->pix_fmt == AV_PIX_FMT_VDPAU_MPEG2;
|
||||
}
|
||||
@@ -1217,16 +1227,18 @@ static enum AVPixelFormat mpeg_get_pixelformat(AVCodecContext *avctx)
|
||||
{
|
||||
Mpeg1Context *s1 = avctx->priv_data;
|
||||
MpegEncContext *s = &s1->mpeg_enc_ctx;
|
||||
const enum AVPixelFormat *pix_fmts;
|
||||
|
||||
if (s->chroma_format < 2)
|
||||
return ff_thread_get_format(avctx,
|
||||
avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO ?
|
||||
pix_fmts = avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO ?
|
||||
mpeg1_hwaccel_pixfmt_list_420 :
|
||||
mpeg2_hwaccel_pixfmt_list_420);
|
||||
mpeg2_hwaccel_pixfmt_list_420;
|
||||
else if (s->chroma_format == 2)
|
||||
return AV_PIX_FMT_YUV422P;
|
||||
pix_fmts = mpeg12_pixfmt_list_422;
|
||||
else
|
||||
return AV_PIX_FMT_YUV444P;
|
||||
pix_fmts = mpeg12_pixfmt_list_444;
|
||||
|
||||
return ff_thread_get_format(avctx, pix_fmts);
|
||||
}
|
||||
|
||||
static void setup_hwaccel_for_pixfmt(AVCodecContext *avctx)
|
||||
|
@@ -2793,7 +2793,7 @@ AVCodec ff_mpeg4_vdpau_decoder = {
|
||||
.long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 (VDPAU)"),
|
||||
.type = AVMEDIA_TYPE_VIDEO,
|
||||
.id = AV_CODEC_ID_MPEG4,
|
||||
.priv_data_size = sizeof(MpegEncContext),
|
||||
.priv_data_size = sizeof(Mpeg4DecContext),
|
||||
.init = decode_init,
|
||||
.close = ff_h263_decode_end,
|
||||
.decode = ff_h263_decode_frame,
|
||||
|
@@ -908,6 +908,11 @@ static av_cold int on2avc_decode_init(AVCodecContext *avctx)
|
||||
On2AVCContext *c = avctx->priv_data;
|
||||
int i;
|
||||
|
||||
if (avctx->channels > 2U) {
|
||||
avpriv_request_sample(avctx, "Decoding more than 2 channels");
|
||||
return AVERROR_PATCHWELCOME;
|
||||
}
|
||||
|
||||
c->avctx = avctx;
|
||||
avctx->sample_fmt = AV_SAMPLE_FMT_FLTP;
|
||||
avctx->channel_layout = (avctx->channels == 2) ? AV_CH_LAYOUT_STEREO
|
||||
|
@@ -650,7 +650,7 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
} else if ((s->bits_per_pixel == 1 || s->bits_per_pixel == 2 || s->bits_per_pixel == 4 || s->bits_per_pixel == 8) &&
|
||||
s->color_type == PNG_COLOR_TYPE_PALETTE) {
|
||||
avctx->pix_fmt = AV_PIX_FMT_PAL8;
|
||||
} else if (s->bit_depth == 1) {
|
||||
} else if (s->bit_depth == 1 && s->bits_per_pixel == 1) {
|
||||
avctx->pix_fmt = AV_PIX_FMT_MONOBLACK;
|
||||
} else if (s->bit_depth == 8 &&
|
||||
s->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
|
||||
@@ -860,10 +860,11 @@ exit_loop:
|
||||
int i, j;
|
||||
uint8_t *pd = p->data[0];
|
||||
uint8_t *pd_last = s->last_picture.f->data[0];
|
||||
int ls = FFMIN(av_image_get_linesize(p->format, s->width, 0), s->width * s->bpp);
|
||||
|
||||
ff_thread_await_progress(&s->last_picture, INT_MAX, 0);
|
||||
for (j = 0; j < s->height; j++) {
|
||||
for (i = 0; i < s->width * s->bpp; i++)
|
||||
for (i = 0; i < ls; i++)
|
||||
pd[i] += pd_last[i];
|
||||
pd += s->image_linesize;
|
||||
pd_last += s->image_linesize;
|
||||
|
@@ -163,7 +163,7 @@ static void av_noinline qpeg_decode_inter(QpegContext *qctx, uint8_t *dst,
|
||||
|
||||
/* check motion vector */
|
||||
if ((me_x + filled < 0) || (me_x + me_w + filled > width) ||
|
||||
(height - me_y - me_h < 0) || (height - me_y > orig_height) ||
|
||||
(height - me_y - me_h < 0) || (height - me_y >= orig_height) ||
|
||||
(filled + me_w > width) || (height - me_h < 0))
|
||||
av_log(NULL, AV_LOG_ERROR, "Bogus motion vector (%i,%i), block size %ix%i at %i,%i\n",
|
||||
me_x, me_y, me_w, me_h, filled, height);
|
||||
|
@@ -98,7 +98,7 @@ static int expand_rle_row16(SgiState *s, uint16_t *out_buf,
|
||||
break;
|
||||
|
||||
/* Check for buffer overflow. */
|
||||
if (pixelstride * (count - 1) >= len) {
|
||||
if (out_end - out_buf <= pixelstride * (count - 1)) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "Invalid pixel count.\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
@@ -145,7 +145,7 @@ static int read_rle_sgi(uint8_t *out_buf, SgiState *s)
|
||||
for (z = 0; z < s->depth; z++) {
|
||||
dest_row = out_buf;
|
||||
for (y = 0; y < s->height; y++) {
|
||||
linesize = s->width * s->depth * s->bytes_per_channel;
|
||||
linesize = s->width * s->depth;
|
||||
dest_row -= s->linesize;
|
||||
start_offset = bytestream2_get_be32(&g_table);
|
||||
bytestream2_seek(&s->g, start_offset, SEEK_SET);
|
||||
|
@@ -70,7 +70,7 @@ typedef struct SmcContext {
|
||||
row_ptr += stride * 4; \
|
||||
} \
|
||||
total_blocks--; \
|
||||
if (total_blocks < 0) \
|
||||
if (total_blocks < 0 + !!n_blocks) \
|
||||
{ \
|
||||
av_log(s->avctx, AV_LOG_INFO, "warning: block counter just went negative (this should not happen)\n"); \
|
||||
return; \
|
||||
|
@@ -499,7 +499,7 @@ static int svq1_decode_delta_block(AVCodecContext *avctx, HpelDSPContext *hdsp,
|
||||
return result;
|
||||
}
|
||||
|
||||
static void svq1_parse_string(GetBitContext *bitbuf, uint8_t *out)
|
||||
static void svq1_parse_string(GetBitContext *bitbuf, uint8_t out[257])
|
||||
{
|
||||
uint8_t seed;
|
||||
int i;
|
||||
@@ -511,6 +511,7 @@ static void svq1_parse_string(GetBitContext *bitbuf, uint8_t *out)
|
||||
out[i] = get_bits(bitbuf, 8) ^ seed;
|
||||
seed = string_table[out[i] ^ seed];
|
||||
}
|
||||
out[i] = 0;
|
||||
}
|
||||
|
||||
static int svq1_decode_frame_header(AVCodecContext *avctx, AVFrame *frame)
|
||||
@@ -553,12 +554,12 @@ static int svq1_decode_frame_header(AVCodecContext *avctx, AVFrame *frame)
|
||||
}
|
||||
|
||||
if ((s->frame_code ^ 0x10) >= 0x50) {
|
||||
uint8_t msg[256];
|
||||
uint8_t msg[257];
|
||||
|
||||
svq1_parse_string(bitbuf, msg);
|
||||
|
||||
av_log(avctx, AV_LOG_INFO,
|
||||
"embedded message:\n%s\n", (char *)msg);
|
||||
"embedded message:\n%s\n", ((char *)msg) + 1);
|
||||
}
|
||||
|
||||
skip_bits(bitbuf, 2);
|
||||
|
@@ -1176,7 +1176,7 @@ static int svq3_decode_frame(AVCodecContext *avctx, void *data,
|
||||
|
||||
h->cur_pic_ptr = s->cur_pic;
|
||||
av_frame_unref(&h->cur_pic.f);
|
||||
h->cur_pic = *s->cur_pic;
|
||||
memcpy(&h->cur_pic.tf, &s->cur_pic->tf, sizeof(h->cur_pic) - offsetof(H264Picture, tf));
|
||||
ret = av_frame_ref(&h->cur_pic.f, &s->cur_pic->f);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
@@ -812,13 +812,13 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame)
|
||||
s->height = value;
|
||||
break;
|
||||
case TIFF_BPP:
|
||||
s->bppcount = count;
|
||||
if (count > 4) {
|
||||
if (count > 4U) {
|
||||
av_log(s->avctx, AV_LOG_ERROR,
|
||||
"This format is not supported (bpp=%d, %d components)\n",
|
||||
s->bpp, count);
|
||||
value, count);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
s->bppcount = count;
|
||||
if (count == 1)
|
||||
s->bpp = value;
|
||||
else {
|
||||
@@ -836,6 +836,13 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame)
|
||||
s->bpp = -1;
|
||||
}
|
||||
}
|
||||
if (s->bpp > 64U) {
|
||||
av_log(s->avctx, AV_LOG_ERROR,
|
||||
"This format is not supported (bpp=%d, %d components)\n",
|
||||
s->bpp, count);
|
||||
s->bpp = 0;
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
break;
|
||||
case TIFF_SAMPLES_PER_PIXEL:
|
||||
if (count != 1) {
|
||||
|
@@ -305,7 +305,9 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
|
||||
strips = (s->height - 1) / s->rps + 1;
|
||||
|
||||
packet_size = avctx->height * ((avctx->width * s->bpp + 7) >> 3) * 2 +
|
||||
bytes_per_row = (((s->width - 1) / s->subsampling[0] + 1) * s->bpp *
|
||||
s->subsampling[0] * s->subsampling[1] + 7) >> 3;
|
||||
packet_size = avctx->height * bytes_per_row * 2 +
|
||||
avctx->height * 4 + FF_MIN_BUFFER_SIZE;
|
||||
|
||||
if ((ret = ff_alloc_packet2(avctx, pkt, packet_size)) < 0)
|
||||
@@ -333,8 +335,6 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
goto fail;
|
||||
}
|
||||
|
||||
bytes_per_row = (((s->width - 1) / s->subsampling[0] + 1) * s->bpp *
|
||||
s->subsampling[0] * s->subsampling[1] + 7) >> 3;
|
||||
if (is_yuv) {
|
||||
av_fast_padded_malloc(&s->yuv_line, &s->yuv_line_size, bytes_per_row);
|
||||
if (s->yuv_line == NULL) {
|
||||
|
@@ -279,6 +279,12 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
|
||||
int i;
|
||||
int w_align = 1;
|
||||
int h_align = 1;
|
||||
AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->pix_fmt);
|
||||
|
||||
if (desc) {
|
||||
w_align = 1 << desc->log2_chroma_w;
|
||||
h_align = 1 << desc->log2_chroma_h;
|
||||
}
|
||||
|
||||
switch (s->pix_fmt) {
|
||||
case AV_PIX_FMT_YUV420P:
|
||||
@@ -387,6 +393,10 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
|
||||
w_align = 4;
|
||||
h_align = 4;
|
||||
}
|
||||
if (s->codec_id == AV_CODEC_ID_JV) {
|
||||
w_align = 8;
|
||||
h_align = 8;
|
||||
}
|
||||
break;
|
||||
case AV_PIX_FMT_BGR24:
|
||||
if ((s->codec_id == AV_CODEC_ID_MSZH) ||
|
||||
@@ -402,8 +412,6 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
|
||||
}
|
||||
break;
|
||||
default:
|
||||
w_align = 1;
|
||||
h_align = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@@ -389,7 +389,7 @@ static int write_huff_codes(uint8_t *src, uint8_t *dst, int dst_size,
|
||||
}
|
||||
|
||||
static int encode_plane(AVCodecContext *avctx, uint8_t *src,
|
||||
uint8_t *dst, int stride,
|
||||
uint8_t *dst, int stride, int plane_no,
|
||||
int width, int height, PutByteContext *pb)
|
||||
{
|
||||
UtvideoContext *c = avctx->priv_data;
|
||||
@@ -399,6 +399,7 @@ static int encode_plane(AVCodecContext *avctx, uint8_t *src,
|
||||
HuffEntry he[256];
|
||||
|
||||
uint32_t offset = 0, slice_len = 0;
|
||||
const int cmask = ~(!plane_no && avctx->pix_fmt == AV_PIX_FMT_YUV420P);
|
||||
int i, sstart, send = 0;
|
||||
int symbol;
|
||||
int ret;
|
||||
@@ -408,7 +409,7 @@ static int encode_plane(AVCodecContext *avctx, uint8_t *src,
|
||||
case PRED_NONE:
|
||||
for (i = 0; i < c->slices; i++) {
|
||||
sstart = send;
|
||||
send = height * (i + 1) / c->slices;
|
||||
send = height * (i + 1) / c->slices & cmask;
|
||||
av_image_copy_plane(dst + sstart * width, width,
|
||||
src + sstart * stride, stride,
|
||||
width, send - sstart);
|
||||
@@ -417,7 +418,7 @@ static int encode_plane(AVCodecContext *avctx, uint8_t *src,
|
||||
case PRED_LEFT:
|
||||
for (i = 0; i < c->slices; i++) {
|
||||
sstart = send;
|
||||
send = height * (i + 1) / c->slices;
|
||||
send = height * (i + 1) / c->slices & cmask;
|
||||
left_predict(src + sstart * stride, dst + sstart * width,
|
||||
stride, width, send - sstart);
|
||||
}
|
||||
@@ -425,7 +426,7 @@ static int encode_plane(AVCodecContext *avctx, uint8_t *src,
|
||||
case PRED_MEDIAN:
|
||||
for (i = 0; i < c->slices; i++) {
|
||||
sstart = send;
|
||||
send = height * (i + 1) / c->slices;
|
||||
send = height * (i + 1) / c->slices & cmask;
|
||||
median_predict(c, src + sstart * stride, dst + sstart * width,
|
||||
stride, width, send - sstart);
|
||||
}
|
||||
@@ -489,7 +490,7 @@ static int encode_plane(AVCodecContext *avctx, uint8_t *src,
|
||||
send = 0;
|
||||
for (i = 0; i < c->slices; i++) {
|
||||
sstart = send;
|
||||
send = height * (i + 1) / c->slices;
|
||||
send = height * (i + 1) / c->slices & cmask;
|
||||
|
||||
/*
|
||||
* Write the huffman codes to a buffer,
|
||||
@@ -571,7 +572,7 @@ static int utvideo_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
case AV_PIX_FMT_RGBA:
|
||||
for (i = 0; i < c->planes; i++) {
|
||||
ret = encode_plane(avctx, c->slice_buffer[i] + 2 * c->slice_stride,
|
||||
c->slice_buffer[i], c->slice_stride,
|
||||
c->slice_buffer[i], c->slice_stride, i,
|
||||
width, height, &pb);
|
||||
|
||||
if (ret) {
|
||||
@@ -583,7 +584,7 @@ static int utvideo_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
case AV_PIX_FMT_YUV422P:
|
||||
for (i = 0; i < c->planes; i++) {
|
||||
ret = encode_plane(avctx, pic->data[i], c->slice_buffer[0],
|
||||
pic->linesize[i], width >> !!i, height, &pb);
|
||||
pic->linesize[i], i, width >> !!i, height, &pb);
|
||||
|
||||
if (ret) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Error encoding plane %d.\n", i);
|
||||
@@ -594,7 +595,7 @@ static int utvideo_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
case AV_PIX_FMT_YUV420P:
|
||||
for (i = 0; i < c->planes; i++) {
|
||||
ret = encode_plane(avctx, pic->data[i], c->slice_buffer[0],
|
||||
pic->linesize[i], width >> !!i, height >> !!i,
|
||||
pic->linesize[i], i, width >> !!i, height >> !!i,
|
||||
&pb);
|
||||
|
||||
if (ret) {
|
||||
|
@@ -1314,7 +1314,9 @@ static av_always_inline int setup_classifs(vorbis_context *vc,
|
||||
vorbis_residue *vr,
|
||||
uint8_t *do_not_decode,
|
||||
unsigned ch_used,
|
||||
int partition_count)
|
||||
int partition_count,
|
||||
int ptns_to_read
|
||||
)
|
||||
{
|
||||
int p, j, i;
|
||||
unsigned c_p_c = vc->codebooks[vr->classbook].dimensions;
|
||||
@@ -1336,7 +1338,7 @@ static av_always_inline int setup_classifs(vorbis_context *vc,
|
||||
for (i = partition_count + c_p_c - 1; i >= partition_count; i--) {
|
||||
temp2 = (((uint64_t)temp) * inverse_class) >> 32;
|
||||
|
||||
if (i < vr->ptns_to_read)
|
||||
if (i < ptns_to_read)
|
||||
vr->classifs[p + i] = temp - temp2 * vr->classifications;
|
||||
temp = temp2;
|
||||
}
|
||||
@@ -1344,13 +1346,13 @@ static av_always_inline int setup_classifs(vorbis_context *vc,
|
||||
for (i = partition_count + c_p_c - 1; i >= partition_count; i--) {
|
||||
temp2 = temp / vr->classifications;
|
||||
|
||||
if (i < vr->ptns_to_read)
|
||||
if (i < ptns_to_read)
|
||||
vr->classifs[p + i] = temp - temp2 * vr->classifications;
|
||||
temp = temp2;
|
||||
}
|
||||
}
|
||||
}
|
||||
p += vr->ptns_to_read;
|
||||
p += ptns_to_read;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -1404,7 +1406,7 @@ static av_always_inline int vorbis_residue_decode_internal(vorbis_context *vc,
|
||||
for (partition_count = 0; partition_count < ptns_to_read;) { // SPEC error
|
||||
if (!pass) {
|
||||
int ret;
|
||||
if ((ret = setup_classifs(vc, vr, do_not_decode, ch_used, partition_count)) < 0)
|
||||
if ((ret = setup_classifs(vc, vr, do_not_decode, ch_used, partition_count, ptns_to_read)) < 0)
|
||||
return ret;
|
||||
}
|
||||
for (i = 0; (i < c_p_c) && (partition_count < ptns_to_read); ++i) {
|
||||
|
@@ -1028,7 +1028,7 @@ static int apply_color_indexing_transform(WebPContext *s)
|
||||
ImageContext *img;
|
||||
ImageContext *pal;
|
||||
int i, x, y;
|
||||
uint8_t *p, *pi;
|
||||
uint8_t *p;
|
||||
|
||||
img = &s->image[IMAGE_ROLE_ARGB];
|
||||
pal = &s->image[IMAGE_ROLE_COLOR_INDEXING];
|
||||
@@ -1066,11 +1066,11 @@ static int apply_color_indexing_transform(WebPContext *s)
|
||||
p = GET_PIXEL(img->frame, x, y);
|
||||
i = p[2];
|
||||
if (i >= pal->frame->width) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "invalid palette index %d\n", i);
|
||||
return AVERROR_INVALIDDATA;
|
||||
AV_WB32(p, 0x00000000);
|
||||
} else {
|
||||
const uint8_t *pi = GET_PIXEL(pal->frame, i, 0);
|
||||
AV_COPY32(p, pi);
|
||||
}
|
||||
pi = GET_PIXEL(pal->frame, i, 0);
|
||||
AV_COPY32(p, pi);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -20,10 +20,10 @@
|
||||
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
;******************************************************************************
|
||||
|
||||
%if ARCH_X86_64
|
||||
|
||||
%include "libavutil/x86/x86util.asm"
|
||||
|
||||
%if ARCH_X86_64
|
||||
|
||||
SECTION_RODATA
|
||||
|
||||
cextern pb_3
|
||||
|
@@ -1,4 +1,4 @@
|
||||
LIBAVDEVICE_$MAJOR {
|
||||
global: avdevice_*;
|
||||
global: avdevice_*; av_*;
|
||||
local: *;
|
||||
};
|
||||
|
@@ -41,6 +41,7 @@ typedef struct ResampleContext {
|
||||
AVDictionary *options;
|
||||
|
||||
int64_t next_pts;
|
||||
int64_t next_in_pts;
|
||||
|
||||
/* set by filter_frame() to signal an output frame to request_frame() */
|
||||
int got_output;
|
||||
@@ -153,6 +154,7 @@ static int config_output(AVFilterLink *outlink)
|
||||
|
||||
outlink->time_base = (AVRational){ 1, outlink->sample_rate };
|
||||
s->next_pts = AV_NOPTS_VALUE;
|
||||
s->next_in_pts = AV_NOPTS_VALUE;
|
||||
|
||||
av_get_channel_layout_string(buf1, sizeof(buf1),
|
||||
-1, inlink ->channel_layout);
|
||||
@@ -254,7 +256,12 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
|
||||
}
|
||||
|
||||
out->sample_rate = outlink->sample_rate;
|
||||
if (in->pts != AV_NOPTS_VALUE) {
|
||||
/* Only convert in->pts if there is a discontinuous jump.
|
||||
This ensures that out->pts tracks the number of samples actually
|
||||
output by the resampler in the absence of such a jump.
|
||||
Otherwise, the rounding in av_rescale_q() and av_rescale()
|
||||
causes off-by-1 errors. */
|
||||
if (in->pts != AV_NOPTS_VALUE && in->pts != s->next_in_pts) {
|
||||
out->pts = av_rescale_q(in->pts, inlink->time_base,
|
||||
outlink->time_base) -
|
||||
av_rescale(delay, outlink->sample_rate,
|
||||
@@ -263,6 +270,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
|
||||
out->pts = s->next_pts;
|
||||
|
||||
s->next_pts = out->pts + out->nb_samples;
|
||||
s->next_in_pts = in->pts + in->nb_samples;
|
||||
|
||||
ret = ff_filter_frame(outlink, out);
|
||||
s->got_output = 1;
|
||||
|
@@ -48,7 +48,7 @@ typedef struct {
|
||||
} MotionVector;
|
||||
|
||||
typedef struct {
|
||||
MotionVector vector; ///< Motion vector
|
||||
MotionVector vec; ///< Motion vector
|
||||
double angle; ///< Angle of rotation
|
||||
double zoom; ///< Zoom percentage
|
||||
} Transform;
|
||||
|
@@ -294,8 +294,8 @@ static void find_motion(DeshakeContext *deshake, uint8_t *src1, uint8_t *src2,
|
||||
for (x = 0; x < deshake->rx * 2 + 1; x++) {
|
||||
//av_log(NULL, AV_LOG_ERROR, "%5d ", deshake->counts[x][y]);
|
||||
if (deshake->counts[x][y] > count_max_value) {
|
||||
t->vector.x = x - deshake->rx;
|
||||
t->vector.y = y - deshake->ry;
|
||||
t->vec.x = x - deshake->rx;
|
||||
t->vec.y = y - deshake->ry;
|
||||
count_max_value = deshake->counts[x][y];
|
||||
}
|
||||
}
|
||||
@@ -304,12 +304,12 @@ static void find_motion(DeshakeContext *deshake, uint8_t *src1, uint8_t *src2,
|
||||
|
||||
p_x = (center_x - width / 2.0);
|
||||
p_y = (center_y - height / 2.0);
|
||||
t->vector.x += (cos(t->angle)-1)*p_x - sin(t->angle)*p_y;
|
||||
t->vector.y += sin(t->angle)*p_x + (cos(t->angle)-1)*p_y;
|
||||
t->vec.x += (cos(t->angle)-1)*p_x - sin(t->angle)*p_y;
|
||||
t->vec.y += sin(t->angle)*p_x + (cos(t->angle)-1)*p_y;
|
||||
|
||||
// Clamp max shift & rotation?
|
||||
t->vector.x = av_clipf(t->vector.x, -deshake->rx * 2, deshake->rx * 2);
|
||||
t->vector.y = av_clipf(t->vector.y, -deshake->ry * 2, deshake->ry * 2);
|
||||
t->vec.x = av_clipf(t->vec.x, -deshake->rx * 2, deshake->rx * 2);
|
||||
t->vec.y = av_clipf(t->vec.y, -deshake->ry * 2, deshake->ry * 2);
|
||||
t->angle = av_clipf(t->angle, -0.1, 0.1);
|
||||
|
||||
//av_log(NULL, AV_LOG_ERROR, "%d x %d\n", avg->x, avg->y);
|
||||
@@ -407,8 +407,8 @@ static int config_props(AVFilterLink *link)
|
||||
DeshakeContext *deshake = link->dst->priv;
|
||||
|
||||
deshake->ref = NULL;
|
||||
deshake->last.vector.x = 0;
|
||||
deshake->last.vector.y = 0;
|
||||
deshake->last.vec.x = 0;
|
||||
deshake->last.vec.y = 0;
|
||||
deshake->last.angle = 0;
|
||||
deshake->last.zoom = 0;
|
||||
|
||||
@@ -476,57 +476,57 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
|
||||
|
||||
|
||||
// Copy transform so we can output it later to compare to the smoothed value
|
||||
orig.vector.x = t.vector.x;
|
||||
orig.vector.y = t.vector.y;
|
||||
orig.vec.x = t.vec.x;
|
||||
orig.vec.y = t.vec.y;
|
||||
orig.angle = t.angle;
|
||||
orig.zoom = t.zoom;
|
||||
|
||||
// Generate a one-sided moving exponential average
|
||||
deshake->avg.vector.x = alpha * t.vector.x + (1.0 - alpha) * deshake->avg.vector.x;
|
||||
deshake->avg.vector.y = alpha * t.vector.y + (1.0 - alpha) * deshake->avg.vector.y;
|
||||
deshake->avg.vec.x = alpha * t.vec.x + (1.0 - alpha) * deshake->avg.vec.x;
|
||||
deshake->avg.vec.y = alpha * t.vec.y + (1.0 - alpha) * deshake->avg.vec.y;
|
||||
deshake->avg.angle = alpha * t.angle + (1.0 - alpha) * deshake->avg.angle;
|
||||
deshake->avg.zoom = alpha * t.zoom + (1.0 - alpha) * deshake->avg.zoom;
|
||||
|
||||
// Remove the average from the current motion to detect the motion that
|
||||
// is not on purpose, just as jitter from bumping the camera
|
||||
t.vector.x -= deshake->avg.vector.x;
|
||||
t.vector.y -= deshake->avg.vector.y;
|
||||
t.vec.x -= deshake->avg.vec.x;
|
||||
t.vec.y -= deshake->avg.vec.y;
|
||||
t.angle -= deshake->avg.angle;
|
||||
t.zoom -= deshake->avg.zoom;
|
||||
|
||||
// Invert the motion to undo it
|
||||
t.vector.x *= -1;
|
||||
t.vector.y *= -1;
|
||||
t.vec.x *= -1;
|
||||
t.vec.y *= -1;
|
||||
t.angle *= -1;
|
||||
|
||||
// Write statistics to file
|
||||
if (deshake->fp) {
|
||||
snprintf(tmp, 256, "%f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f\n", orig.vector.x, deshake->avg.vector.x, t.vector.x, orig.vector.y, deshake->avg.vector.y, t.vector.y, orig.angle, deshake->avg.angle, t.angle, orig.zoom, deshake->avg.zoom, t.zoom);
|
||||
snprintf(tmp, 256, "%f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f\n", orig.vec.x, deshake->avg.vec.x, t.vec.x, orig.vec.y, deshake->avg.vec.y, t.vec.y, orig.angle, deshake->avg.angle, t.angle, orig.zoom, deshake->avg.zoom, t.zoom);
|
||||
fwrite(tmp, sizeof(char), strlen(tmp), deshake->fp);
|
||||
}
|
||||
|
||||
// Turn relative current frame motion into absolute by adding it to the
|
||||
// last absolute motion
|
||||
t.vector.x += deshake->last.vector.x;
|
||||
t.vector.y += deshake->last.vector.y;
|
||||
t.vec.x += deshake->last.vec.x;
|
||||
t.vec.y += deshake->last.vec.y;
|
||||
t.angle += deshake->last.angle;
|
||||
t.zoom += deshake->last.zoom;
|
||||
|
||||
// Shrink motion by 10% to keep things centered in the camera frame
|
||||
t.vector.x *= 0.9;
|
||||
t.vector.y *= 0.9;
|
||||
t.vec.x *= 0.9;
|
||||
t.vec.y *= 0.9;
|
||||
t.angle *= 0.9;
|
||||
|
||||
// Store the last absolute motion information
|
||||
deshake->last.vector.x = t.vector.x;
|
||||
deshake->last.vector.y = t.vector.y;
|
||||
deshake->last.vec.x = t.vec.x;
|
||||
deshake->last.vec.y = t.vec.y;
|
||||
deshake->last.angle = t.angle;
|
||||
deshake->last.zoom = t.zoom;
|
||||
|
||||
// Generate a luma transformation matrix
|
||||
avfilter_get_matrix(t.vector.x, t.vector.y, t.angle, 1.0 + t.zoom / 100.0, matrix_y);
|
||||
avfilter_get_matrix(t.vec.x, t.vec.y, t.angle, 1.0 + t.zoom / 100.0, matrix_y);
|
||||
// Generate a chroma transformation matrix
|
||||
avfilter_get_matrix(t.vector.x / (link->w / CHROMA_WIDTH(link)), t.vector.y / (link->h / CHROMA_HEIGHT(link)), t.angle, 1.0 + t.zoom / 100.0, matrix_uv);
|
||||
avfilter_get_matrix(t.vec.x / (link->w / CHROMA_WIDTH(link)), t.vec.y / (link->h / CHROMA_HEIGHT(link)), t.angle, 1.0 + t.zoom / 100.0, matrix_uv);
|
||||
// Transform the luma and chroma planes
|
||||
ret = deshake->transform(link->dst, link->w, link->h, CHROMA_WIDTH(link), CHROMA_HEIGHT(link),
|
||||
matrix_y, matrix_uv, INTERPOLATE_BILINEAR, deshake->edge, in, out);
|
||||
|
@@ -716,6 +716,8 @@ static av_cold void uninit(AVFilterContext *ctx)
|
||||
#if FF_API_DRAWTEXT_OLD_TIMELINE
|
||||
av_expr_free(s->draw_pexpr);
|
||||
s->x_pexpr = s->y_pexpr = s->draw_pexpr = NULL;
|
||||
#else
|
||||
s->x_pexpr = s->y_pexpr = NULL;
|
||||
#endif
|
||||
av_freep(&s->positions);
|
||||
s->nb_positions = 0;
|
||||
|
@@ -557,10 +557,10 @@ static const AVOption scale_options[] = {
|
||||
{ "mpeg", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_RANGE_MPEG}, 0, 0, FLAGS, "range" },
|
||||
{ "tv", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_RANGE_MPEG}, 0, 0, FLAGS, "range" },
|
||||
{ "pc", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_RANGE_JPEG}, 0, 0, FLAGS, "range" },
|
||||
{ "in_v_chr_pos", "input vertical chroma position in luma grid/256" , OFFSET(in_v_chr_pos), AV_OPT_TYPE_INT, { .i64 = -1}, -1, 512, FLAGS },
|
||||
{ "in_h_chr_pos", "input horizontal chroma position in luma grid/256", OFFSET(in_h_chr_pos), AV_OPT_TYPE_INT, { .i64 = -1}, -1, 512, FLAGS },
|
||||
{ "out_v_chr_pos", "output vertical chroma position in luma grid/256" , OFFSET(out_v_chr_pos), AV_OPT_TYPE_INT, { .i64 = -1}, -1, 512, FLAGS },
|
||||
{ "out_h_chr_pos", "output horizontal chroma position in luma grid/256", OFFSET(out_h_chr_pos), AV_OPT_TYPE_INT, { .i64 = -1}, -1, 512, FLAGS },
|
||||
{ "in_v_chr_pos", "input vertical chroma position in luma grid/256" , OFFSET(in_v_chr_pos), AV_OPT_TYPE_INT, { .i64 = -513}, -513, 512, FLAGS },
|
||||
{ "in_h_chr_pos", "input horizontal chroma position in luma grid/256", OFFSET(in_h_chr_pos), AV_OPT_TYPE_INT, { .i64 = -513}, -513, 512, FLAGS },
|
||||
{ "out_v_chr_pos", "output vertical chroma position in luma grid/256" , OFFSET(out_v_chr_pos), AV_OPT_TYPE_INT, { .i64 = -513}, -513, 512, FLAGS },
|
||||
{ "out_h_chr_pos", "output horizontal chroma position in luma grid/256", OFFSET(out_h_chr_pos), AV_OPT_TYPE_INT, { .i64 = -513}, -513, 512, FLAGS },
|
||||
{ "force_original_aspect_ratio", "decrease or increase w/h if necessary to keep the original AR", OFFSET(force_original_aspect_ratio), AV_OPT_TYPE_INT, { .i64 = 0}, 0, 2, FLAGS, "force_oar" },
|
||||
{ "disable", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = 0 }, 0, 0, FLAGS, "force_oar" },
|
||||
{ "decrease", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = 1 }, 0, 0, FLAGS, "force_oar" },
|
||||
|
@@ -55,8 +55,10 @@ static int ape_tag_read_field(AVFormatContext *s)
|
||||
av_log(s, AV_LOG_WARNING, "Invalid APE tag key '%s'.\n", key);
|
||||
return -1;
|
||||
}
|
||||
if (size >= UINT_MAX)
|
||||
return -1;
|
||||
if (size > INT32_MAX - FF_INPUT_BUFFER_PADDING_SIZE) {
|
||||
av_log(s, AV_LOG_ERROR, "APE tag size too large.\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
if (flags & APE_TAG_FLAG_IS_BINARY) {
|
||||
uint8_t filename[1024];
|
||||
enum AVCodecID id;
|
||||
|
@@ -22,6 +22,7 @@
|
||||
#include <float.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "libavutil/avassert.h"
|
||||
#include "libavutil/mathematics.h"
|
||||
#include "libavutil/parseutils.h"
|
||||
#include "libavutil/avstring.h"
|
||||
@@ -251,6 +252,12 @@ static int hls_write_header(AVFormatContext *s)
|
||||
if ((ret = avformat_write_header(hls->avf, NULL)) < 0)
|
||||
goto fail;
|
||||
|
||||
av_assert0(s->nb_streams == hls->avf->nb_streams);
|
||||
for (i = 0; i < s->nb_streams; i++) {
|
||||
AVStream *inner_st = hls->avf->streams[i];
|
||||
AVStream *outter_st = s->streams[i];
|
||||
avpriv_set_pts_info(outter_st, inner_st->pts_wrap_bits, inner_st->time_base.num, inner_st->time_base.den);
|
||||
}
|
||||
|
||||
fail:
|
||||
if (ret) {
|
||||
|
@@ -162,6 +162,8 @@ static int img_read_probe(AVProbeData *p)
|
||||
return AVPROBE_SCORE_MAX;
|
||||
else if (is_glob(p->filename))
|
||||
return AVPROBE_SCORE_MAX;
|
||||
else if (p->filename[strcspn(p->filename, "*?{")]) // probably PT_GLOB
|
||||
return AVPROBE_SCORE_EXTENSION + 2; // score chosen to be a tad above the image pipes
|
||||
else if (p->buf_size == 0)
|
||||
return 0;
|
||||
else if (av_match_ext(p->filename, "raw") || av_match_ext(p->filename, "gif"))
|
||||
@@ -421,8 +423,10 @@ int ff_img_read_packet(AVFormatContext *s1, AVPacket *pkt)
|
||||
infer_size(&codec->width, &codec->height, size[0]);
|
||||
} else {
|
||||
f[0] = s1->pb;
|
||||
if (avio_feof(f[0]) && s->loop && s->is_pipe)
|
||||
avio_seek(f[0], 0, SEEK_SET);
|
||||
if (avio_feof(f[0]))
|
||||
return AVERROR(EIO);
|
||||
return AVERROR_EOF;
|
||||
if (s->frame_size > 0) {
|
||||
size[0] = s->frame_size;
|
||||
} else if (!s1->streams[0]->parser) {
|
||||
@@ -450,10 +454,19 @@ int ff_img_read_packet(AVFormatContext *s1, AVPacket *pkt)
|
||||
pkt->pts = s->pts;
|
||||
}
|
||||
|
||||
if (s->is_pipe)
|
||||
pkt->pos = avio_tell(f[0]);
|
||||
|
||||
pkt->size = 0;
|
||||
for (i = 0; i < 3; i++) {
|
||||
if (f[i]) {
|
||||
ret[i] = avio_read(f[i], pkt->data + pkt->size, size[i]);
|
||||
if (s->loop && s->is_pipe && ret[i] == AVERROR_EOF) {
|
||||
if (avio_seek(f[i], 0, SEEK_SET) >= 0) {
|
||||
pkt->pos = 0;
|
||||
ret[i] = avio_read(f[i], pkt->data + pkt->size, size[i]);
|
||||
}
|
||||
}
|
||||
if (!s->is_pipe)
|
||||
avio_close(f[i]);
|
||||
if (ret[i] > 0)
|
||||
@@ -463,7 +476,13 @@ int ff_img_read_packet(AVFormatContext *s1, AVPacket *pkt)
|
||||
|
||||
if (ret[0] <= 0 || ret[1] < 0 || ret[2] < 0) {
|
||||
av_free_packet(pkt);
|
||||
return AVERROR(EIO); /* signal EOF */
|
||||
if (ret[0] < 0) {
|
||||
return ret[0];
|
||||
} else if (ret[1] < 0) {
|
||||
return ret[1];
|
||||
} else if (ret[2] < 0)
|
||||
return ret[2];
|
||||
return AVERROR_EOF;
|
||||
} else {
|
||||
s->img_count++;
|
||||
s->img_number++;
|
||||
@@ -694,6 +713,7 @@ AVInputFormat ff_image_ ## imgname ## _pipe_demuxer = {\
|
||||
.read_header = ff_img_read_header,\
|
||||
.read_packet = ff_img_read_packet,\
|
||||
.priv_class = & imgname ## _class,\
|
||||
.flags = AVFMT_GENERIC_INDEX, \
|
||||
.raw_codec_id = codecid,\
|
||||
};
|
||||
|
||||
|
@@ -1920,7 +1920,8 @@ static int matroska_parse_tracks(AVFormatContext *s)
|
||||
av_reduce(&st->avg_frame_rate.num, &st->avg_frame_rate.den,
|
||||
1000000000, track->default_duration, 30000);
|
||||
#if FF_API_R_FRAME_RATE
|
||||
if (st->avg_frame_rate.num < st->avg_frame_rate.den * 1000L)
|
||||
if ( st->avg_frame_rate.num < st->avg_frame_rate.den * 1000L
|
||||
&& st->avg_frame_rate.num > st->avg_frame_rate.den * 5L)
|
||||
st->r_frame_rate = st->avg_frame_rate;
|
||||
#endif
|
||||
}
|
||||
|
@@ -858,8 +858,12 @@ static int read_sl_header(PESContext *pes, SLConfigDescr *sl,
|
||||
int padding_flag = 0, padding_bits = 0, inst_bitrate_flag = 0;
|
||||
int dts_flag = -1, cts_flag = -1;
|
||||
int64_t dts = AV_NOPTS_VALUE, cts = AV_NOPTS_VALUE;
|
||||
uint8_t buf_padded[128 + FF_INPUT_BUFFER_PADDING_SIZE];
|
||||
int buf_padded_size = FFMIN(buf_size, sizeof(buf_padded) - FF_INPUT_BUFFER_PADDING_SIZE);
|
||||
|
||||
init_get_bits(&gb, buf, buf_size * 8);
|
||||
memcpy(buf_padded, buf, buf_padded_size);
|
||||
|
||||
init_get_bits(&gb, buf_padded, buf_padded_size * 8);
|
||||
|
||||
if (sl->use_au_start)
|
||||
au_start_flag = get_bits1(&gb);
|
||||
@@ -1994,7 +1998,7 @@ static void sdt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
|
||||
break;
|
||||
desc_len = get8(&p, desc_list_end);
|
||||
desc_end = p + desc_len;
|
||||
if (desc_end > desc_list_end)
|
||||
if (desc_len < 0 || desc_end > desc_list_end)
|
||||
break;
|
||||
|
||||
av_dlog(ts->stream, "tag: 0x%02x len=%d\n",
|
||||
|
@@ -988,7 +988,7 @@ static const MXFCodecUL mxf_sound_essence_container_uls[] = {
|
||||
|
||||
static const MXFCodecUL mxf_data_essence_container_uls[] = {
|
||||
{ { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x09,0x0d,0x01,0x03,0x01,0x02,0x0e,0x00,0x00 }, 16, 0 },
|
||||
{ { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x09,0x0d,0x01,0x03,0x01,0x02,0x0e,0x00,0x00 }, 16, AV_CODEC_ID_NONE },
|
||||
{ { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, AV_CODEC_ID_NONE },
|
||||
};
|
||||
|
||||
static const char* const mxf_data_essence_descriptor[] = {
|
||||
|
@@ -93,6 +93,7 @@ static const AVOption avformat_options[] = {
|
||||
{"strict", "how strictly to follow the standards", OFFSET(strict_std_compliance), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, D|E, "strict"},
|
||||
{"strict", "strictly conform to all the things in the spec no matter what the consequences", 0, AV_OPT_TYPE_CONST, {.i64 = FF_COMPLIANCE_STRICT }, INT_MIN, INT_MAX, D|E, "strict"},
|
||||
{"normal", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_COMPLIANCE_NORMAL }, INT_MIN, INT_MAX, D|E, "strict"},
|
||||
{"unofficial", "allow unofficial extensions", 0, AV_OPT_TYPE_CONST, {.i64 = FF_COMPLIANCE_UNOFFICIAL }, INT_MIN, INT_MAX, D|E, "strict"},
|
||||
{"experimental", "allow non-standardized experimental variants", 0, AV_OPT_TYPE_CONST, {.i64 = FF_COMPLIANCE_EXPERIMENTAL }, INT_MIN, INT_MAX, D|E, "strict"},
|
||||
{"max_ts_probe", "maximum number of packets to read while waiting for the first timestamp", OFFSET(max_ts_probe), AV_OPT_TYPE_INT, { .i64 = 50 }, 0, INT_MAX, D },
|
||||
{NULL},
|
||||
|
@@ -209,11 +209,15 @@ int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc, int flags)
|
||||
void ff_put_bmp_header(AVIOContext *pb, AVCodecContext *enc,
|
||||
const AVCodecTag *tags, int for_asf, int ignore_extradata)
|
||||
{
|
||||
int keep_height = enc->extradata_size >= 9 &&
|
||||
!memcmp(enc->extradata + enc->extradata_size - 9, "BottomUp", 9);
|
||||
int extradata_size = enc->extradata_size - 9*keep_height;
|
||||
|
||||
/* size */
|
||||
avio_wl32(pb, 40 + (ignore_extradata ? 0 : enc->extradata_size));
|
||||
avio_wl32(pb, 40 + (ignore_extradata ? 0 :extradata_size));
|
||||
avio_wl32(pb, enc->width);
|
||||
//We always store RGB TopDown
|
||||
avio_wl32(pb, enc->codec_tag ? enc->height : -enc->height);
|
||||
avio_wl32(pb, enc->codec_tag || keep_height ? enc->height : -enc->height);
|
||||
/* planes */
|
||||
avio_wl16(pb, 1);
|
||||
/* depth */
|
||||
@@ -227,9 +231,9 @@ void ff_put_bmp_header(AVIOContext *pb, AVCodecContext *enc,
|
||||
avio_wl32(pb, 0);
|
||||
|
||||
if (!ignore_extradata) {
|
||||
avio_write(pb, enc->extradata, enc->extradata_size);
|
||||
avio_write(pb, enc->extradata, extradata_size);
|
||||
|
||||
if (!for_asf && enc->extradata_size & 1)
|
||||
if (!for_asf && extradata_size & 1)
|
||||
avio_w8(pb, 0);
|
||||
}
|
||||
}
|
||||
|
@@ -414,6 +414,19 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c,
|
||||
payload_type, mode, config ? config : "");
|
||||
break;
|
||||
}
|
||||
case AV_CODEC_ID_H261:
|
||||
{
|
||||
const char *pic_fmt = NULL;
|
||||
/* only QCIF and CIF are specified as supported in RFC 4587 */
|
||||
if (c->width == 176 && c->height == 144)
|
||||
pic_fmt = "QCIF=1";
|
||||
if (c->width == 352 && c->height == 288)
|
||||
pic_fmt = "CIF=1";
|
||||
av_strlcatf(buff, size, "a=rtpmap:%d H261/90000\r\n", payload_type);
|
||||
if (pic_fmt)
|
||||
av_strlcatf(buff, size, "a=fmtp:%d %s\r\n", payload_type, pic_fmt);
|
||||
break;
|
||||
}
|
||||
case AV_CODEC_ID_H263:
|
||||
case AV_CODEC_ID_H263P:
|
||||
/* a=framesize is required by 3GPP TS 26.234 (PSS). It
|
||||
|
@@ -789,6 +789,8 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p
|
||||
len = avio_rl32(pb);
|
||||
if (len < 32) {
|
||||
int ret;
|
||||
if (avio_feof(pb))
|
||||
return AVERROR_EOF;
|
||||
av_log(s, AV_LOG_WARNING, "encountered broken chunk\n");
|
||||
if ((ret = recover(wtv, avio_tell(pb) - 20)) < 0)
|
||||
return ret;
|
||||
|
@@ -627,7 +627,7 @@ int av_opt_set_channel_layout(void *obj, const char *name, int64_t cl, int searc
|
||||
"The value set by option '%s' is not a channel layout.\n", o->name);
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
*(int *)(((int64_t *)target_obj) + o->offset) = cl;
|
||||
*(int64_t *)(((uint8_t *)target_obj) + o->offset) = cl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@@ -45,7 +45,7 @@
|
||||
"cpuid \n\t" \
|
||||
"xchg %%"REG_b", %%"REG_S \
|
||||
: "=a" (eax), "=S" (ebx), "=c" (ecx), "=d" (edx) \
|
||||
: "0" (index))
|
||||
: "0" (index), "2"(0))
|
||||
|
||||
#define xgetbv(index, eax, edx) \
|
||||
__asm__ (".byte 0x0f, 0x01, 0xd0" : "=a"(eax), "=d"(edx) : "c" (index))
|
||||
|
@@ -979,7 +979,7 @@ void pp_postprocess(const uint8_t * src[3], const int srcStride[3],
|
||||
|
||||
if(pict_type & PP_PICT_TYPE_QP2){
|
||||
int i;
|
||||
const int count= mbHeight * absQPStride;
|
||||
const int count= FFMAX(mbHeight * absQPStride, mbWidth);
|
||||
for(i=0; i<(count>>2); i++){
|
||||
((uint32_t*)c->stdQPTable)[i] = (((const uint32_t*)QP_store)[i]>>1) & 0x7F7F7F7F;
|
||||
}
|
||||
@@ -1004,7 +1004,7 @@ void pp_postprocess(const uint8_t * src[3], const int srcStride[3],
|
||||
if((pict_type&7)!=3){
|
||||
if (QPStride >= 0){
|
||||
int i;
|
||||
const int count= mbHeight * QPStride;
|
||||
const int count= FFMAX(mbHeight * QPStride, mbWidth);
|
||||
for(i=0; i<(count>>2); i++){
|
||||
((uint32_t*)c->nonBQPTable)[i] = ((const uint32_t*)QP_store)[i] & 0x3F3F3F3F;
|
||||
}
|
||||
|
@@ -663,6 +663,8 @@ int swr_convert(struct SwrContext *s, uint8_t *out_arg[SWR_CH_MAX], int out_coun
|
||||
in_count = 0;
|
||||
if(ret>0) {
|
||||
s->drop_output -= ret;
|
||||
if (!s->drop_output && !out_arg)
|
||||
return 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@@ -64,10 +64,10 @@ static const AVOption swscale_options[] = {
|
||||
{ "param0", "scaler param 0", OFFSET(param[0]), AV_OPT_TYPE_DOUBLE, { .dbl = SWS_PARAM_DEFAULT }, INT_MIN, INT_MAX, VE },
|
||||
{ "param1", "scaler param 1", OFFSET(param[1]), AV_OPT_TYPE_DOUBLE, { .dbl = SWS_PARAM_DEFAULT }, INT_MIN, INT_MAX, VE },
|
||||
|
||||
{ "src_v_chr_pos", "source vertical chroma position in luma grid/256" , OFFSET(src_v_chr_pos), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 512, VE },
|
||||
{ "src_h_chr_pos", "source horizontal chroma position in luma grid/256", OFFSET(src_h_chr_pos), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 512, VE },
|
||||
{ "dst_v_chr_pos", "destination vertical chroma position in luma grid/256" , OFFSET(dst_v_chr_pos), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 512, VE },
|
||||
{ "dst_h_chr_pos", "destination horizontal chroma position in luma grid/256", OFFSET(dst_h_chr_pos), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 512, VE },
|
||||
{ "src_v_chr_pos", "source vertical chroma position in luma grid/256" , OFFSET(src_v_chr_pos), AV_OPT_TYPE_INT, { .i64 = -513 }, -513, 512, VE },
|
||||
{ "src_h_chr_pos", "source horizontal chroma position in luma grid/256", OFFSET(src_h_chr_pos), AV_OPT_TYPE_INT, { .i64 = -513 }, -513, 512, VE },
|
||||
{ "dst_v_chr_pos", "destination vertical chroma position in luma grid/256" , OFFSET(dst_v_chr_pos), AV_OPT_TYPE_INT, { .i64 = -513 }, -513, 512, VE },
|
||||
{ "dst_h_chr_pos", "destination horizontal chroma position in luma grid/256", OFFSET(dst_h_chr_pos), AV_OPT_TYPE_INT, { .i64 = -513 }, -513, 512, VE },
|
||||
|
||||
{ "sws_dither", "set dithering algorithm", OFFSET(dither), AV_OPT_TYPE_INT, { .i64 = SWS_DITHER_AUTO }, 0, NB_SWS_DITHER, VE, "sws_dither" },
|
||||
{ "auto", "leave choice to sws", 0, AV_OPT_TYPE_CONST, { .i64 = SWS_DITHER_AUTO }, INT_MIN, INT_MAX, VE, "sws_dither" },
|
||||
|
@@ -266,7 +266,7 @@ static double getSplineCoeff(double a, double b, double c, double d,
|
||||
|
||||
static av_cold int get_local_pos(SwsContext *s, int chr_subsample, int pos, int dir)
|
||||
{
|
||||
if (pos < 0) {
|
||||
if (pos == -1 || pos <= -513) {
|
||||
pos = (128 << chr_subsample) - 128;
|
||||
}
|
||||
pos += 128; // relative to ideal left edge
|
||||
|
@@ -248,6 +248,7 @@ if test $err = 0; then
|
||||
rm -f $outfile $errfile $cmpfile $cleanfiles
|
||||
elif test $gen = "no"; then
|
||||
echo "Test $test failed. Look at $errfile for details."
|
||||
test "${V:-0}" -gt 0 && cat $errfile
|
||||
else
|
||||
echo "Updating reference failed, possibly no output file was generated."
|
||||
fi
|
||||
|
@@ -9,7 +9,7 @@ best_effort_timestamp=0
|
||||
best_effort_timestamp_time=0.000000
|
||||
pkt_duration=1
|
||||
pkt_duration_time=0.040000
|
||||
pkt_pos=N/A
|
||||
pkt_pos=0
|
||||
pkt_size=67604
|
||||
width=200
|
||||
height=112
|
||||
|
@@ -9,7 +9,7 @@ best_effort_timestamp=0
|
||||
best_effort_timestamp_time=0.000000
|
||||
pkt_duration=1
|
||||
pkt_duration_time=0.040000
|
||||
pkt_pos=N/A
|
||||
pkt_pos=0
|
||||
pkt_size=39276
|
||||
width=400
|
||||
height=225
|
||||
|
@@ -1 +1 @@
|
||||
pp3 f38fdc2dfa4c8d889918efe6d7a7ac3a
|
||||
pp3 ef0f10f1859af2f75717e8c9d64ee38a
|
||||
|
@@ -1,46 +1,46 @@
|
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 14316
|
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 12152
|
||||
ret: 0 st:-1 flags:0 ts:-1.000000
|
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 14316
|
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 12152
|
||||
ret: 0 st:-1 flags:1 ts: 1.894167
|
||||
ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos: 776840 size: 18256
|
||||
ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos: 643344 size: 15064
|
||||
ret: 0 st: 0 flags:0 ts: 0.800000
|
||||
ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos: 305352 size: 16180
|
||||
ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos: 255232 size: 13312
|
||||
ret:-1 st: 0 flags:1 ts:-0.320000
|
||||
ret:-1 st:-1 flags:0 ts: 2.576668
|
||||
ret: 0 st:-1 flags:1 ts: 1.470835
|
||||
ret: 0 st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos: 595448 size: 17980
|
||||
ret: 0 st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos: 493584 size: 14796
|
||||
ret: 0 st: 0 flags:0 ts: 0.360000
|
||||
ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: 135516 size: 14868
|
||||
ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: 114852 size: 12356
|
||||
ret:-1 st: 0 flags:1 ts:-0.760000
|
||||
ret:-1 st:-1 flags:0 ts: 2.153336
|
||||
ret: 0 st:-1 flags:1 ts: 1.047503
|
||||
ret: 0 st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos: 404100 size: 16856
|
||||
ret: 0 st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos: 336180 size: 13824
|
||||
ret: 0 st: 0 flags:0 ts:-0.040000
|
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 14316
|
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 12152
|
||||
ret: 0 st: 0 flags:1 ts: 2.840000
|
||||
ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 813396 size: 18296
|
||||
ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 673504 size: 15104
|
||||
ret: 0 st:-1 flags:0 ts: 1.730004
|
||||
ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos: 704136 size: 18140
|
||||
ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos: 583312 size: 14956
|
||||
ret: 0 st:-1 flags:1 ts: 0.624171
|
||||
ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos: 241764 size: 15736
|
||||
ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos: 202872 size: 12944
|
||||
ret: 0 st: 0 flags:0 ts:-0.480000
|
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 14316
|
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 12152
|
||||
ret: 0 st: 0 flags:1 ts: 2.400000
|
||||
ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 813396 size: 18296
|
||||
ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 673504 size: 15104
|
||||
ret: 0 st:-1 flags:0 ts: 1.306672
|
||||
ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos: 524488 size: 17548
|
||||
ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos: 435128 size: 14488
|
||||
ret: 0 st:-1 flags:1 ts: 0.200839
|
||||
ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 77020 size: 14496
|
||||
ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 65864 size: 12144
|
||||
ret: 0 st: 0 flags:0 ts:-0.920000
|
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 14316
|
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 12152
|
||||
ret: 0 st: 0 flags:1 ts: 2.000000
|
||||
ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 813396 size: 18296
|
||||
ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 673504 size: 15104
|
||||
ret: 0 st:-1 flags:0 ts: 0.883340
|
||||
ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos: 337808 size: 16388
|
||||
ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos: 281884 size: 13412
|
||||
ret:-1 st:-1 flags:1 ts:-0.222493
|
||||
ret:-1 st: 0 flags:0 ts: 2.680000
|
||||
ret: 0 st: 0 flags:1 ts: 1.560000
|
||||
ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos: 631584 size: 18188
|
||||
ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos: 523324 size: 14972
|
||||
ret: 0 st:-1 flags:0 ts: 0.460008
|
||||
ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 180212 size: 15168
|
||||
ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 152056 size: 12540
|
||||
ret:-1 st:-1 flags:1 ts:-0.645825
|
||||
|
@@ -1,46 +1,46 @@
|
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 13732
|
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 12072
|
||||
ret: 0 st:-1 flags:0 ts:-1.000000
|
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 13732
|
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 12072
|
||||
ret: 0 st:-1 flags:1 ts: 1.894167
|
||||
ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos: 736152 size: 17340
|
||||
ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos: 630028 size: 14892
|
||||
ret: 0 st: 0 flags:0 ts: 0.800000
|
||||
ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos: 289708 size: 15300
|
||||
ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos: 248836 size: 13024
|
||||
ret:-1 st: 0 flags:1 ts:-0.320000
|
||||
ret:-1 st:-1 flags:0 ts: 2.576668
|
||||
ret: 0 st:-1 flags:1 ts: 1.470835
|
||||
ret: 0 st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos: 564140 size: 17016
|
||||
ret: 0 st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos: 482700 size: 14532
|
||||
ret: 0 st: 0 flags:0 ts: 0.360000
|
||||
ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: 128564 size: 14052
|
||||
ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: 111600 size: 12016
|
||||
ret:-1 st: 0 flags:1 ts:-0.760000
|
||||
ret:-1 st:-1 flags:0 ts: 2.153336
|
||||
ret: 0 st:-1 flags:1 ts: 1.047503
|
||||
ret: 0 st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos: 383244 size: 15896
|
||||
ret: 0 st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos: 328252 size: 13532
|
||||
ret: 0 st: 0 flags:0 ts:-0.040000
|
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 13732
|
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 12072
|
||||
ret: 0 st: 0 flags:1 ts: 2.840000
|
||||
ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 770852 size: 17400
|
||||
ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 659848 size: 14928
|
||||
ret: 0 st:-1 flags:0 ts: 1.730004
|
||||
ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos: 667016 size: 17172
|
||||
ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos: 570784 size: 14712
|
||||
ret: 0 st:-1 flags:1 ts: 0.624171
|
||||
ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos: 229388 size: 14956
|
||||
ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos: 197536 size: 12724
|
||||
ret: 0 st: 0 flags:0 ts:-0.480000
|
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 13732
|
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 12072
|
||||
ret: 0 st: 0 flags:1 ts: 2.400000
|
||||
ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 770852 size: 17400
|
||||
ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 659848 size: 14928
|
||||
ret: 0 st:-1 flags:0 ts: 1.306672
|
||||
ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos: 496932 size: 16564
|
||||
ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos: 425316 size: 14116
|
||||
ret: 0 st:-1 flags:1 ts: 0.200839
|
||||
ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 73176 size: 13664
|
||||
ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 64104 size: 11780
|
||||
ret: 0 st: 0 flags:0 ts:-0.920000
|
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 13732
|
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 12072
|
||||
ret: 0 st: 0 flags:1 ts: 2.000000
|
||||
ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 770852 size: 17400
|
||||
ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 659848 size: 14928
|
||||
ret: 0 st:-1 flags:0 ts: 0.883340
|
||||
ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos: 320444 size: 15592
|
||||
ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos: 274964 size: 13176
|
||||
ret:-1 st:-1 flags:1 ts:-0.222493
|
||||
ret:-1 st: 0 flags:0 ts: 2.680000
|
||||
ret: 0 st: 0 flags:1 ts: 1.560000
|
||||
ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos: 598288 size: 17180
|
||||
ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos: 511944 size: 14668
|
||||
ret: 0 st:-1 flags:0 ts: 0.460008
|
||||
ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 171012 size: 14392
|
||||
ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 147820 size: 12240
|
||||
ret:-1 st:-1 flags:1 ts:-0.645825
|
||||
|
@@ -1,4 +1,4 @@
|
||||
992195272b94d8779b6216030b85ae18 *tests/data/fate/vsynth1-asv1.avi
|
||||
1489644 tests/data/fate/vsynth1-asv1.avi
|
||||
2dfc5dfc2c1cbbc2543257cd3d2df6af *tests/data/fate/vsynth1-asv1.out.rawvideo
|
||||
stddev: 20.00 PSNR: 22.11 MAXDIFF: 158 bytes: 7603200/ 7603200
|
||||
f446db5dfd6bcc14378bca9406e39adb *tests/data/fate/vsynth1-asv1.avi
|
||||
1298616 tests/data/fate/vsynth1-asv1.avi
|
||||
a4f95c58e8b9258da52b9d09153b1078 *tests/data/fate/vsynth1-asv1.out.rawvideo
|
||||
stddev: 11.89 PSNR: 26.62 MAXDIFF: 132 bytes: 7603200/ 7603200
|
||||
|
@@ -1,4 +1,4 @@
|
||||
1e589b4dd70c4a8a7dbf4a466bab31ae *tests/data/fate/vsynth1-asv2.avi
|
||||
1456044 tests/data/fate/vsynth1-asv2.avi
|
||||
d451be09793cd0f35b6d91fc36e2571a *tests/data/fate/vsynth1-asv2.out.rawvideo
|
||||
stddev: 18.82 PSNR: 22.63 MAXDIFF: 131 bytes: 7603200/ 7603200
|
||||
06b7b65686a1eb03d43f25e179c03872 *tests/data/fate/vsynth1-asv2.avi
|
||||
1434408 tests/data/fate/vsynth1-asv2.avi
|
||||
cb1f5560005800e889bfbb36cdc9fc40 *tests/data/fate/vsynth1-asv2.out.rawvideo
|
||||
stddev: 8.36 PSNR: 29.68 MAXDIFF: 58 bytes: 7603200/ 7603200
|
||||
|
@@ -1,4 +1,4 @@
|
||||
9218843465c3396e9b078e63ce7ba17e *tests/data/fate/vsynth2-asv1.avi
|
||||
832500 tests/data/fate/vsynth2-asv1.avi
|
||||
c96ff7fd17c52f99ddb7922a4cb9168f *tests/data/fate/vsynth2-asv1.out.rawvideo
|
||||
stddev: 10.47 PSNR: 27.73 MAXDIFF: 98 bytes: 7603200/ 7603200
|
||||
bffe7188b4b5c3ff76c75561d0bebd77 *tests/data/fate/vsynth2-asv1.avi
|
||||
689416 tests/data/fate/vsynth2-asv1.avi
|
||||
a7cdefad200f48ab308c746461a8792e *tests/data/fate/vsynth2-asv1.out.rawvideo
|
||||
stddev: 5.07 PSNR: 34.03 MAXDIFF: 70 bytes: 7603200/ 7603200
|
||||
|
@@ -1,4 +1,4 @@
|
||||
065323f9873c367dd1e371fa47657ae4 *tests/data/fate/vsynth2-asv2.avi
|
||||
789060 tests/data/fate/vsynth2-asv2.avi
|
||||
74a78015b64b2cf8cb9da2e44f508a69 *tests/data/fate/vsynth2-asv2.out.rawvideo
|
||||
stddev: 10.28 PSNR: 27.89 MAXDIFF: 95 bytes: 7603200/ 7603200
|
||||
f8c3b9899bbd9545757fac0c7ecf4e34 *tests/data/fate/vsynth2-asv2.avi
|
||||
675584 tests/data/fate/vsynth2-asv2.avi
|
||||
5990db66c7ac0bbe2f98ec2770c1bf3b *tests/data/fate/vsynth2-asv2.out.rawvideo
|
||||
stddev: 4.57 PSNR: 34.93 MAXDIFF: 47 bytes: 7603200/ 7603200
|
||||
|
@@ -1,4 +1,4 @@
|
||||
43c51aa52666de02dfa49fd1c10a558f *tests/data/fate/vsynth3-asv1.avi
|
||||
36664 tests/data/fate/vsynth3-asv1.avi
|
||||
fd156079afc2753dde7d6a8418b2a25a *tests/data/fate/vsynth3-asv1.out.rawvideo
|
||||
stddev: 21.25 PSNR: 21.58 MAXDIFF: 122 bytes: 86700/ 86700
|
||||
642c88813798d857d236f21bb36d8783 *tests/data/fate/vsynth3-asv1.avi
|
||||
34700 tests/data/fate/vsynth3-asv1.avi
|
||||
3c8636e22a96267451684f42d7a6f608 *tests/data/fate/vsynth3-asv1.out.rawvideo
|
||||
stddev: 13.16 PSNR: 25.74 MAXDIFF: 112 bytes: 86700/ 86700
|
||||
|
@@ -1,4 +1,4 @@
|
||||
8958facfc4853267ece3b7868df80229 *tests/data/fate/vsynth3-asv2.avi
|
||||
35620 tests/data/fate/vsynth3-asv2.avi
|
||||
ff711d6341966f03ee32b73ae22493ed *tests/data/fate/vsynth3-asv2.out.rawvideo
|
||||
stddev: 19.98 PSNR: 22.12 MAXDIFF: 113 bytes: 86700/ 86700
|
||||
45f865e3d1cac1ef59ae4689f41dead5 *tests/data/fate/vsynth3-asv2.avi
|
||||
36204 tests/data/fate/vsynth3-asv2.avi
|
||||
5469c0735b7c9279e5e8e3439fc6acab *tests/data/fate/vsynth3-asv2.out.rawvideo
|
||||
stddev: 9.07 PSNR: 28.97 MAXDIFF: 51 bytes: 86700/ 86700
|
||||
|
@@ -33,6 +33,10 @@
|
||||
#include "libavutil/intreadwrite.h"
|
||||
#include "libavutil/timer.h"
|
||||
|
||||
#ifndef AV_READ_TIME
|
||||
#define AV_READ_TIME(x) 0
|
||||
#endif
|
||||
|
||||
#if HAVE_UNISTD_H
|
||||
#include <unistd.h> /* for getopt */
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user