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
8b22a9d3
Commit
8b22a9d3
authored
12 years ago
by
Scott LaVarnway
Committed by
Gerrit Code Review
12 years ago
Browse files
Options
Download
Plain Diff
Merge "Use FRAGMENT_DATA struct in pbi"
parents
cdc18067
2146c68d
v1.14.0-linphone
1.4.X
experimental
feature/update_to_v1.9.0-linphone
feature/uwp_nuget
forest
frame_parallel
highbitdepth
indianrunnerduck
javanwhistlingduck
khakicampbell
linphone
linphone-android
linphone-old
longtailedduck
m29-baseline
m31-baseline
m49-2623
m52-2743
m54-2840
m56-2924
m66-3359
m68-3440
mandarinduck
mcw
mcw2
nextgen
nextgenv2
pcs-2013
playground
sandbox/Jingning/experimental
sandbox/Jingning/transcode
sandbox/Jingning/vpx
sandbox/aconverse@google.com/ansbench
sandbox/debargha/playground
sandbox/hkuang/frame_parallel
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
stable-vp9-decoder
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
v1.3.0
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
vp8/decoder/decodframe.c
+19
-19
vp8/decoder/decodframe.c
vp8/decoder/onyxd_if.c
+1
-1
vp8/decoder/onyxd_if.c
vp8/decoder/onyxd_int.h
+1
-5
vp8/decoder/onyxd_int.h
vp8/vp8_dx_iface.c
+1
-7
vp8/vp8_dx_iface.c
with
22 additions
and
32 deletions
vp8/decoder/decodframe.c
+
19
−
19
View file @
8b22a9d3
...
@@ -828,8 +828,8 @@ static void setup_token_decoder(VP8D_COMP *pbi,
...
@@ -828,8 +828,8 @@ static void setup_token_decoder(VP8D_COMP *pbi,
unsigned
int
partition_idx
;
unsigned
int
partition_idx
;
unsigned
int
fragment_idx
;
unsigned
int
fragment_idx
;
unsigned
int
num_token_partitions
;
unsigned
int
num_token_partitions
;
const
unsigned
char
*
first_fragment_end
=
pbi
->
fragments
[
0
]
+
const
unsigned
char
*
first_fragment_end
=
pbi
->
fragments
.
ptrs
[
0
]
+
pbi
->
fragment
_
sizes
[
0
];
pbi
->
fragment
s
.
sizes
[
0
];
TOKEN_PARTITION
multi_token_partition
=
TOKEN_PARTITION
multi_token_partition
=
(
TOKEN_PARTITION
)
vp8_read_literal
(
&
pbi
->
mbc
[
8
],
2
);
(
TOKEN_PARTITION
)
vp8_read_literal
(
&
pbi
->
mbc
[
8
],
2
);
...
@@ -839,10 +839,10 @@ static void setup_token_decoder(VP8D_COMP *pbi,
...
@@ -839,10 +839,10 @@ static void setup_token_decoder(VP8D_COMP *pbi,
/* Check for partitions within the fragments and unpack the fragments
/* Check for partitions within the fragments and unpack the fragments
* so that each fragment pointer points to its corresponding partition. */
* so that each fragment pointer points to its corresponding partition. */
for
(
fragment_idx
=
0
;
fragment_idx
<
pbi
->
num_
fragments
;
++
fragment_idx
)
for
(
fragment_idx
=
0
;
fragment_idx
<
pbi
->
fragments
.
count
;
++
fragment_idx
)
{
{
unsigned
int
fragment_size
=
pbi
->
fragment
_
sizes
[
fragment_idx
];
unsigned
int
fragment_size
=
pbi
->
fragment
s
.
sizes
[
fragment_idx
];
const
unsigned
char
*
fragment_end
=
pbi
->
fragments
[
fragment_idx
]
+
const
unsigned
char
*
fragment_end
=
pbi
->
fragments
.
ptrs
[
fragment_idx
]
+
fragment_size
;
fragment_size
;
/* Special case for handling the first partition since we have already
/* Special case for handling the first partition since we have already
* read its size. */
* read its size. */
...
@@ -850,16 +850,16 @@ static void setup_token_decoder(VP8D_COMP *pbi,
...
@@ -850,16 +850,16 @@ static void setup_token_decoder(VP8D_COMP *pbi,
{
{
/* Size of first partition + token partition sizes element */
/* Size of first partition + token partition sizes element */
ptrdiff_t
ext_first_part_size
=
token_part_sizes
-
ptrdiff_t
ext_first_part_size
=
token_part_sizes
-
pbi
->
fragments
[
0
]
+
3
*
(
num_token_partitions
-
1
);
pbi
->
fragments
.
ptrs
[
0
]
+
3
*
(
num_token_partitions
-
1
);
fragment_size
-=
(
unsigned
int
)
ext_first_part_size
;
fragment_size
-=
(
unsigned
int
)
ext_first_part_size
;
if
(
fragment_size
>
0
)
if
(
fragment_size
>
0
)
{
{
pbi
->
fragment
_
sizes
[
0
]
=
(
unsigned
int
)
ext_first_part_size
;
pbi
->
fragment
s
.
sizes
[
0
]
=
(
unsigned
int
)
ext_first_part_size
;
/* The fragment contains an additional partition. Move to
/* The fragment contains an additional partition. Move to
* next. */
* next. */
fragment_idx
++
;
fragment_idx
++
;
pbi
->
fragments
[
fragment_idx
]
=
pbi
->
fragments
[
0
]
+
pbi
->
fragments
.
ptrs
[
fragment_idx
]
=
pbi
->
fragments
.
ptrs
[
0
]
+
pbi
->
fragment
_
sizes
[
0
];
pbi
->
fragment
s
.
sizes
[
0
];
}
}
}
}
/* Split the chunk into partitions read from the bitstream */
/* Split the chunk into partitions read from the bitstream */
...
@@ -868,12 +868,12 @@ static void setup_token_decoder(VP8D_COMP *pbi,
...
@@ -868,12 +868,12 @@ static void setup_token_decoder(VP8D_COMP *pbi,
ptrdiff_t
partition_size
=
read_available_partition_size
(
ptrdiff_t
partition_size
=
read_available_partition_size
(
pbi
,
pbi
,
token_part_sizes
,
token_part_sizes
,
pbi
->
fragments
[
fragment_idx
],
pbi
->
fragments
.
ptrs
[
fragment_idx
],
first_fragment_end
,
first_fragment_end
,
fragment_end
,
fragment_end
,
fragment_idx
-
1
,
fragment_idx
-
1
,
num_token_partitions
);
num_token_partitions
);
pbi
->
fragment
_
sizes
[
fragment_idx
]
=
(
unsigned
int
)
partition_size
;
pbi
->
fragment
s
.
sizes
[
fragment_idx
]
=
(
unsigned
int
)
partition_size
;
fragment_size
-=
(
unsigned
int
)
partition_size
;
fragment_size
-=
(
unsigned
int
)
partition_size
;
assert
(
fragment_idx
<=
num_token_partitions
);
assert
(
fragment_idx
<=
num_token_partitions
);
if
(
fragment_size
>
0
)
if
(
fragment_size
>
0
)
...
@@ -881,19 +881,19 @@ static void setup_token_decoder(VP8D_COMP *pbi,
...
@@ -881,19 +881,19 @@ static void setup_token_decoder(VP8D_COMP *pbi,
/* The fragment contains an additional partition.
/* The fragment contains an additional partition.
* Move to next. */
* Move to next. */
fragment_idx
++
;
fragment_idx
++
;
pbi
->
fragments
[
fragment_idx
]
=
pbi
->
fragments
.
ptrs
[
fragment_idx
]
=
pbi
->
fragments
[
fragment_idx
-
1
]
+
partition_size
;
pbi
->
fragments
.
ptrs
[
fragment_idx
-
1
]
+
partition_size
;
}
}
}
}
}
}
pbi
->
num_
fragments
=
num_token_partitions
+
1
;
pbi
->
fragments
.
count
=
num_token_partitions
+
1
;
for
(
partition_idx
=
1
;
partition_idx
<
pbi
->
num_
fragments
;
++
partition_idx
)
for
(
partition_idx
=
1
;
partition_idx
<
pbi
->
fragments
.
count
;
++
partition_idx
)
{
{
if
(
vp8dx_start_decode
(
bool_decoder
,
if
(
vp8dx_start_decode
(
bool_decoder
,
pbi
->
fragments
[
partition_idx
],
pbi
->
fragments
.
ptrs
[
partition_idx
],
pbi
->
fragment
_
sizes
[
partition_idx
]))
pbi
->
fragment
s
.
sizes
[
partition_idx
]))
vpx_internal_error
(
&
pbi
->
common
.
error
,
VPX_CODEC_MEM_ERROR
,
vpx_internal_error
(
&
pbi
->
common
.
error
,
VPX_CODEC_MEM_ERROR
,
"Failed to allocate bool decoder %d"
,
"Failed to allocate bool decoder %d"
,
partition_idx
);
partition_idx
);
...
@@ -983,8 +983,8 @@ int vp8_decode_frame(VP8D_COMP *pbi)
...
@@ -983,8 +983,8 @@ int vp8_decode_frame(VP8D_COMP *pbi)
vp8_reader
*
const
bc
=
&
pbi
->
mbc
[
8
];
vp8_reader
*
const
bc
=
&
pbi
->
mbc
[
8
];
VP8_COMMON
*
const
pc
=
&
pbi
->
common
;
VP8_COMMON
*
const
pc
=
&
pbi
->
common
;
MACROBLOCKD
*
const
xd
=
&
pbi
->
mb
;
MACROBLOCKD
*
const
xd
=
&
pbi
->
mb
;
const
unsigned
char
*
data
=
pbi
->
fragments
[
0
];
const
unsigned
char
*
data
=
pbi
->
fragments
.
ptrs
[
0
];
const
unsigned
char
*
data_end
=
data
+
pbi
->
fragment
_
sizes
[
0
];
const
unsigned
char
*
data_end
=
data
+
pbi
->
fragment
s
.
sizes
[
0
];
ptrdiff_t
first_partition_length_in_bytes
;
ptrdiff_t
first_partition_length_in_bytes
;
int
i
,
j
,
k
,
l
;
int
i
,
j
,
k
,
l
;
...
...
This diff is collapsed.
Click to expand it.
vp8/decoder/onyxd_if.c
+
1
−
1
View file @
8b22a9d3
...
@@ -282,7 +282,7 @@ static int swap_frame_buffers (VP8_COMMON *cm)
...
@@ -282,7 +282,7 @@ static int swap_frame_buffers (VP8_COMMON *cm)
int
check_fragments_for_errors
(
VP8D_COMP
*
pbi
)
int
check_fragments_for_errors
(
VP8D_COMP
*
pbi
)
{
{
if
(
!
pbi
->
ec_active
&&
if
(
!
pbi
->
ec_active
&&
pbi
->
num_
fragments
<=
1
&&
pbi
->
fragment
_
sizes
[
0
]
==
0
)
pbi
->
fragments
.
count
<=
1
&&
pbi
->
fragment
s
.
sizes
[
0
]
==
0
)
{
{
VP8_COMMON
*
cm
=
&
pbi
->
common
;
VP8_COMMON
*
cm
=
&
pbi
->
common
;
...
...
This diff is collapsed.
Click to expand it.
vp8/decoder/onyxd_int.h
+
1
−
5
View file @
8b22a9d3
...
@@ -54,10 +54,7 @@ typedef struct VP8D_COMP
...
@@ -54,10 +54,7 @@ typedef struct VP8D_COMP
VP8D_CONFIG
oxcf
;
VP8D_CONFIG
oxcf
;
FRAGMENT_DATA
fragments
;
const
unsigned
char
*
fragments
[
MAX_PARTITIONS
];
unsigned
int
fragment_sizes
[
MAX_PARTITIONS
];
unsigned
int
num_fragments
;
#if CONFIG_MULTITHREAD
#if CONFIG_MULTITHREAD
/* variable for threading */
/* variable for threading */
...
@@ -103,7 +100,6 @@ typedef struct VP8D_COMP
...
@@ -103,7 +100,6 @@ typedef struct VP8D_COMP
#endif
#endif
int
ec_enabled
;
int
ec_enabled
;
int
ec_active
;
int
ec_active
;
int
input_fragments
;
int
decoded_key_frame
;
int
decoded_key_frame
;
int
independent_partitions
;
int
independent_partitions
;
int
frame_corrupt_residual
;
int
frame_corrupt_residual
;
...
...
This diff is collapsed.
Click to expand it.
vp8/vp8_dx_iface.c
+
1
−
7
View file @
8b22a9d3
...
@@ -598,13 +598,7 @@ static vpx_codec_err_t vp8_decode(vpx_codec_alg_priv_t *ctx,
...
@@ -598,13 +598,7 @@ static vpx_codec_err_t vp8_decode(vpx_codec_alg_priv_t *ctx,
}
}
/* update the pbi fragment data */
/* update the pbi fragment data */
ctx
->
pbi
->
num_fragments
=
ctx
->
fragments
.
count
;
ctx
->
pbi
->
fragments
=
ctx
->
fragments
;
ctx
->
pbi
->
input_fragments
=
ctx
->
fragments
.
enabled
;
vpx_memcpy
(
ctx
->
pbi
->
fragments
,
ctx
->
fragments
.
ptrs
,
sizeof
(
ctx
->
fragments
.
ptrs
));
vpx_memcpy
(
ctx
->
pbi
->
fragment_sizes
,
ctx
->
fragments
.
sizes
,
sizeof
(
ctx
->
fragments
.
sizes
));
ctx
->
user_priv
=
user_priv
;
ctx
->
user_priv
=
user_priv
;
if
(
vp8dx_receive_compressed_data
(
ctx
->
pbi
,
data_sz
,
data
,
deadline
))
if
(
vp8dx_receive_compressed_data
(
ctx
->
pbi
,
data_sz
,
data
,
deadline
))
...
...
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