Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
231f80d5
Unverified
Commit
231f80d5
authored
May 21, 2021
by
Bruno Korbar
Committed by
GitHub
May 21, 2021
Browse files
remove deprecated function calls (#3859)
Co-authored-by:
Prabhat Roy
<
prabhatroy@fb.com
>
parent
1a10a9a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
torchvision/csrc/io/decoder/util.cpp
torchvision/csrc/io/decoder/util.cpp
+11
-11
No files found.
torchvision/csrc/io/decoder/util.cpp
View file @
231f80d5
...
@@ -49,8 +49,8 @@ inline size_t getSize(const AVSubtitleRect& x) {
...
@@ -49,8 +49,8 @@ inline size_t getSize(const AVSubtitleRect& x) {
switch
(
y
.
type
)
{
switch
(
y
.
type
)
{
case
SUBTITLE_BITMAP
:
case
SUBTITLE_BITMAP
:
for
(
int
i
=
0
;
i
<
y
.
nb_colors
;
++
i
)
{
for
(
int
i
=
0
;
i
<
y
.
nb_colors
;
++
i
)
{
s
+=
sizeof
(
y
.
pict
.
linesize
[
i
]);
s
+=
sizeof
(
y
.
linesize
[
i
]);
s
+=
y
.
pict
.
linesize
[
i
];
s
+=
y
.
linesize
[
i
];
}
}
break
;
break
;
case
SUBTITLE_TEXT
:
case
SUBTITLE_TEXT
:
...
@@ -93,14 +93,14 @@ inline bool serializeItem(
...
@@ -93,14 +93,14 @@ inline bool serializeItem(
switch
(
x
.
type
)
{
switch
(
x
.
type
)
{
case
SUBTITLE_BITMAP
:
case
SUBTITLE_BITMAP
:
for
(
int
i
=
0
;
i
<
x
.
nb_colors
;
++
i
)
{
for
(
int
i
=
0
;
i
<
x
.
nb_colors
;
++
i
)
{
if
(
!
serializeItem
(
d
,
l
,
p
,
x
.
pict
.
linesize
[
i
]))
{
if
(
!
serializeItem
(
d
,
l
,
p
,
x
.
linesize
[
i
]))
{
return
false
;
return
false
;
}
}
if
(
p
+
x
.
pict
.
linesize
[
i
]
>
l
)
{
if
(
p
+
x
.
linesize
[
i
]
>
l
)
{
return
false
;
return
false
;
}
}
memcpy
(
d
+
p
,
x
.
pict
.
data
[
i
],
x
.
pict
.
linesize
[
i
]);
memcpy
(
d
+
p
,
x
.
data
[
i
],
x
.
linesize
[
i
]);
p
+=
x
.
pict
.
linesize
[
i
];
p
+=
x
.
linesize
[
i
];
}
}
return
true
;
return
true
;
case
SUBTITLE_TEXT
:
{
case
SUBTITLE_TEXT
:
{
...
@@ -172,15 +172,15 @@ inline bool deserializeItem(
...
@@ -172,15 +172,15 @@ inline bool deserializeItem(
switch
(
x
.
type
)
{
switch
(
x
.
type
)
{
case
SUBTITLE_BITMAP
:
case
SUBTITLE_BITMAP
:
for
(
int
i
=
0
;
i
<
x
.
nb_colors
;
++
i
)
{
for
(
int
i
=
0
;
i
<
x
.
nb_colors
;
++
i
)
{
if
(
!
deserializeItem
(
y
,
l
,
p
,
x
.
pict
.
linesize
[
i
]))
{
if
(
!
deserializeItem
(
y
,
l
,
p
,
x
.
linesize
[
i
]))
{
return
false
;
return
false
;
}
}
if
(
p
+
x
.
pict
.
linesize
[
i
]
>
l
)
{
if
(
p
+
x
.
linesize
[
i
]
>
l
)
{
return
false
;
return
false
;
}
}
x
.
pict
.
data
[
i
]
=
(
uint8_t
*
)
av_malloc
(
x
.
pict
.
linesize
[
i
]);
x
.
data
[
i
]
=
(
uint8_t
*
)
av_malloc
(
x
.
linesize
[
i
]);
memcpy
(
x
.
pict
.
data
[
i
],
y
+
p
,
x
.
pict
.
linesize
[
i
]);
memcpy
(
x
.
data
[
i
],
y
+
p
,
x
.
linesize
[
i
]);
p
+=
x
.
pict
.
linesize
[
i
];
p
+=
x
.
linesize
[
i
];
}
}
return
true
;
return
true
;
case
SUBTITLE_TEXT
:
{
case
SUBTITLE_TEXT
:
{
...
...
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