[FFmpeg-devel] [PATCH 1/1] avcodec/vaapi_encode: add frame-skip func
Michael Niedermayer
michael at niedermayer.cc
Thu Nov 15 12:57:19 EET 2018
On Wed, Nov 14, 2018 at 03:38:57PM +0800, Jing SUN wrote:
> frame-skip is required to implement network
> bandwidth self-adaptive vaapi encoding.
> To make a frame skipped, allocate its frame
> side data of AV_FRAME_DATA_SKIP_FRAME type
> and set its value to 1.
>
> Signed-off-by: Jing SUN <jing.a.sun at intel.com>
> ---
> libavcodec/vaapi_encode.c | 132 ++++++++++++++++++++++++++++++++++++++++++++--
> libavcodec/vaapi_encode.h | 5 ++
> libavutil/frame.c | 1 +
> libavutil/frame.h | 5 ++
> 4 files changed, 139 insertions(+), 4 deletions(-)
breaks build
make
CC libavcodec/vaapi_encode.o
libavcodec/vaapi_encode.c: In function ‘vaapi_encode_issue’:
libavcodec/vaapi_encode.c:478:9: error: unknown type name ‘VAEncMiscParameterSkipFrame’
VAEncMiscParameterSkipFrame *skip_param;
^
libavcodec/vaapi_encode.c:483:26: error: ‘VAEncMiscParameterSkipFrame’ undeclared (first use in this function)
sizeof(VAEncMiscParameterSkipFrame)));
^
libavcodec/vaapi_encode.c:483:26: note: each undeclared identifier is reported only once for each function it appears in
libavcodec/vaapi_encode.c:499:52: error: ‘VAEncMiscParameterTypeSkipFrame’ undeclared (first use in this function)
misc_param->type = (VAEncMiscParameterType)VAEncMiscParameterTypeSkipFrame;
^
libavcodec/vaapi_encode.c:500:52: error: expected expression before ‘)’ token
skip_param = (VAEncMiscParameterSkipFrame *)misc_param->data;
^
libavcodec/vaapi_encode.c:501:19: error: request for member ‘skip_frame_flag’ in something not a structure or union
skip_param->skip_frame_flag = 1;
^
libavcodec/vaapi_encode.c:502:19: error: request for member ‘num_skip_frames’ in something not a structure or union
skip_param->num_skip_frames = ctx->skipped_pic_count;
^
libavcodec/vaapi_encode.c:503:19: error: request for member ‘size_skip_frames’ in something not a structure or union
skip_param->size_skip_frames = 0;
^
make: *** [libavcodec/vaapi_encode.o] Error 1
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
then the original author, trying to rewrite it will not make it better.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20181115/6a3b30d0/attachment.sig>
More information about the ffmpeg-devel
mailing list