Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
c3fd61f5
Commit
c3fd61f5
authored
Aug 05, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cosmetics + removed a few debugs.
parent
ae39fb41
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
modules/codec/libass.c
modules/codec/libass.c
+14
-9
No files found.
modules/codec/libass.c
View file @
c3fd61f5
...
@@ -122,9 +122,7 @@ static void RegionDraw( subpicture_region_t *p_region, ass_image_t *p_img );
...
@@ -122,9 +122,7 @@ static void RegionDraw( subpicture_region_t *p_region, ass_image_t *p_img );
//#define DEBUG_REGION
//#define DEBUG_REGION
/*****************************************************************************
/*****************************************************************************
* Create: Open CSRI renderer
* Create: Open libass decoder.
*****************************************************************************
* Comment me.
*****************************************************************************/
*****************************************************************************/
static
int
Create
(
vlc_object_t
*
p_this
)
static
int
Create
(
vlc_object_t
*
p_this
)
{
{
...
@@ -183,8 +181,6 @@ static int Create( vlc_object_t *p_this )
...
@@ -183,8 +181,6 @@ static int Create( vlc_object_t *p_this )
/*****************************************************************************
/*****************************************************************************
* Destroy: finish
* Destroy: finish
*****************************************************************************
* Comment me.
*****************************************************************************/
*****************************************************************************/
static
void
Destroy
(
vlc_object_t
*
p_this
)
static
void
Destroy
(
vlc_object_t
*
p_this
)
{
{
...
@@ -221,9 +217,7 @@ static void DecSysRelease( decoder_sys_t *p_sys )
...
@@ -221,9 +217,7 @@ static void DecSysRelease( decoder_sys_t *p_sys )
}
}
/****************************************************************************
/****************************************************************************
* DecodeBlock: the whole thing
* DecodeBlock:
****************************************************************************
* This function must be fed with complete subtitles units.
****************************************************************************/
****************************************************************************/
static
subpicture_t
*
DecodeBlock
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
static
subpicture_t
*
DecodeBlock
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
{
{
...
@@ -300,6 +294,9 @@ static subpicture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
...
@@ -300,6 +294,9 @@ static subpicture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
return
p_spu
;
return
p_spu
;
}
}
/****************************************************************************
*
****************************************************************************/
static
void
DestroySubpicture
(
subpicture_t
*
p_subpic
)
static
void
DestroySubpicture
(
subpicture_t
*
p_subpic
)
{
{
DecSysRelease
(
p_subpic
->
p_sys
->
p_dec_sys
);
DecSysRelease
(
p_subpic
->
p_sys
->
p_dec_sys
);
...
@@ -369,7 +366,7 @@ static void UpdateRegions( video_format_t *p_fmt, spu_t *p_spu,
...
@@ -369,7 +366,7 @@ static void UpdateRegions( video_format_t *p_fmt, spu_t *p_spu,
p_subpic
->
i_original_picture_width
=
fmt
.
i_width
;
p_subpic
->
i_original_picture_width
=
fmt
.
i_width
;
SubpictureReleaseRegions
(
p_spu
,
p_subpic
);
SubpictureReleaseRegions
(
p_spu
,
p_subpic
);
/*
TODO
to improve efficiency we merge regions that are close minimizing
/*
XXX
to improve efficiency we merge regions that are close minimizing
* the lost surface.
* the lost surface.
* libass tends to create a lot of small regions and thus spu engine
* libass tends to create a lot of small regions and thus spu engine
* reinstanciate a lot the scaler, and as we do not support subpel blending
* reinstanciate a lot the scaler, and as we do not support subpel blending
...
@@ -449,7 +446,9 @@ static int BuildRegions( spu_t *p_spu, rectangle_t *p_region, int i_max_region,
...
@@ -449,7 +446,9 @@ static int BuildRegions( spu_t *p_spu, rectangle_t *p_region, int i_max_region,
ass_image_t
*
p_tmp
;
ass_image_t
*
p_tmp
;
int
i_count
;
int
i_count
;
#ifdef DEBUG_REGION
int64_t
i_ck_start
=
mdate
();
int64_t
i_ck_start
=
mdate
();
#endif
for
(
p_tmp
=
p_img_list
,
i_count
=
0
;
p_tmp
!=
NULL
;
p_tmp
=
p_tmp
->
next
)
for
(
p_tmp
=
p_img_list
,
i_count
=
0
;
p_tmp
!=
NULL
;
p_tmp
=
p_tmp
->
next
)
i_count
++
;
i_count
++
;
...
@@ -537,7 +536,9 @@ static int BuildRegions( spu_t *p_spu, rectangle_t *p_region, int i_max_region,
...
@@ -537,7 +536,9 @@ static int BuildRegions( spu_t *p_spu, rectangle_t *p_region, int i_max_region,
}
}
}
}
}
}
#ifdef DEBUG_REGION
msg_Err
(
p_spu
,
"Merging %d and %d"
,
i_best_i
,
i_best_j
);
msg_Err
(
p_spu
,
"Merging %d and %d"
,
i_best_i
,
i_best_j
);
#endif
r_add
(
&
region
[
i_best_i
],
&
region
[
i_best_j
]
);
r_add
(
&
region
[
i_best_i
],
&
region
[
i_best_j
]
);
if
(
i_best_j
+
1
<
i_region
)
if
(
i_best_j
+
1
<
i_region
)
...
@@ -550,8 +551,10 @@ static int BuildRegions( spu_t *p_spu, rectangle_t *p_region, int i_max_region,
...
@@ -550,8 +551,10 @@ static int BuildRegions( spu_t *p_spu, rectangle_t *p_region, int i_max_region,
for
(
int
n
=
0
;
n
<
i_region
;
n
++
)
for
(
int
n
=
0
;
n
<
i_region
;
n
++
)
p_region
[
n
]
=
region
[
n
];
p_region
[
n
]
=
region
[
n
];
#ifdef DEBUG_REGION
int64_t
i_ck_time
=
mdate
()
-
i_ck_start
;
int64_t
i_ck_time
=
mdate
()
-
i_ck_start
;
msg_Err
(
p_spu
,
"ASS: %d objects merged into %d region in %d micros"
,
i_count
,
i_region
,
(
int
)(
i_ck_time
)
);
msg_Err
(
p_spu
,
"ASS: %d objects merged into %d region in %d micros"
,
i_count
,
i_region
,
(
int
)(
i_ck_time
)
);
#endif
return
i_region
;
return
i_region
;
}
}
...
@@ -628,6 +631,8 @@ static void SubpictureReleaseRegions( spu_t *p_spu, subpicture_t *p_subpic )
...
@@ -628,6 +631,8 @@ static void SubpictureReleaseRegions( spu_t *p_spu, subpicture_t *p_subpic )
static
ass_handle_t
*
AssHandleYield
(
decoder_t
*
p_dec
)
static
ass_handle_t
*
AssHandleYield
(
decoder_t
*
p_dec
)
{
{
vlc_mutex_t
*
p_lock
=
var_AcquireMutex
(
"libass"
);
vlc_mutex_t
*
p_lock
=
var_AcquireMutex
(
"libass"
);
if
(
!
p_lock
)
return
NULL
;
ass_handle_t
*
p_ass
=
NULL
;
ass_handle_t
*
p_ass
=
NULL
;
ass_library_t
*
p_library
=
NULL
;
ass_library_t
*
p_library
=
NULL
;
...
...
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