Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
3fe6bbd5
Commit
3fe6bbd5
authored
13 years ago
by
Stefano Sabatini
Browse files
Options
Downloads
Patches
Plain Diff
libavfilter: implement avfilter_fill_frame_from_video_buffer_ref()
parent
c5354942
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
doc/APIchanges
+4
-0
4 additions, 0 deletions
doc/APIchanges
libavfilter/avcodec.c
+18
-0
18 additions, 0 deletions
libavfilter/avcodec.c
libavfilter/avcodec.h
+11
-0
11 additions, 0 deletions
libavfilter/avcodec.h
libavfilter/avfilter.h
+1
-1
1 addition, 1 deletion
libavfilter/avfilter.h
with
34 additions
and
1 deletion
doc/APIchanges
+
4
−
0
View file @
3fe6bbd5
...
@@ -13,6 +13,10 @@ libavutil: 2011-04-18
...
@@ -13,6 +13,10 @@ libavutil: 2011-04-18
API changes, most recent first:
API changes, most recent first:
2011-06-12 - xxxxxxx - lavfi 2.18.0 - avcodec.h
Add avfilter_get_video_buffer_ref_from_frame() function in
libavfilter/avcodec.h.
2011-06-12 - xxxxxxx - lavfi 2.17.0 - avfiltergraph.h
2011-06-12 - xxxxxxx - lavfi 2.17.0 - avfiltergraph.h
Add avfilter_inout_alloc() and avfilter_inout_free() functions.
Add avfilter_inout_alloc() and avfilter_inout_free() functions.
...
...
This diff is collapsed.
Click to expand it.
libavfilter/avcodec.c
+
18
−
0
View file @
3fe6bbd5
...
@@ -53,3 +53,21 @@ AVFilterBufferRef *avfilter_get_video_buffer_ref_from_frame(const AVFrame *frame
...
@@ -53,3 +53,21 @@ AVFilterBufferRef *avfilter_get_video_buffer_ref_from_frame(const AVFrame *frame
avfilter_copy_frame_props
(
picref
,
frame
);
avfilter_copy_frame_props
(
picref
,
frame
);
return
picref
;
return
picref
;
}
}
int
avfilter_fill_frame_from_video_buffer_ref
(
AVFrame
*
frame
,
const
AVFilterBufferRef
*
picref
)
{
if
(
!
picref
||
!
picref
->
video
||
!
frame
)
return
AVERROR
(
EINVAL
);
memcpy
(
frame
->
data
,
picref
->
data
,
sizeof
(
frame
->
data
));
memcpy
(
frame
->
linesize
,
picref
->
linesize
,
sizeof
(
frame
->
linesize
));
frame
->
pkt_pos
=
picref
->
pos
;
frame
->
interlaced_frame
=
picref
->
video
->
interlaced
;
frame
->
top_field_first
=
picref
->
video
->
top_field_first
;
frame
->
key_frame
=
picref
->
video
->
key_frame
;
frame
->
pict_type
=
picref
->
video
->
pict_type
;
frame
->
sample_aspect_ratio
=
picref
->
video
->
sample_aspect_ratio
;
return
0
;
}
This diff is collapsed.
Click to expand it.
libavfilter/avcodec.h
+
11
−
0
View file @
3fe6bbd5
...
@@ -46,6 +46,17 @@ void avfilter_copy_frame_props(AVFilterBufferRef *dst, const AVFrame *src);
...
@@ -46,6 +46,17 @@ void avfilter_copy_frame_props(AVFilterBufferRef *dst, const AVFrame *src);
*/
*/
AVFilterBufferRef
*
avfilter_get_video_buffer_ref_from_frame
(
const
AVFrame
*
frame
,
int
perms
);
AVFilterBufferRef
*
avfilter_get_video_buffer_ref_from_frame
(
const
AVFrame
*
frame
,
int
perms
);
/**
* Fill an AVFrame with the information stored in picref.
*
* @param frame an already allocated AVFrame
* @param picref a video buffer reference
* @return 0 in case of success, a negative AVERROR code in case of
* failure
*/
int
avfilter_fill_frame_from_video_buffer_ref
(
AVFrame
*
frame
,
const
AVFilterBufferRef
*
picref
);
/**
/**
* Add frame data to buffer_src.
* Add frame data to buffer_src.
*
*
...
...
This diff is collapsed.
Click to expand it.
libavfilter/avfilter.h
+
1
−
1
View file @
3fe6bbd5
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
#include
"libavutil/samplefmt.h"
#include
"libavutil/samplefmt.h"
#define LIBAVFILTER_VERSION_MAJOR 2
#define LIBAVFILTER_VERSION_MAJOR 2
#define LIBAVFILTER_VERSION_MINOR 1
7
#define LIBAVFILTER_VERSION_MINOR 1
8
#define LIBAVFILTER_VERSION_MICRO 0
#define LIBAVFILTER_VERSION_MICRO 0
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment