Michael Niedermayer
bde6f6eadc
vc1dec: prevent v_edge_pos from becoming negative.
...
Fixes assertion failure
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
09de0ffeab
vc1dec: Fix null pointer dereference in vc1_decode_skip_blocks()
...
This handles the last frame being unavailable like all the other
code in vc1dec.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
df9b956751
lavc: fix decode_frame() third parameter semantics for video decoders
...
It's got_frame, not data size
12 years ago
Anton Khirnov
594d4d5df3
lavc: add a wrapper for AVCodecContext.get_buffer().
...
It will be useful in the upcoming transition to refcounted AVFrames.
12 years ago
Reimar Döffinger
16af29a7a6
vc1dec: add hacks to ensure static tables are initialized in open().
...
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
12 years ago
Michael Niedermayer
7845f8d282
vc1dec: do not allow field_mode to change after the first header
...
Fixes out of array accesses.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
ab8517b891
vc1dec: require a minimum of 2x2 for the edge pos. Avoid assertion failure
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
ccce723c6d
vc1dec: check first field slices, fix out of array read.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
3a04c18d89
vc1dec: prevent null ptr dereferences.
...
The added checks are in line with existing checks but should
probably be replaced by more advanced error concealment at some
point.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
8e749733c1
vc1dec: factorize srcU/V offseting out
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
b5f4836f8c
vc1: check image height, fix division by 0
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
d8246d475c
vc1dec: mark by assert that the default path cannot occur
...
Fixes CID703827, CID703828
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Hendrik Leppkes
33f2a49423
vc1: only disable interlaced b-frames for software decoding
...
Tested-by: Gwenole Beauchesne <gb.devel@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Hendrik Leppkes
b87ff34496
vc1: implement vc1 field interlaced dxva2 decoding
...
Tested-by: Gwenole Beauchesne <gb.devel@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Mashiat Sarker Shakkhar
35a35d49d2
Double motion vector range for HPEL interlaced picture in proper place
...
The existing code is not in the right place and it should cover both
interlaced frame and field pictures.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
12 years ago
Mashiat Sarker Shakkhar
eb657ecefd
vc1dec: Set opposite to the correct value for 1REF field pictures
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
12 years ago
Mashiat Sarker Shakkhar
7cc3c4e1d4
vc1dec: Invoke edge emulation regardless of MV precision for 1-MV chroma
...
This is required due to the way VC-1 handles chroma pull-back which may end
up causing negative chroma MV for zero luma MV. Edge emulation needs to be
invoked in such cases.
This only affects vertical component of chroma motion vector.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
12 years ago
Mashiat Sarker Shakkhar
88058d9a99
vc1dec: Set chroma reference field from REFFIELD for 1REF field pictures
...
Interlaced field pictures can have one or two reference pictures, signaled
by NUMREF syntax element. For single reference pictures, reference picture
is determined by REFFIELD syntax element.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
12 years ago
Mashiat Sarker Shakkhar
7fb35ee931
vc1dec: Use correct spelling of "opposite"
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years ago
Janne Grunau
6f8ef5320f
vc1dec: prevent memory leak in error path
...
Fixes CID732271.
12 years ago
Janne Grunau
714f5ab597
vc1dec: prevent memory leak on av_realloc error
12 years ago
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
12 years ago
Diego Biurrun
1218777ffd
avcodec: Convert some commented-out printf/av_log instances to av_dlog
12 years ago
Kostya Shishkov
4dc8c8386e
vc1dec: add flush function for WMV9 and VC-1 decoders
...
CC: libav-stable@libav.org
12 years ago
Alberto Delmás
ee769c6a7c
MSS2 decoder
...
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
12 years ago
Kostya Shishkov
7627c35a81
vc1: export some functions
...
This is a preparatory step for the MSS2 decoder which needs to use
the WMV9 decoder to decode some kinds of frames.
From the patch by Alberto Delmás <adelmas@gmail.com>
12 years ago
Michael Niedermayer
15e4bd65b1
vc1dec: support debug & FF_DEBUG_PICT_INFO.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Mashiat Sarker Shakkhar
9cc74c9f6e
vc1dec: Remove separate scaling function for interlaced field MVs
...
The scaling process for obtaining direct MVs from co-located field MVs
is the same for interlaced field and progressive pictures.
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
12 years ago
Mashiat Sarker Shakkhar
8379ea5e9f
vc1dec: Invoke edge_emulation regardless of MV precision
...
In VC-1 interlaced field pictures, chroma motion vectors can extend beyond
picture boundary even if luma vectors are bounded. The problem shows up
only for hpel interpolated MVs, and may be due to the way motion vectors
are scaled / cropped.
Thanks to Konstantin Shishkov for suggesting the fix. This fixes
long-known segfaults in MC-VC1.ts from videolan streams archive.
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
12 years ago
Mans Rullgard
cfb1091898
vc1dec: remove useless #include simple_idct.h
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Nicolas George
cc7eff1fa0
vc1dec: count ENDOFSEQ code in return value.
12 years ago
Michael Niedermayer
45838561f2
vc1dec: Override invalid macroblock quantizer
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
12 years ago
Michael Niedermayer
2bf369b60c
vc1: avoid reading beyond the last line in vc1_draw_sprites()
...
Fixes overread
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
12 years ago
Michael Niedermayer
1100acbab2
vc1dec: check that coded slice positions and interlacing match.
...
This fixes out of array writes
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
12 years ago
Michael Niedermayer
0aa907cfb1
vc1dec: Do not ignore ff_vc1_parse_frame_header_adv return value
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
12 years ago
Michael Niedermayer
22ce78a95e
vc1dec: dont apply the loop filter on fields
...
Fixes read of uninitialized memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
697edcc12a
vc1dec: dont attempt error concealment on field pictures.
...
This is not implemented and doesnt work.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Mashiat Sarker Shakkhar
082829520e
vc1dec: Do not use random pred_flag if motion vector data is skipped
...
This fixes SA10143.vc1 from test-suite. Also partially fixes MC-VC1.ts
from videolan streams archive.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Hendrik Leppkes
14ac47fcc7
vc1: signal interlaced and tff flag to the consumer
...
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Reviewed-by: Mashiat Sarker Shakkhar <mashiat.sarker@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
5e59a77cec
vc1dec: check that coded slice positions and interlacing match.
...
This fixes out of array writes
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
e985cfd18b
vc1dec: check end_mb_y / start_mb_y validity
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Martin Storsjö
00c3b67b8a
cosmetics: Align codec declarations
...
Also break some long lines, remove codec function placeholder comments
and add spaces in sample/pixel format lists.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Michael Niedermayer
a60a4d7041
vc1dec: Fix global array overread.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
1acc553e54
vc1dec: dont ignore ff_vc1_parse_frame_header_advs return value
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
e3bd61248f
vc1dec: avoid == -1 checks for errors.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
b378a23395
vc1dec: sanity check state used in get_mvdata_interlaced()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Mashiat Sarker Shakkhar
95b192de5d
vc1: Do not read from array if index is invalid.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Michael Niedermayer
d6eef545c1
vc1dec: move mquant zero check down.
...
This way it catches all cases, and prevents later segfaults.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Lou Logan
2d38081b4f
cosmetics: fix some typos
...
Patch attached.
From 2d4094fc0dcb4ccd0735eb7e1719e228ebb56bb9 Mon Sep 17 00:00:00 2001
From: Lou Logan <lou@lrcd.com>
Date: Mon, 12 Mar 2012 14:13:44 -0800
Subject: [PATCH] cosmetics: fix some typos
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago