Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
53efb758
Commit
53efb758
authored
Oct 10, 2011
by
Gwenole Beauchesne
Committed by
Diego Biurrun
Oct 10, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vaapi: Fix VC-1 decoding (reconstruct bitstream TTFRM correctly).
Signed-off-by:
Diego Biurrun
<
diego@biurrun.de
>
parent
c2ed91de
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
vaapi_vc1.c
libavcodec/vaapi_vc1.c
+13
-1
No files found.
libavcodec/vaapi_vc1.c
View file @
53efb758
...
@@ -116,6 +116,18 @@ static inline VAMvModeVC1 vc1_get_MVMODE2(VC1Context *v)
...
@@ -116,6 +116,18 @@ static inline VAMvModeVC1 vc1_get_MVMODE2(VC1Context *v)
return
0
;
return
0
;
}
}
/** Reconstruct bitstream TTFRM (7.1.1.41, Table-53) */
static
inline
int
vc1_get_TTFRM
(
VC1Context
*
v
)
{
switch
(
v
->
ttfrm
)
{
case
TT_8X8
:
return
0
;
case
TT_8X4
:
return
1
;
case
TT_4X8
:
return
2
;
case
TT_4X4
:
return
3
;
}
return
0
;
}
/** Pack Libav bitplanes into a VABitPlaneBuffer element */
/** Pack Libav bitplanes into a VABitPlaneBuffer element */
static
inline
void
vc1_pack_bitplanes
(
uint8_t
*
bitplane
,
int
n
,
const
uint8_t
*
ff_bp
[
3
],
int
x
,
int
y
,
int
stride
)
static
inline
void
vc1_pack_bitplanes
(
uint8_t
*
bitplane
,
int
n
,
const
uint8_t
*
ff_bp
[
3
],
int
x
,
int
y
,
int
stride
)
{
{
...
@@ -239,7 +251,7 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t
...
@@ -239,7 +251,7 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t
pic_param
->
transform_fields
.
value
=
0
;
/* reset all bits */
pic_param
->
transform_fields
.
value
=
0
;
/* reset all bits */
pic_param
->
transform_fields
.
bits
.
variable_sized_transform_flag
=
v
->
vstransform
;
pic_param
->
transform_fields
.
bits
.
variable_sized_transform_flag
=
v
->
vstransform
;
pic_param
->
transform_fields
.
bits
.
mb_level_transform_type_flag
=
v
->
ttmbf
;
pic_param
->
transform_fields
.
bits
.
mb_level_transform_type_flag
=
v
->
ttmbf
;
pic_param
->
transform_fields
.
bits
.
frame_level_transform_type
=
v
->
ttfrm
;
pic_param
->
transform_fields
.
bits
.
frame_level_transform_type
=
v
c1_get_TTFRM
(
v
)
;
pic_param
->
transform_fields
.
bits
.
transform_ac_codingset_idx1
=
v
->
c_ac_table_index
;
pic_param
->
transform_fields
.
bits
.
transform_ac_codingset_idx1
=
v
->
c_ac_table_index
;
pic_param
->
transform_fields
.
bits
.
transform_ac_codingset_idx2
=
v
->
y_ac_table_index
;
pic_param
->
transform_fields
.
bits
.
transform_ac_codingset_idx2
=
v
->
y_ac_table_index
;
pic_param
->
transform_fields
.
bits
.
intra_transform_dc_table
=
v
->
s
.
dc_table_index
;
pic_param
->
transform_fields
.
bits
.
intra_transform_dc_table
=
v
->
s
.
dc_table_index
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment