Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
BC
public
external
libvpx
Commits
a95758c8
Commit
a95758c8
authored
10 years ago
by
Hangyu Kuang
Committed by
Gerrit Code Review
10 years ago
Browse files
Options
Download
Plain Diff
Merge "Make the api behavior conform to api spec."
parents
e3212a14
70500747
v1.14.0-linphone
1.4.X
feature/update_to_v1.9.0-linphone
feature/uwp_nuget
highbitdepth
indianrunnerduck
javanwhistlingduck
khakicampbell
linphone
linphone-android
linphone-old
longtailedduck
m49-2623
m52-2743
m54-2840
m56-2924
m66-3359
m68-3440
mandarinduck
nextgen
nextgenv2
sandbox/Jingning/experimental
sandbox/Jingning/vpx
sandbox/aconverse@google.com/ansbench
sandbox/hkuang@google.com/decode
sandbox/jimbankoski@google.com/proposed-aom
sandbox/jingning@google.com/decoder_test_suite
sandbox/jingning@google.com/experimental
sandbox/jzern@google.com/test
sandbox/wangch@google.com/vp9
sandbox/yaowu@google.com/mergeaom
v1.12.0-linphone
v1.6.1_linphone
v1.7.0-linphone
v1.9.0-linphone
v1.9.0
v1.9.0-rc1
v1.8.2
v1.8.1
v1.8.0
v1.7.0
v1.6.1
v1.6.0
v1.5.0
v1.4.0
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
test/decode_test_driver.cc
+20
-11
test/decode_test_driver.cc
vp8/vp8_dx_iface.c
+9
-0
vp8/vp8_dx_iface.c
vp9/vp9_dx_iface.c
+9
-2
vp9/vp9_dx_iface.c
with
38 additions
and
13 deletions
test/decode_test_driver.cc
+
20
−
11
View file @
a95758c8
...
@@ -67,24 +67,33 @@ void DecoderTest::RunLoop(CompressedVideoSource *video,
...
@@ -67,24 +67,33 @@ void DecoderTest::RunLoop(CompressedVideoSource *video,
const
vpx_codec_dec_cfg_t
&
dec_cfg
)
{
const
vpx_codec_dec_cfg_t
&
dec_cfg
)
{
Decoder
*
const
decoder
=
codec_
->
CreateDecoder
(
dec_cfg
,
0
);
Decoder
*
const
decoder
=
codec_
->
CreateDecoder
(
dec_cfg
,
0
);
ASSERT_TRUE
(
decoder
!=
NULL
);
ASSERT_TRUE
(
decoder
!=
NULL
);
bool
end_of_file
=
false
;
// Decode frames.
// Decode frames.
for
(
video
->
Begin
();
!::
testing
::
Test
::
HasFailure
()
&&
video
->
cxdata
()
;
for
(
video
->
Begin
();
!::
testing
::
Test
::
HasFailure
()
&&
!
end_of_file
;
video
->
Next
())
{
video
->
Next
())
{
PreDecodeFrameHook
(
*
video
,
decoder
);
PreDecodeFrameHook
(
*
video
,
decoder
);
vpx_codec_stream_info_t
stream_info
;
vpx_codec_stream_info_t
stream_info
;
stream_info
.
sz
=
sizeof
(
stream_info
);
stream_info
.
sz
=
sizeof
(
stream_info
);
const
vpx_codec_err_t
res_peek
=
decoder
->
PeekStream
(
video
->
cxdata
(),
video
->
frame_size
(),
if
(
video
->
cxdata
()
!=
NULL
)
{
&
stream_info
);
const
vpx_codec_err_t
res_peek
=
decoder
->
PeekStream
(
video
->
cxdata
(),
HandlePeekResult
(
decoder
,
video
,
res_peek
);
video
->
frame_size
(),
ASSERT_FALSE
(
::
testing
::
Test
::
HasFailure
());
&
stream_info
);
HandlePeekResult
(
decoder
,
video
,
res_peek
);
vpx_codec_err_t
res_dec
=
decoder
->
DecodeFrame
(
video
->
cxdata
(),
ASSERT_FALSE
(
::
testing
::
Test
::
HasFailure
());
video
->
frame_size
());
if
(
!
HandleDecodeResult
(
res_dec
,
*
video
,
decoder
))
vpx_codec_err_t
res_dec
=
decoder
->
DecodeFrame
(
video
->
cxdata
(),
break
;
video
->
frame_size
());
if
(
!
HandleDecodeResult
(
res_dec
,
*
video
,
decoder
))
break
;
}
else
{
// Signal end of the file to the decoder.
const
vpx_codec_err_t
res_dec
=
decoder
->
DecodeFrame
(
NULL
,
0
);
ASSERT_EQ
(
VPX_CODEC_OK
,
res_dec
)
<<
decoder
->
DecodeError
();
end_of_file
=
true
;
}
DxDataIterator
dec_iter
=
decoder
->
GetDxData
();
DxDataIterator
dec_iter
=
decoder
->
GetDxData
();
const
vpx_image_t
*
img
=
NULL
;
const
vpx_image_t
*
img
=
NULL
;
...
...
This diff is collapsed.
Click to expand it.
vp8/vp8_dx_iface.c
+
9
−
0
View file @
a95758c8
...
@@ -60,6 +60,7 @@ struct vpx_codec_alg_priv
...
@@ -60,6 +60,7 @@ struct vpx_codec_alg_priv
vpx_decrypt_cb
decrypt_cb
;
vpx_decrypt_cb
decrypt_cb
;
void
*
decrypt_state
;
void
*
decrypt_state
;
vpx_image_t
img
;
vpx_image_t
img
;
int
flushed
;
int
img_setup
;
int
img_setup
;
struct
frame_buffers
yv12_frame_buffers
;
struct
frame_buffers
yv12_frame_buffers
;
void
*
user_priv
;
void
*
user_priv
;
...
@@ -88,6 +89,7 @@ static void vp8_init_ctx(vpx_codec_ctx_t *ctx)
...
@@ -88,6 +89,7 @@ static void vp8_init_ctx(vpx_codec_ctx_t *ctx)
ctx
->
priv
->
alg_priv
->
si
.
sz
=
sizeof
(
ctx
->
priv
->
alg_priv
->
si
);
ctx
->
priv
->
alg_priv
->
si
.
sz
=
sizeof
(
ctx
->
priv
->
alg_priv
->
si
);
ctx
->
priv
->
alg_priv
->
decrypt_cb
=
NULL
;
ctx
->
priv
->
alg_priv
->
decrypt_cb
=
NULL
;
ctx
->
priv
->
alg_priv
->
decrypt_state
=
NULL
;
ctx
->
priv
->
alg_priv
->
decrypt_state
=
NULL
;
ctx
->
priv
->
alg_priv
->
flushed
=
0
;
ctx
->
priv
->
init_flags
=
ctx
->
init_flags
;
ctx
->
priv
->
init_flags
=
ctx
->
init_flags
;
if
(
ctx
->
config
.
dec
)
if
(
ctx
->
config
.
dec
)
...
@@ -328,6 +330,13 @@ static vpx_codec_err_t vp8_decode(vpx_codec_alg_priv_t *ctx,
...
@@ -328,6 +330,13 @@ static vpx_codec_err_t vp8_decode(vpx_codec_alg_priv_t *ctx,
unsigned
int
resolution_change
=
0
;
unsigned
int
resolution_change
=
0
;
unsigned
int
w
,
h
;
unsigned
int
w
,
h
;
if
(
data
==
NULL
&&
data_sz
==
0
)
{
ctx
->
flushed
=
1
;
return
VPX_CODEC_OK
;
}
/* Reset flushed when receiving a valid frame */
ctx
->
flushed
=
0
;
/* Update the input fragment data */
/* Update the input fragment data */
if
(
update_fragments
(
ctx
,
data
,
data_sz
,
&
res
)
<=
0
)
if
(
update_fragments
(
ctx
,
data
,
data_sz
,
&
res
)
<=
0
)
...
...
This diff is collapsed.
Click to expand it.
vp9/vp9_dx_iface.c
+
9
−
2
View file @
a95758c8
...
@@ -40,6 +40,7 @@ struct vpx_codec_alg_priv {
...
@@ -40,6 +40,7 @@ struct vpx_codec_alg_priv {
void
*
decrypt_state
;
void
*
decrypt_state
;
vpx_image_t
img
;
vpx_image_t
img
;
int
img_avail
;
int
img_avail
;
int
flushed
;
int
invert_tile_order
;
int
invert_tile_order
;
int
frame_parallel_decode
;
// frame-based threading.
int
frame_parallel_decode
;
// frame-based threading.
...
@@ -69,6 +70,7 @@ static vpx_codec_err_t decoder_init(vpx_codec_ctx_t *ctx,
...
@@ -69,6 +70,7 @@ static vpx_codec_err_t decoder_init(vpx_codec_ctx_t *ctx,
ctx
->
priv
->
alg_priv
=
alg_priv
;
ctx
->
priv
->
alg_priv
=
alg_priv
;
ctx
->
priv
->
alg_priv
->
si
.
sz
=
sizeof
(
ctx
->
priv
->
alg_priv
->
si
);
ctx
->
priv
->
alg_priv
->
si
.
sz
=
sizeof
(
ctx
->
priv
->
alg_priv
->
si
);
ctx
->
priv
->
init_flags
=
ctx
->
init_flags
;
ctx
->
priv
->
init_flags
=
ctx
->
init_flags
;
ctx
->
priv
->
alg_priv
->
flushed
=
0
;
ctx
->
priv
->
alg_priv
->
frame_parallel_decode
=
ctx
->
priv
->
alg_priv
->
frame_parallel_decode
=
(
ctx
->
init_flags
&
VPX_CODEC_USE_FRAME_THREADING
);
(
ctx
->
init_flags
&
VPX_CODEC_USE_FRAME_THREADING
);
...
@@ -403,8 +405,13 @@ static vpx_codec_err_t decoder_decode(vpx_codec_alg_priv_t *ctx,
...
@@ -403,8 +405,13 @@ static vpx_codec_err_t decoder_decode(vpx_codec_alg_priv_t *ctx,
uint32_t
frame_sizes
[
8
];
uint32_t
frame_sizes
[
8
];
int
frame_count
;
int
frame_count
;
if
(
data
==
NULL
||
data_sz
==
0
)
if
(
data
==
NULL
&&
data_sz
==
0
)
{
return
VPX_CODEC_INVALID_PARAM
;
ctx
->
flushed
=
1
;
return
VPX_CODEC_OK
;
}
// Reset flushed when receiving a valid frame.
ctx
->
flushed
=
0
;
res
=
parse_superframe_index
(
data
,
data_sz
,
frame_sizes
,
&
frame_count
,
res
=
parse_superframe_index
(
data
,
data_sz
,
frame_sizes
,
&
frame_count
,
ctx
->
decrypt_cb
,
ctx
->
decrypt_state
);
ctx
->
decrypt_cb
,
ctx
->
decrypt_state
);
...
...
This diff is collapsed.
Click to expand it.
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets