提交 bba6f5b7 编写于 作者: M Michael Niedermayer

Merge remote-tracking branch 'qatar/master'

* qatar/master:
  vp3dec: Check coefficient index in vp3_dequant()
  svq1dec: call avcodec_set_dimensions() after dimensions changed.
  Prepare for 0.8_beta1 snapshot release
  threads: check defines before using them in automatic thread detection
  pthread: include sys/types.h before sys/sysctl.h
  4xm: remove unused variables.
  h264: Fix a possible overread in decode_nal_units()
  allfilters: fix type of avfilter_vsrc_buffer.
  w32thread: call ResetEvent() in pthread_cond_broadcast().

Conflicts:
	Changelog
	RELEASE
	doc/RELEASE_NOTES
	libavcodec/pthread.c
	libavcodec/vp3.c
Merged-by: NMichael Niedermayer <michaelni@gmx.at>
......@@ -8,19 +8,17 @@ Release Notes
General notes
-------------
This release enables frame-based multithreaded decoding for a number of codecs,
including theora, huffyuv, VP8, H.263, mpeg4 and H.264. Additionally, there has
been a major cleanup of
both internal and external APIs. For this reason, the major versions of all
libraries except libpostproc have been bumped. This means that 0.8 can be installed
side-by-side with previous releases, on the other hand applications need to be
recompiled to use 0.8.
Other important changes are more than 200 bugfixes, known regressions were fixed
w.r.t 0.5 and 0.6, additions of decoders including, but not limited to,
AMR-WB, single stream LATM/LOAS, G.722 ADPCM, a native VP8 decoder
and HE-AACv2. Additionally, many new de/muxers such as WebM in Matroska, Apple
HTTP Live Streaming, SAP, IEC 61937 (S/PDIF) have been added.
This release is binary compatible with 0.8.
Our work on the 'ffmpeg' command-line tool has resulted in
extensions to its command line interface, its also compatible with
both our 0.8 ffmpeg and a tool called avconv
Additionally, this release introduces a number of new interesting codecs
such as the Apple Prores, Flash Screen Video 2 and Windows Media Image,
and muxers such as LATM or CELT in Ogg, among many others. Moreover, our
H.264 decoder has been improved to decode 4:2:2 material and our libx264
wrapper now allows to produce 4:2:2 and 4:4:4 video.
See the Changelog file for a list of significant changes.
......@@ -30,36 +28,19 @@ FFmpeg, please try git master to check if the issue still exists. If it does,
make your report against the development code following the usual bug reporting
guidelines.
Note, if you have difficulty building for mingw, try --disable-outdev=sdl
API changes
-----------
Please see git log of the public headers or the file doc/APIchanges for
programmer-centric information. Note that some long-time deprecated APIs have
been removed. Also, a number of additional APIs have been deprecated and might
be removed in the next release.
A number of additional APIs have been introduced and some existing
functions have been deprecated and are scheduled for removal in the next
release. Please see the file doc/APIchanges for details along with
similar programmer-centric information.
Other notable changes
---------------------
- high quality dithering in swscale to fix banding issues
- ffmpeg is now interactive and various information can be turned on/off while its running
- resolution changing support in ffmpeg
- sdl output device
- optimizations in libavfilter that make it much faster
- split, buffer, select, lut, negate filters amongth others
- more than 50 new video filters from mplayers libmpcodecs
- many ARM NEON optimizations
- nonfree libfaad support for AAC decoding removed
- 4:4:4 H.264 decoding
- 9/10bit H.264 decoding
- Win64 Assembler support
- native MMSH/MMST support
- Windows TV demuxing
- native AMR-WB decoding
- native GSM-MS decoding
- SMPTE 302M decoding
- AVS encoding
Please see the Changelog file for a more detailed list of changes.
......@@ -682,8 +682,6 @@ static int decode_i_frame(FourXContext *f, const uint8_t *buf, int length){
int x, y;
const int width= f->avctx->width;
const int height= f->avctx->height;
uint16_t *dst= (uint16_t*)f->current_picture.data[0];
const int stride= f->current_picture.linesize[0]>>1;
const unsigned int bitstream_size= AV_RL32(buf);
unsigned int prestream_size;
const uint8_t *prestream;
......@@ -726,7 +724,6 @@ static int decode_i_frame(FourXContext *f, const uint8_t *buf, int length){
idct_put(f, x, y);
}
dst += 16*stride;
}
if(get_vlc2(&f->pre_gb, f->pre_vlc.table, ACDC_VLC_BITS, 3) != 256)
......
......@@ -3803,7 +3803,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
int err;
if(buf_index >= next_avc) {
if(buf_index >= buf_size) break;
if (buf_index >= buf_size - h->nal_length_size) break;
nalsize = 0;
for(i = 0; i < h->nal_length_size; i++)
nalsize = (nalsize << 8) | buf[buf_index++];
......
......@@ -1363,9 +1363,9 @@ static inline int vp3_dequant(Vp3DecodeContext *s, Vp3Fragment *frag,
case 1: // zero run
s->dct_tokens[plane][i]++;
i += (token >> 2) & 0x7f;
if(i>63){
if (i > 63) {
av_log(s->avctx, AV_LOG_ERROR, "Coefficient index overflow\n");
return -1;
return i;
}
block[perm[i]] = (token >> 9) * dequantizer[perm[i]];
i++;
......@@ -1570,7 +1570,10 @@ static void render_slice(Vp3DecodeContext *s, int slice)
/* invert DCT and place (or add) in final output */
if (s->all_fragments[i].coding_method == MODE_INTRA) {
vp3_dequant(s, s->all_fragments + i, plane, 0, block);
int index;
index = vp3_dequant(s, s->all_fragments + i, plane, 0, block);
if (index > 63)
continue;
if(s->avctx->idct_algo!=FF_IDCT_VP3)
block[0] += 128<<3;
s->dsp.idct_put(
......@@ -1578,7 +1581,10 @@ static void render_slice(Vp3DecodeContext *s, int slice)
stride,
block);
} else {
if (vp3_dequant(s, s->all_fragments + i, plane, 1, block)) {
int index = vp3_dequant(s, s->all_fragments + i, plane, 1, block);
if (index > 63)
continue;
if (index > 0) {
s->dsp.idct_add(
output_plane + first_pixel,
stride,
......
......@@ -120,7 +120,7 @@ typedef struct {
volatile int waiter_count;
HANDLE semaphore;
HANDLE waiters_done;
int is_broadcast;
volatile int is_broadcast;
} win32_cond_t;
static void pthread_cond_init(pthread_cond_t *cond, const void *unused_attr)
......@@ -187,6 +187,7 @@ static void pthread_cond_broadcast(pthread_cond_t *cond)
ReleaseSemaphore(win32_cond->semaphore, win32_cond->waiter_count, NULL);
pthread_mutex_unlock(&win32_cond->mtx_waiter_count);
WaitForSingleObject(win32_cond->waiters_done, INFINITE);
ResetEvent(win32_cond->waiters_done);
win32_cond->is_broadcast = 0;
} else
pthread_mutex_unlock(&win32_cond->mtx_waiter_count);
......
......@@ -110,7 +110,7 @@ void avfilter_register_all(void)
/* vsrc_buffer is a part of public API => registered unconditionally */
{
extern avfilter_vsrc_buffer;
extern AVFilter avfilter_vsrc_buffer;
avfilter_register(&avfilter_vsrc_buffer);
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册