avformat/matroskadec: fix off by 1 error in matroska_read_seek()

Fixes out of array read

Fixes: vp9-opus-crash.webm

Found-by: Dale Curtis <dalecurtis@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
x86: huffyuvdsp: add SSE2 median prediction

From 5010c to 4566 on lagarith YUY2.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/huffyuvdsp: Change w to intptr in add_hfyu_median_pred() and add_hfyu_left_pred()

This avoids potential issues with the high 32bits being random in x86-64 asm

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
x86: huffyuvdsp: add_hfyu_left_pred_bgr32

          C   MMX   SSE2
Cycles: 3092  1053  578

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tests: Add MPEG4 nsse test

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
x86: dsputilenc: move all the function prototypes together

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
x86: dsputilenc: convert ff_sse{8, 16}_mmx() to yasm

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Fix VDPAU decoders, regression since f2f99f07.
Support raw dvdsub palette as stored on normal dvd's

This is how the palette is stored on dvd's. Currently
only xbmc passes the palette information to libavcodec
this way.
Check return value of avio_seek and avoid modifying state if it fails

The code still modifies state if the timestamp is not found. Not
sure exactly how to avoid that.
asf hacks
if av_read_packet returns AVERROR_IO, we are done. ffmpeg's codecs might or might not handle returning any completed demuxed packets correctly
added: Ticket #7187, TV Teletext support for DVB EBU Teletext streams
Don't accept mpegts PMT that isn't current
Don't reparse PMT unless it's version has changed
Read PID timestamps as well as PCR timestamps to find location in mpegts stream
Get stream durations using read_timestamp
changed: allow 4 second skew between streams in mov before attempting to seek
fixed: memleak in mpegts demuxer on some malformed (??) mpegts files with too large pes packets

at-visions sample file brokenStream.mpg
Speed up mpegts av_find_stream_info