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
fa30a0a5
Commit
fa30a0a5
authored
Jun 16, 2017
by
James Darnley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/x86/mpegenc: check IDCT permutation type is a valid value
parent
155f071b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
mpegvideoenc_template.c
libavcodec/x86/mpegvideoenc_template.c
+7
-1
No files found.
libavcodec/x86/mpegvideoenc_template.c
View file @
fa30a0a5
...
@@ -322,7 +322,7 @@ static int RENAME(dct_quantize)(MpegEncContext *s,
...
@@ -322,7 +322,7 @@ static int RENAME(dct_quantize)(MpegEncContext *s,
block
[
0x3E
]
=
temp_block
[
0x3D
];
block
[
0x33
]
=
temp_block
[
0x36
];
block
[
0x3E
]
=
temp_block
[
0x3D
];
block
[
0x33
]
=
temp_block
[
0x36
];
block
[
0x2F
]
=
temp_block
[
0x2F
];
block
[
0x37
]
=
temp_block
[
0x37
];
block
[
0x2F
]
=
temp_block
[
0x2F
];
block
[
0x37
]
=
temp_block
[
0x37
];
block
[
0x3B
]
=
temp_block
[
0x3E
];
block
[
0x3F
]
=
temp_block
[
0x3F
];
block
[
0x3B
]
=
temp_block
[
0x3E
];
block
[
0x3F
]
=
temp_block
[
0x3F
];
}
else
{
}
else
if
(
s
->
idsp
.
perm_type
==
FF_IDCT_PERM_NONE
)
{
if
(
last_non_zero_p1
<=
1
)
goto
end
;
if
(
last_non_zero_p1
<=
1
)
goto
end
;
block
[
0x01
]
=
temp_block
[
0x01
];
block
[
0x01
]
=
temp_block
[
0x01
];
block
[
0x08
]
=
temp_block
[
0x08
];
block
[
0x10
]
=
temp_block
[
0x10
];
block
[
0x08
]
=
temp_block
[
0x08
];
block
[
0x10
]
=
temp_block
[
0x10
];
...
@@ -366,6 +366,12 @@ static int RENAME(dct_quantize)(MpegEncContext *s,
...
@@ -366,6 +366,12 @@ static int RENAME(dct_quantize)(MpegEncContext *s,
block
[
0x3D
]
=
temp_block
[
0x3D
];
block
[
0x36
]
=
temp_block
[
0x36
];
block
[
0x3D
]
=
temp_block
[
0x3D
];
block
[
0x36
]
=
temp_block
[
0x36
];
block
[
0x2F
]
=
temp_block
[
0x2F
];
block
[
0x37
]
=
temp_block
[
0x37
];
block
[
0x2F
]
=
temp_block
[
0x2F
];
block
[
0x37
]
=
temp_block
[
0x37
];
block
[
0x3E
]
=
temp_block
[
0x3E
];
block
[
0x3F
]
=
temp_block
[
0x3F
];
block
[
0x3E
]
=
temp_block
[
0x3E
];
block
[
0x3F
]
=
temp_block
[
0x3F
];
}
else
{
av_log
(
s
,
AV_LOG_DEBUG
,
"s->idsp.perm_type: %d
\n
"
,
(
int
)
s
->
idsp
.
perm_type
);
av_assert0
(
s
->
idsp
.
perm_type
==
FF_IDCT_PERM_NONE
||
s
->
idsp
.
perm_type
==
FF_IDCT_PERM_LIBMPEG2
||
s
->
idsp
.
perm_type
==
FF_IDCT_PERM_SIMPLE
);
}
}
end:
end:
return
last_non_zero_p1
-
1
;
return
last_non_zero_p1
-
1
;
...
...
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