Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
7b3214d0
Commit
7b3214d0
authored
Feb 01, 2016
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc: add a field for passing AVHWFramesContext to encoders
parent
21f7cd4a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
1 deletion
+29
-1
APIchanges
doc/APIchanges
+3
-0
avcodec.h
libavcodec/avcodec.h
+12
-0
utils.c
libavcodec/utils.c
+13
-0
version.h
libavcodec/version.h
+1
-1
No files found.
doc/APIchanges
View file @
7b3214d0
...
@@ -13,6 +13,9 @@ libavutil: 2015-08-28
...
@@ -13,6 +13,9 @@ libavutil: 2015-08-28
API changes, most recent first:
API changes, most recent first:
2016-xx-xx - lavc 57.13.0 - avcodec.h
Add AVCodecContext.hw_frames_ctx.
2016-xx-xx - lavfi 6.2.0 - avfilter.h
2016-xx-xx - lavfi 6.2.0 - avfilter.h
xxxxxxx avfilter.h - Add AVFilterLink.hw_frames_ctx.
xxxxxxx avfilter.h - Add AVFilterLink.hw_frames_ctx.
xxxxxxx buffersrc.h - Add AVBufferSrcParameters and functions for handling it.
xxxxxxx buffersrc.h - Add AVBufferSrcParameters and functions for handling it.
...
...
libavcodec/avcodec.h
View file @
7b3214d0
...
@@ -2979,6 +2979,18 @@ typedef struct AVCodecContext {
...
@@ -2979,6 +2979,18 @@ typedef struct AVCodecContext {
AVPacketSideData
*
coded_side_data
;
AVPacketSideData
*
coded_side_data
;
int
nb_coded_side_data
;
int
nb_coded_side_data
;
/**
* Encoding only.
*
* For hardware encoders configured to use a hwaccel pixel format, this
* field should be set by the caller to a reference to the AVHWFramesContext
* describing input frames. AVHWFramesContext.format must be equal to
* AVCodecContext.pix_fmt.
*
* This field should be set before avcodec_open2() is called and is
* afterwards owned and managed by libavcodec.
*/
AVBufferRef
*
hw_frames_ctx
;
}
AVCodecContext
;
}
AVCodecContext
;
/**
/**
...
...
libavcodec/utils.c
View file @
7b3214d0
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
#include "libavutil/channel_layout.h"
#include "libavutil/channel_layout.h"
#include "libavutil/crc.h"
#include "libavutil/crc.h"
#include "libavutil/frame.h"
#include "libavutil/frame.h"
#include "libavutil/hwcontext.h"
#include "libavutil/internal.h"
#include "libavutil/internal.h"
#include "libavutil/mathematics.h"
#include "libavutil/mathematics.h"
#include "libavutil/pixdesc.h"
#include "libavutil/pixdesc.h"
...
@@ -1059,6 +1060,16 @@ FF_ENABLE_DEPRECATION_WARNINGS
...
@@ -1059,6 +1060,16 @@ FF_ENABLE_DEPRECATION_WARNINGS
avctx
->
time_base
.
den
);
avctx
->
time_base
.
den
);
goto
free_and_end
;
goto
free_and_end
;
}
}
if
(
avctx
->
hw_frames_ctx
)
{
AVHWFramesContext
*
frames_ctx
=
(
AVHWFramesContext
*
)
avctx
->
hw_frames_ctx
->
data
;
if
(
frames_ctx
->
format
!=
avctx
->
pix_fmt
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Mismatching AVCodecContext.pix_fmt and AVHWFramesContext.format
\n
"
);
ret
=
AVERROR
(
EINVAL
);
goto
free_and_end
;
}
}
}
}
if
(
avctx
->
codec
->
init
&&
!
(
avctx
->
active_thread_type
&
FF_THREAD_FRAME
))
{
if
(
avctx
->
codec
->
init
&&
!
(
avctx
->
active_thread_type
&
FF_THREAD_FRAME
))
{
...
@@ -1639,6 +1650,8 @@ av_cold int avcodec_close(AVCodecContext *avctx)
...
@@ -1639,6 +1650,8 @@ av_cold int avcodec_close(AVCodecContext *avctx)
av_freep
(
&
avctx
->
coded_side_data
);
av_freep
(
&
avctx
->
coded_side_data
);
avctx
->
nb_coded_side_data
=
0
;
avctx
->
nb_coded_side_data
=
0
;
av_buffer_unref
(
&
avctx
->
hw_frames_ctx
);
if
(
avctx
->
priv_data
&&
avctx
->
codec
&&
avctx
->
codec
->
priv_class
)
if
(
avctx
->
priv_data
&&
avctx
->
codec
&&
avctx
->
codec
->
priv_class
)
av_opt_free
(
avctx
->
priv_data
);
av_opt_free
(
avctx
->
priv_data
);
av_opt_free
(
avctx
);
av_opt_free
(
avctx
);
...
...
libavcodec/version.h
View file @
7b3214d0
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
#include "libavutil/version.h"
#include "libavutil/version.h"
#define LIBAVCODEC_VERSION_MAJOR 57
#define LIBAVCODEC_VERSION_MAJOR 57
#define LIBAVCODEC_VERSION_MINOR 1
2
#define LIBAVCODEC_VERSION_MINOR 1
3
#define LIBAVCODEC_VERSION_MICRO 0
#define LIBAVCODEC_VERSION_MICRO 0
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
...
...
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