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
4a023d5b
Commit
4a023d5b
authored
Jun 01, 2013
by
Xidorn Quan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vda_h264_dec: remove check_format
Since this function cannot work anymore, this patch simply removes it.
parent
1fb52bf9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
46 deletions
+0
-46
vda_h264_dec.c
libavcodec/vda_h264_dec.c
+0
-46
No files found.
libavcodec/vda_h264_dec.c
View file @
4a023d5b
...
...
@@ -135,48 +135,6 @@ static av_cold int vdadec_close(AVCodecContext *avctx)
return
0
;
}
static
av_cold
int
check_format
(
AVCodecContext
*
avctx
)
{
AVCodecParserContext
*
parser
;
uint8_t
*
pout
;
int
psize
;
int
index
;
H264Context
*
h
;
int
ret
=
-
1
;
/* init parser & parse file */
parser
=
av_parser_init
(
avctx
->
codec
->
id
);
if
(
!
parser
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Failed to open H.264 parser.
\n
"
);
goto
final
;
}
parser
->
flags
=
PARSER_FLAG_COMPLETE_FRAMES
;
index
=
av_parser_parse2
(
parser
,
avctx
,
&
pout
,
&
psize
,
NULL
,
0
,
0
,
0
,
0
);
if
(
index
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Failed to parse this file.
\n
"
);
goto
release_parser
;
}
/* check if support */
h
=
parser
->
priv_data
;
switch
(
h
->
sps
.
bit_depth_luma
)
{
case
8
:
if
(
!
CHROMA444
(
h
)
&&
!
CHROMA422
(
h
))
{
// only this will H.264 decoder switch to hwaccel
ret
=
0
;
break
;
}
default:
av_log
(
avctx
,
AV_LOG_ERROR
,
"Unsupported file.
\n
"
);
}
release_parser:
av_parser_close
(
parser
);
final:
return
ret
;
}
static
av_cold
int
vdadec_init
(
AVCodecContext
*
avctx
)
{
VDADecoderContext
*
ctx
=
avctx
->
priv_data
;
...
...
@@ -194,10 +152,6 @@ static av_cold int vdadec_init(AVCodecContext *avctx)
ff_h264_vda_decoder
.
pix_fmts
=
vda_pixfmts
;
}
/* check if VDA supports this file */
if
(
check_format
(
avctx
)
<
0
)
goto
failed
;
/* init vda */
memset
(
vda_ctx
,
0
,
sizeof
(
struct
vda_context
));
vda_ctx
->
width
=
avctx
->
width
;
...
...
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