Merge commit 'a335ffd7f4cdaaa6a8fe4187f6f06b0418eea19a' into release/0.10
* commit 'a335ffd7f4cdaaa6a8fe4187f6f06b0418eea19a': h264: fix sps parsing for SVC and CAVLC 4:4:4 Intra profiles h264: check sps.log2_max_frame_num for validity h264: slice-mt: get last_pic_dropable from master context ppc: always use pic for shared libraries h264: error out on unset current_picture_ptr for h->current_slice > 0 flashsv: make sure data for zlib priming is available h264: enable low delay only if no delayed frames were seen flashsv: check for keyframe before using differential coding lavf: avoid integer overflow in ff_compute_frame_duration() aacdec: Fix an off-by-one overwrite when switching to LTP profile from MAIN. APIchanges: Fill in missing commit hashes Conflicts: doc/APIchanges Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
2
configure
vendored
2
configure
vendored
@@ -2560,7 +2560,7 @@ check_host_cflags -std=c99
|
||||
check_host_cflags -Wall
|
||||
|
||||
case "$arch" in
|
||||
alpha|ia64|mips|parisc|sparc)
|
||||
alpha|ia64|mips|parisc|ppc|sparc)
|
||||
spic=$shared
|
||||
;;
|
||||
x86)
|
||||
|
@@ -22,17 +22,17 @@ API changes, most recent first:
|
||||
muxers supporting it (av_write_frame makes sure it is called
|
||||
only for muxers with this flag).
|
||||
|
||||
2012-03-04 - xxxxxxx - lavu 51.22.1 - error.h
|
||||
2012-03-04 - 7f3f855 - lavu 51.22.1 - error.h
|
||||
Add AVERROR_UNKNOWN
|
||||
|
||||
2012-02-29 - xxxxxxx - lavf 53.21.1
|
||||
2012-02-29 - 2ad77c6 - lavf 53.21.1
|
||||
Add avformat_get_riff_video_tags() and avformat_get_riff_audio_tags().
|
||||
|
||||
2012-02-29 - xxxxxxx - lavu 51.22.0 - intfloat.h
|
||||
2012-02-29 - a1556d3 - lavu 51.22.0 - intfloat.h
|
||||
Add a new installed header libavutil/intfloat.h with int/float punning
|
||||
functions.
|
||||
|
||||
2012-02-17 - xxxxxxx - lavc 53.35.0
|
||||
2012-02-17 - 350d06d - lavc 53.35.0
|
||||
Add avcodec_is_open() function.
|
||||
|
||||
2012-01-15 - lavc 53.34.0
|
||||
|
@@ -1766,7 +1766,7 @@ static void apply_tns(float coef[1024], TemporalNoiseShaping *tns,
|
||||
int w, filt, m, i;
|
||||
int bottom, top, order, start, end, size, inc;
|
||||
float lpc[TNS_MAX_ORDER];
|
||||
float tmp[TNS_MAX_ORDER];
|
||||
float tmp[TNS_MAX_ORDER + 1];
|
||||
|
||||
for (w = 0; w < ics->num_windows; w++) {
|
||||
bottom = ics->num_swb;
|
||||
|
@@ -381,6 +381,11 @@ static int flashsv_decode_frame(AVCodecContext *avctx, void *data,
|
||||
}
|
||||
|
||||
if (has_diff) {
|
||||
if (!s->keyframe) {
|
||||
av_log(avctx, AV_LOG_ERROR,
|
||||
"inter frame without keyframe\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
s->diff_start = get_bits(&gb, 8);
|
||||
s->diff_height = get_bits(&gb, 8);
|
||||
av_log(avctx, AV_LOG_DEBUG,
|
||||
@@ -400,6 +405,11 @@ static int flashsv_decode_frame(AVCodecContext *avctx, void *data,
|
||||
av_log_missing_feature(avctx, "zlibprime_curr", 1);
|
||||
return AVERROR_PATCHWELCOME;
|
||||
}
|
||||
if (!s->blocks && (s->zlibprime_curr || s->zlibprime_prev)) {
|
||||
av_log(avctx, AV_LOG_ERROR, "no data available for zlib "
|
||||
"priming\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
size--; // account for flags byte
|
||||
}
|
||||
|
||||
|
@@ -2895,6 +2895,11 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
|
||||
s->picture_structure = last_pic_structure;
|
||||
s->dropable = last_pic_dropable;
|
||||
return AVERROR_INVALIDDATA;
|
||||
} else if (!s0->current_picture_ptr) {
|
||||
av_log(s->avctx, AV_LOG_ERROR,
|
||||
"unset current_picture_ptr on %d. slice\n",
|
||||
h0->current_slice + 1);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
} else {
|
||||
/* Shorten frame num gaps so we don't have to allocate reference
|
||||
@@ -4062,9 +4067,16 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
|
||||
ff_h264_decode_seq_parameter_set(h);
|
||||
}
|
||||
|
||||
if (s->flags& CODEC_FLAG_LOW_DELAY ||
|
||||
(h->sps.bitstream_restriction_flag && !h->sps.num_reorder_frames))
|
||||
s->low_delay=1;
|
||||
if (s->flags & CODEC_FLAG_LOW_DELAY ||
|
||||
(h->sps.bitstream_restriction_flag &&
|
||||
!h->sps.num_reorder_frames)) {
|
||||
if (s->avctx->has_b_frames > 1 || h->delayed_pic[0])
|
||||
av_log(avctx, AV_LOG_WARNING, "Delayed frames seen "
|
||||
"reenabling low delay requires a codec "
|
||||
"flush.\n");
|
||||
else
|
||||
s->low_delay = 1;
|
||||
}
|
||||
|
||||
if(avctx->has_b_frames < 2)
|
||||
avctx->has_b_frames= !s->low_delay;
|
||||
|
@@ -37,6 +37,9 @@
|
||||
//#undef NDEBUG
|
||||
#include <assert.h>
|
||||
|
||||
#define MAX_LOG2_MAX_FRAME_NUM (12 + 4)
|
||||
#define MIN_LOG2_MAX_FRAME_NUM 4
|
||||
|
||||
static const AVRational pixel_aspect[17]={
|
||||
{0, 1},
|
||||
{1, 1},
|
||||
@@ -315,7 +318,7 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
|
||||
MpegEncContext * const s = &h->s;
|
||||
int profile_idc, level_idc, constraint_set_flags = 0;
|
||||
unsigned int sps_id;
|
||||
int i;
|
||||
int i, log2_max_frame_num_minus4;
|
||||
SPS *sps;
|
||||
|
||||
profile_idc= get_bits(&s->gb, 8);
|
||||
@@ -346,7 +349,11 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
|
||||
sps->scaling_matrix_present = 0;
|
||||
sps->colorspace = 2; //AVCOL_SPC_UNSPECIFIED
|
||||
|
||||
if(sps->profile_idc >= 100){ //high profile
|
||||
if (sps->profile_idc == 100 || sps->profile_idc == 110 ||
|
||||
sps->profile_idc == 122 || sps->profile_idc == 244 ||
|
||||
sps->profile_idc == 44 || sps->profile_idc == 83 ||
|
||||
sps->profile_idc == 86 || sps->profile_idc == 118 ||
|
||||
sps->profile_idc == 128 || sps->profile_idc == 144) {
|
||||
sps->chroma_format_idc= get_ue_golomb_31(&s->gb);
|
||||
if (sps->chroma_format_idc > 3U) {
|
||||
av_log(h->s.avctx, AV_LOG_ERROR, "chroma_format_idc %d is illegal\n", sps->chroma_format_idc);
|
||||
@@ -369,7 +376,16 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
|
||||
sps->bit_depth_chroma = 8;
|
||||
}
|
||||
|
||||
sps->log2_max_frame_num= get_ue_golomb(&s->gb) + 4;
|
||||
log2_max_frame_num_minus4 = get_ue_golomb(&s->gb);
|
||||
if (log2_max_frame_num_minus4 < MIN_LOG2_MAX_FRAME_NUM - 4 ||
|
||||
log2_max_frame_num_minus4 > MAX_LOG2_MAX_FRAME_NUM - 4) {
|
||||
av_log(h->s.avctx, AV_LOG_ERROR,
|
||||
"log2_max_frame_num_minus4 out of range (0-12): %d\n",
|
||||
log2_max_frame_num_minus4);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
sps->log2_max_frame_num = log2_max_frame_num_minus4 + 4;
|
||||
|
||||
sps->poc_type= get_ue_golomb_31(&s->gb);
|
||||
|
||||
if(sps->poc_type == 0){ //FIXME #define
|
||||
|
@@ -902,7 +902,10 @@ static void compute_frame_duration(int *pnum, int *pden, AVStream *st,
|
||||
*pnum = st->codec->time_base.num;
|
||||
*pden = st->codec->time_base.den;
|
||||
if (pc && pc->repeat_pict) {
|
||||
*pnum = (*pnum) * (1 + pc->repeat_pict);
|
||||
if (*pnum > INT_MAX / (1 + pc->repeat_pict))
|
||||
*pden /= 1 + pc->repeat_pict;
|
||||
else
|
||||
*pnum *= 1 + pc->repeat_pict;
|
||||
}
|
||||
//If this codec can be interlaced or progressive then we need a parser to compute duration of a packet
|
||||
//Thus if we have no parser in such case leave duration undefined.
|
||||
|
Reference in New Issue
Block a user