Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
a16542e6
Commit
a16542e6
authored
Jun 20, 2008
by
Antoine Cellerier
Committed by
Jean-Paul Saman
Nov 12, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Random stuff. No functional difference.
Signed-off-by:
Jean-Paul Saman
<
jean-paul.saman@m2x.nl
>
parent
76a4102f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
25 deletions
+29
-25
modules/codec/davinci.c
modules/codec/davinci.c
+28
-19
modules/video_chroma/davinci.c
modules/video_chroma/davinci.c
+1
-6
No files found.
modules/codec/davinci.c
View file @
a16542e6
...
...
@@ -291,6 +291,10 @@ static void CloseVideoDecoder( vlc_object_t *p_this )
/* Exit the codec engine */
CERuntime_exit
();
/* Free 'DaVinci compliant' buffers */
FreeBuffer
(
&
p_sys
->
in
);
FreeBuffer
(
&
p_sys
->
out
);
free
(
p_sys
);
}
...
...
@@ -359,23 +363,17 @@ static picture_t *DecodeVideoBlock( decoder_t *p_dec, block_t **pp_block )
goto
error
;
}
/* Setup input arguments */
in_args
.
size
=
sizeof
(
in_args
);
in_args
.
numBytes
=
__MIN
(
p_block
->
i_buffer
,
p_sys
->
in
.
bufSizes
[
0
]
);
in_args
.
inputID
=
0
;
/* FIXME? */
/* Setup input buffer */
if
(
p_block
->
i_buffer
>
p_sys
->
in
.
bufSizes
[
0
]
)
{
#ifdef DEBUG_DAVINCI
if
(
p_block
->
i_buffer
>
p_sys
->
in
.
bufSizes
[
0
]
)
msg_Dbg
(
p_dec
,
"Woah! Not enough room to store the whole block"
);
#endif
memcpy
(
p_sys
->
in
.
bufs
[
0
],
p_block
->
p_buffer
,
p_sys
->
in
.
bufSizes
[
0
]
);
}
else
{
memcpy
(
p_sys
->
in
.
bufs
[
0
],
p_block
->
p_buffer
,
p_block
->
i_buffer
);
}
/* Setup input arguments */
in_args
.
size
=
sizeof
(
in_args
);
in_args
.
numBytes
=
__MIN
(
p_block
->
i_buffer
,
p_sys
->
in
.
bufSizes
[
0
]
);
in_args
.
inputID
=
0
;
/* FIXME */
memcpy
(
p_sys
->
in
.
bufs
[
0
],
p_block
->
p_buffer
,
in_args
.
numBytes
);
#if 0
/* This obviously doesn't work (at least for mpeg2 video */
...
...
@@ -439,12 +437,14 @@ static picture_t *DecodeVideoBlock( decoder_t *p_dec, block_t **pp_block )
/* That was easy :p */
/* Decode the video */
printf
(
"%s %s %d
\n
"
,
__FILE__
,
__func__
,
__LINE__
);
if
(
(
i
=
VIDDEC_process
(
p_sys
->
d
,
&
p_sys
->
in
,
&
p_sys
->
out
,
&
in_args
,
&
out_args
)
)
!=
VIDDEC_EOK
)
{
msg_Err
(
p_dec
,
"Video decoding failed (Error code: %ld, Extended erorr: %lx)"
,
i
,
out_args
.
extendedError
);
goto
error
;
}
printf
(
"%s %s %d
\n
"
,
__FILE__
,
__func__
,
__LINE__
);
#ifdef DEBUG_DAVINCI
msg_Info
(
p_dec
,
"%s %d"
,
__func__
,
__LINE__
);
...
...
@@ -546,7 +546,9 @@ static int AllocateBuffer( decoder_t *p_dec, XDAS_Int32 i_num,
{
int
i
;
#ifdef DEBUG_DAVINCI
msg_Info
(
p_dec
,
"Allocating buffers:"
);
#endif
buf
->
numBufs
=
i_num
;
buf
->
bufs
=
(
XDAS_Int8
**
)
malloc
(
buf
->
numBufs
*
sizeof
(
XDAS_Int8
*
)
);
...
...
@@ -566,12 +568,16 @@ static int AllocateBuffer( decoder_t *p_dec, XDAS_Int32 i_num,
for
(
i
=
0
;
i
<
i_num
;
i
++
)
{
#ifdef DEBUG_DAVINCI
msg_Info
(
p_dec
,
" %d: size %d Bytes"
,
i
,
(
int
)
pi_sizes
[
i
]
);
#endif
buf
->
bufSizes
[
i
]
=
pi_sizes
[
i
];
buf
->
bufs
[
i
]
=
Memory_contigAlloc
(
pi_sizes
[
i
],
Memory_DEFAULTALIGNMENT
);
if
(
!
buf
->
bufs
[
i
]
)
{
#ifdef DEBUG_DAVINCI
msg_Err
(
p_dec
,
"Failed to allocate buffer"
);
#endif
for
(
i
--
;
i
>=
0
;
i
--
)
{
Memory_contigFree
(
buf
->
bufs
[
i
],
buf
->
bufSizes
[
i
]
);
...
...
@@ -587,10 +593,13 @@ static int AllocateBuffer( decoder_t *p_dec, XDAS_Int32 i_num,
static
void
FreeBuffer
(
XDM_BufDesc
*
buf
)
{
if
(
buf
->
numBufs
!=
0
)
{
int
i
;
for
(
i
=
0
;
i
<
buf
->
numBufs
;
i
++
)
Memory_contigFree
(
buf
->
bufs
[
i
],
buf
->
bufSizes
[
i
]
);
free
(
buf
->
bufs
);
free
(
buf
->
bufSizes
);
buf
->
numBufs
=
0
;
}
}
modules/video_chroma/davinci.c
View file @
a16542e6
...
...
@@ -76,7 +76,7 @@ struct chroma_sys_t
*****************************************************************************/
vlc_module_begin
();
set_description
(
_
(
"Conversions using /dev/davinci_resizer"
)
);
set_capability
(
"chroma"
,
200
);
set_capability
(
"chroma"
,
0
/* FIXME once this module works */
);
set_callbacks
(
Open
,
Close
);
vlc_module_end
();
...
...
@@ -87,11 +87,6 @@ static int Open( vlc_object_t *p_this )
{
vout_thread_t
*
p_vout
=
(
vout_thread_t
*
)
p_this
;
if
(
p_vout
->
render
.
i_width
&
1
||
p_vout
->
render
.
i_height
&
1
)
{
return
-
1
;
}
switch
(
p_vout
->
render
.
i_chroma
)
{
case
VLC_FOURCC
(
'Y'
,
'V'
,
'1'
,
'2'
):
...
...
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