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
f96a0b41
Commit
f96a0b41
authored
Jul 28, 2008
by
Rafaël Carré
Committed by
Jean-Paul Saman
Nov 12, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up davinci codec debugging messages
Signed-off-by:
Jean-Paul Saman
<
jean-paul.saman@m2x.nl
>
parent
519cac7a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
38 deletions
+38
-38
modules/codec/davinci/auddec.c
modules/codec/davinci/auddec.c
+2
-3
modules/codec/davinci/davinci.c
modules/codec/davinci/davinci.c
+10
-8
modules/codec/davinci/davinci.h
modules/codec/davinci/davinci.h
+1
-2
modules/codec/davinci/viddec.c
modules/codec/davinci/viddec.c
+20
-8
modules/codec/davinci/videnc.c
modules/codec/davinci/videnc.c
+5
-17
No files found.
modules/codec/davinci/auddec.c
View file @
f96a0b41
...
...
@@ -343,9 +343,8 @@ static aout_buffer_t *DecodeAudioBlock( decoder_t *p_dec, block_t **pp_block )
i
=
AUDDEC_process
(
p_sys
->
d
,
&
p_sys
->
in
,
&
p_sys
->
out
,
&
in_args
,
&
out_args
);
if
(
i
!=
AUDDEC_EOK
)
{
msg_Err
(
p_dec
,
"Audio decoding failed (Error code: %d, "
"Extended error: %x)"
,
i
,
(
int
)
out_args
.
extendedError
);
PrintExtendedError
(
p_dec
,
out_args
.
extendedError
);
msg_Err
(
p_dec
,
"Audio decoding failed: %s"
,
davinci_GetExtendedError
(
out_args
.
extendedError
)
);
if
(
i
==
AUDDEC_ERUNTIME
||
out_args
.
bytesConsumed
==
0
||
XDM_ISFATALERROR
(
out_args
.
extendedError
)
)
{
...
...
modules/codec/davinci/davinci.c
View file @
f96a0b41
...
...
@@ -197,22 +197,24 @@ const char *ppsz_engine_error[] = {
//[Engine_ENOTFOUND] = "Entity was not found",
};
void
__PrintExtendedError
(
vlc_object_t
*
p_this
,
XDAS_Int32
error
)
const
char
*
davinci_GetExtendedError
(
XDAS_Int32
error
)
{
if
(
XDM_ISAPPLIEDCONCEALMENT
(
error
)
)
msg_Err
(
p_this
,
" Applied bit concealment"
)
;
return
"Applied bit concealment"
;
if
(
XDM_ISINSUFFICIENTDATA
(
error
)
)
msg_Err
(
p_this
,
" Insufficient data"
)
;
return
"Insufficient data"
;
if
(
XDM_ISCORRUPTEDDATA
(
error
)
)
msg_Err
(
p_this
,
" Corrupted data"
)
;
return
"Corrupted data"
;
if
(
XDM_ISCORRUPTEDHEADER
(
error
)
)
msg_Err
(
p_this
,
" Corrupted header"
)
;
return
"Corrupted header"
;
if
(
XDM_ISUNSUPPORTEDINPUT
(
error
)
)
msg_Err
(
p_this
,
" Unsupported input"
)
;
return
"Unsupported input"
;
if
(
XDM_ISUNSUPPORTEDPARAM
(
error
)
)
msg_Err
(
p_this
,
" Unsupported param"
)
;
return
"Unsupported param"
;
if
(
XDM_ISFATALERROR
(
error
)
)
msg_Err
(
p_this
,
" Fatal error"
);
return
"Fatal error"
;
return
""
;
}
void
__PrintAvailableAlgorithms
(
vlc_object_t
*
p_this
,
const
char
*
psz_engine
)
...
...
modules/codec/davinci/davinci.h
View file @
f96a0b41
...
...
@@ -51,8 +51,7 @@ void CloseVideoEncoder( vlc_object_t * );
int
__AllocateBuffer
(
vlc_object_t
*
,
XDAS_Int32
,
XDAS_Int32
*
,
XDM_BufDesc
*
);
#define AllocateBuffer( a, b, c, d ) __AllocateBuffer( VLC_OBJECT( a ), b, c, d )
void
FreeBuffer
(
XDM_BufDesc
*
);
void
__PrintExtendedError
(
vlc_object_t
*
,
XDAS_Int32
);
#define PrintExtendedError( a, b ) __PrintExtendedError( VLC_OBJECT( a ), b )
const
char
*
davinci_GetExtendedError
(
XDAS_Int32
);
void
__PrintAvailableAlgorithms
(
vlc_object_t
*
,
const
char
*
);
#define PrintAvailableAlgorithms( a, b ) __PrintAvailableAlgorithms( VLC_OBJECT( a ), b )
XDAS_Int32
VlcChromaToXdm
(
vlc_fourcc_t
);
...
...
modules/codec/davinci/viddec.c
View file @
f96a0b41
...
...
@@ -319,12 +319,25 @@ static picture_t *DecodeVideoBlockInner( decoder_t *p_dec, block_t **pp_block, i
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: %d, "
"Extended error: %x)"
,
i
,
(
int
)
out_args
.
extendedError
);
PrintExtendedError
(
p_dec
,
out_args
.
extendedError
);
if
(
i_extra
==
0
&&
p_dec
->
fmt_in
.
i_extra
>
0
)
msg_Err
(
p_dec
,
"Video decoding failed: %s"
,
davinci_GetExtendedError
(
out_args
.
extendedError
)
);
#if 0
if( (unsigned int)out_args.extendedError == 0x402 )
{
msg_Err
(
p_dec
,
"Trying again with p_extra"
);
printf("frame was %d bytes\n",(unsigned int)in_args.numBytes);
unsigned int j;
for(j=0;j<(unsigned int)in_args.numBytes;j++)
printf("%.2x ",p_sys->in.bufs[0][j]&0xff);
printf("\n");
CERuntime_exit();
abort();
}
#endif
if
(
i_extra
==
0
&&
p_dec
->
fmt_in
.
i_extra
>
0
)
{
/* FIXME : make sure this is correct with the API */
msg_Dbg
(
p_dec
,
"Trying again with p_extra"
);
return
DecodeVideoBlockInner
(
p_dec
,
pp_block
,
p_dec
->
fmt_in
.
i_extra
);
}
goto
error
;
...
...
@@ -336,9 +349,8 @@ static picture_t *DecodeVideoBlockInner( decoder_t *p_dec, block_t **pp_block, i
goto
error
;
}
#ifdef DEBUG_DAVINCI
msg_Dbg
(
p_dec
,
"Bytes consumed: %d"
,
(
int
)
out_args
.
bytesConsumed
);
#endif
if
(
in_args
.
numBytes
>
out_args
.
bytesConsumed
)
msg_Err
(
p_dec
,
"%d bytes were not consumed"
,
(
int
)(
out_args
.
bytesConsumed
-
in_args
.
numBytes
)
);
p_block
->
p_buffer
+=
out_args
.
bytesConsumed
-
i_extra
;
p_block
->
i_buffer
-=
out_args
.
bytesConsumed
-
i_extra
;
...
...
modules/codec/davinci/videnc.c
View file @
f96a0b41
...
...
@@ -26,7 +26,7 @@
*****************************************************************************/
#include "davinci.h"
#include <assert.h>
#include <ti/sdo/ce/video/videnc.h>
/*****************************************************************************
...
...
@@ -275,11 +275,7 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pic )
}
/* Copy input picture */
if
(
p_pic
->
i_planes
!=
p_sys
->
in
.
numBufs
)
{
msg_Err
(
p_enc
,
"Ahem ... looks like I assumed something wrong. Please investigate."
);
goto
error
;
}
assert
(
p_pic
->
i_planes
==
p_sys
->
in
.
numBufs
);
for
(
i
=
0
;
i
<
p_pic
->
i_planes
;
i
++
)
{
...
...
@@ -289,7 +285,6 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pic )
/* Configure input */
in_args
.
size
=
sizeof
(
in_args
);
/* Heh, that was useless ... */
/* Configure output */
memset
(
&
out_args
,
0
,
sizeof
(
out_args
)
);
...
...
@@ -300,15 +295,13 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pic )
&
in_args
,
&
out_args
);
if
(
i
!=
VIDENC_EOK
)
{
msg_Err
(
p_enc
,
"Video encoding failed (Error code: %d, "
"Extended erorr: %x)"
,
i
,
(
int
)
out_args
.
extendedError
);
PrintExtendedError
(
p_enc
,
out_args
.
extendedError
);
msg_Err
(
p_enc
,
"Video encoding failed: %s"
,
davinci_GetExtendedError
(
out_args
.
extendedError
)
);
goto
error
;
}
/* Print some info */
msg_Info
(
p_enc
,
"Encoder info:"
);
msg_Info
(
p_enc
,
" Bytes generated: %d"
,
(
int
)
out_args
.
bytesGenerated
);
msg_Info
(
p_enc
,
"Bytes generated: %d"
,
(
int
)
out_args
.
bytesGenerated
);
/* Put everything in the block */
if
(
out_args
.
bytesGenerated
<=
0
)
...
...
@@ -346,11 +339,6 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pic )
p_enc
->
fmt_in
.
video
.
i_frame_rate_base
/
p_enc
->
fmt_in
.
video
.
i_frame_rate
;
/* Looks like we're done */
#ifdef DEBUG_DAVINCI
msg_Info
(
p_enc
,
"Yay! Frame encoded correctly"
);
#endif
return
p_block
;
error:
...
...
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