Warnings should be fixed. More comments inline.
Mikhail

> -----Original Message-----
> From: libav-devel [mailto:[email protected]] On Behalf Of Diego
> Biurrun
> Sent: February 7, 2018 3:46 AM
> To: libav development <[email protected]>
> Subject: Re: [libav-devel] Add HW H.264 and HEVC encoding for AMD GPUs
> based on AMF SDK
> 
> On Sun, Feb 04, 2018 at 07:04:39PM +0000, Mironov, Mikhail wrote:
> > I have a developer who will cover AMF integration on regular basis
> (together with me). He starts tomorrow and will be up to date soon.
> > I will ask him to cleanup the things you mentioned if you will not submit 
> > the
> changes first.
> > He is on BCC for now.
> 
> It seems a bit more cleanup is needed on your side as well:
> 
> /home/libav/libs/include/AMF/core/Platform.h:431:16: error: implicit
> declaration of function ‘memcmp’ [-Werror=implicit-function-declaration]
> 
> Indeed that header is missing a string.h #include and things break on one of
> my systems.
> 
> Also, there are a bunch of warnings:
> 
> ~/src/build/amf $ make libavcodec/amfenc.o
> CC      libavcodec/amfenc.o
> /home/diego/src/libav.vanilla/libavcodec/amfenc.c: In function
> ‘amf_init_context’:
> /home/diego/src/libav.vanilla/libavcodec/amfenc.c:159:51: warning: passing
> argument 2 of ‘ctx->trace->pVtbl->RegisterWriter’ from incompatible pointer
> type [-Wincompatible-pointer-types]
>      ctx->trace->pVtbl->RegisterWriter(ctx->trace, ctx->writer_id,
> (AMFTraceWriter *)&ctx->tracer, 1);
>                                                    ^~~
> /home/diego/src/libav.vanilla/libavcodec/amfenc.c:159:51: note: expected
> ‘const wchar_t * {aka const int *}’ but argument is of type ‘char *’
> /home/diego/src/libav.vanilla/libavcodec/amfenc.c:160:51: warning: passing
> argument 2 of ‘ctx->trace->pVtbl->SetWriterLevel’ from incompatible pointer
> type [-Wincompatible-pointer-types]
>      ctx->trace->pVtbl->SetWriterLevel(ctx->trace, ctx->writer_id,
> AMF_TRACE_TRACE);
>                                                    ^~~
> /home/diego/src/libav.vanilla/libavcodec/amfenc.c:160:51: note: expected
> ‘const wchar_t * {aka const int *}’ but argument is of type ‘char *’
> /home/diego/src/libav.vanilla/libavcodec/amfenc.c: In function
> ‘ff_amf_encode_close’:
> /home/diego/src/libav.vanilla/libavcodec/amfenc.c:265:57: warning: passing
> argument 2 of ‘ctx->trace->pVtbl->UnregisterWriter’ from incompatible
> pointer type [-Wincompatible-pointer-types]
>          ctx->trace->pVtbl->UnregisterWriter(ctx->trace, ctx->writer_id);
>                                                          ^~~
> /home/diego/src/libav.vanilla/libavcodec/amfenc.c:265:57: note: expected
> ‘const wchar_t * {aka const int *}’ but argument is of type ‘char *’
> 
> One could just cast them away, but probably it's better to ajust the types.
> 
> 
> Also, I noticed two issues in your headers (at a glance):
> 
> 1) You recreate parts of inttypes.h, i.e.
> 
>    #define AMFPRId64    "lld"
> 
>    and similar - why, oh, why? What ass-backwards systems are you trying to
>    support there?

I don’t remember right now which system required the custom macro but it was 
real issue five years ago. 
This is AMF SDK issue, not libav integration, we should clean this up though.

> 
> 2) You are invading system namespace:
> 
>    #ifndef __AMFPlatform_h__
> 
>    Identifiers starting with __ (or _ and an uppercase letter) are reserved
>    for the system. Should be easy enough to replace these with

This is a decision made for AMF SDK which is external for libav integration. 
Which standard or recommendation are you refer to?

> 
>    #ifndef AMF_Platform_h
> 
>    and similar.
> 
> Diego
> _______________________________________________
> libav-devel mailing list
> [email protected]
> https://lists.libav.org/mailman/listinfo/libav-devel
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to