Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
5335dbfb
Commit
5335dbfb
authored
Jan 19, 2012
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved inlined functions defined in vlc_picture.h to src/misc/picture.c
parent
a7bd6bde
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
43 deletions
+57
-43
include/vlc_picture.h
include/vlc_picture.h
+6
-43
src/libvlccore.sym
src/libvlccore.sym
+5
-0
src/misc/picture.c
src/misc/picture.c
+46
-0
No files found.
include/vlc_picture.h
View file @
5335dbfb
...
@@ -165,22 +165,13 @@ VLC_API void picture_Delete( picture_t * );
...
@@ -165,22 +165,13 @@ VLC_API void picture_Delete( picture_t * );
*
*
* It returns the given picture for convenience.
* It returns the given picture for convenience.
*/
*/
static
inline
picture_t
*
picture_Hold
(
picture_t
*
p_picture
)
VLC_API
picture_t
*
picture_Hold
(
picture_t
*
p_picture
);
{
if
(
p_picture
->
pf_release
)
p_picture
->
i_refcount
++
;
return
p_picture
;
}
/**
/**
* This function will release a picture.
* This function will release a picture.
* It will not have any effect on picture obtained from vout
* It will not have any effect on picture obtained from vout
*/
*/
static
inline
void
picture_Release
(
picture_t
*
p_picture
)
VLC_API
void
picture_Release
(
picture_t
*
p_picture
);
{
/* FIXME why do we let pf_release handle the i_refcount ? */
if
(
p_picture
->
pf_release
)
p_picture
->
pf_release
(
p_picture
);
}
/**
/**
* This function will return true if you are not the only owner of the
* This function will return true if you are not the only owner of the
...
@@ -188,36 +179,12 @@ static inline void picture_Release( picture_t *p_picture )
...
@@ -188,36 +179,12 @@ static inline void picture_Release( picture_t *p_picture )
*
*
* It is only valid if it is created using picture_New.
* It is only valid if it is created using picture_New.
*/
*/
static
inline
bool
picture_IsReferenced
(
picture_t
*
p_picture
)
VLC_API
bool
picture_IsReferenced
(
picture_t
*
p_picture
);
{
return
p_picture
->
i_refcount
>
1
;
}
/**
* Cleanup quantization matrix data and set to 0
*/
static
inline
void
picture_CleanupQuant
(
picture_t
*
p_pic
)
{
free
(
p_pic
->
p_q
);
p_pic
->
p_q
=
NULL
;
p_pic
->
i_qstride
=
0
;
p_pic
->
i_qtype
=
0
;
}
/**
/**
* This function will copy all picture dynamic properties.
* This function will copy all picture dynamic properties.
*/
*/
static
inline
void
picture_CopyProperties
(
picture_t
*
p_dst
,
const
picture_t
*
p_src
)
VLC_API
void
picture_CopyProperties
(
picture_t
*
p_dst
,
const
picture_t
*
p_src
);
{
p_dst
->
date
=
p_src
->
date
;
p_dst
->
b_force
=
p_src
->
b_force
;
p_dst
->
b_progressive
=
p_src
->
b_progressive
;
p_dst
->
i_nb_fields
=
p_src
->
i_nb_fields
;
p_dst
->
b_top_field_first
=
p_src
->
b_top_field_first
;
/* FIXME: copy ->p_q and ->p_qstride */
}
/**
/**
* This function will reset a picture information (properties and quantizers).
* This function will reset a picture information (properties and quantizers).
...
@@ -242,11 +209,7 @@ VLC_API void plane_CopyPixels( plane_t *p_dst, const plane_t *p_src );
...
@@ -242,11 +209,7 @@ VLC_API void plane_CopyPixels( plane_t *p_dst, const plane_t *p_src );
* \param p_dst pointer to the destination picture.
* \param p_dst pointer to the destination picture.
* \param p_src pointer to the source picture.
* \param p_src pointer to the source picture.
*/
*/
static
inline
void
picture_Copy
(
picture_t
*
p_dst
,
const
picture_t
*
p_src
)
VLC_API
void
picture_Copy
(
picture_t
*
p_dst
,
const
picture_t
*
p_src
);
{
picture_CopyPixels
(
p_dst
,
p_src
);
picture_CopyProperties
(
p_dst
,
p_src
);
}
/**
/**
* This function will export a picture to an encoded bitstream.
* This function will export a picture to an encoded bitstream.
...
...
src/libvlccore.sym
View file @
5335dbfb
...
@@ -310,6 +310,11 @@ path_sanitize
...
@@ -310,6 +310,11 @@ path_sanitize
picture_BlendSubpicture
picture_BlendSubpicture
picture_CopyPixels
picture_CopyPixels
picture_Delete
picture_Delete
picture_Hold
picture_Release
picture_IsReferenced
picture_CopyProperties
picture_Copy
picture_Export
picture_Export
picture_fifo_Delete
picture_fifo_Delete
picture_fifo_Flush
picture_fifo_Flush
...
...
src/misc/picture.c
View file @
5335dbfb
...
@@ -102,6 +102,14 @@ static void PictureReleaseCallback( picture_t *p_picture )
...
@@ -102,6 +102,14 @@ static void PictureReleaseCallback( picture_t *p_picture )
/*****************************************************************************
/*****************************************************************************
*
*
*****************************************************************************/
*****************************************************************************/
static
void
picture_CleanupQuant
(
picture_t
*
p_pic
)
{
free
(
p_pic
->
p_q
);
p_pic
->
p_q
=
NULL
;
p_pic
->
i_qstride
=
0
;
p_pic
->
i_qtype
=
0
;
}
void
picture_Reset
(
picture_t
*
p_picture
)
void
picture_Reset
(
picture_t
*
p_picture
)
{
{
/* */
/* */
...
@@ -274,6 +282,25 @@ void picture_Delete( picture_t *p_picture )
...
@@ -274,6 +282,25 @@ void picture_Delete( picture_t *p_picture )
free
(
p_picture
);
free
(
p_picture
);
}
}
picture_t
*
picture_Hold
(
picture_t
*
p_picture
)
{
if
(
p_picture
->
pf_release
)
p_picture
->
i_refcount
++
;
return
p_picture
;
}
void
picture_Release
(
picture_t
*
p_picture
)
{
/* FIXME why do we let pf_release handle the i_refcount ? */
if
(
p_picture
->
pf_release
)
p_picture
->
pf_release
(
p_picture
);
}
bool
picture_IsReferenced
(
picture_t
*
p_picture
)
{
return
p_picture
->
i_refcount
>
1
;
}
/*****************************************************************************
/*****************************************************************************
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -322,6 +349,25 @@ void plane_CopyPixels( plane_t *p_dst, const plane_t *p_src )
...
@@ -322,6 +349,25 @@ void plane_CopyPixels( plane_t *p_dst, const plane_t *p_src )
}
}
}
}
void
picture_CopyProperties
(
picture_t
*
p_dst
,
const
picture_t
*
p_src
)
{
p_dst
->
date
=
p_src
->
date
;
p_dst
->
b_force
=
p_src
->
b_force
;
p_dst
->
b_progressive
=
p_src
->
b_progressive
;
p_dst
->
i_nb_fields
=
p_src
->
i_nb_fields
;
p_dst
->
b_top_field_first
=
p_src
->
b_top_field_first
;
/* FIXME: copy ->p_q and ->p_qstride */
}
void
picture_Copy
(
picture_t
*
p_dst
,
const
picture_t
*
p_src
)
{
picture_CopyPixels
(
p_dst
,
p_src
);
picture_CopyProperties
(
p_dst
,
p_src
);
}
/*****************************************************************************
/*****************************************************************************
*
*
*****************************************************************************/
*****************************************************************************/
...
...
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