On 17/03/16 20:48, Mark Thompson wrote:
> On 17/03/16 10:47, Diego Biurrun wrote:
>> On Tue, Mar 15, 2016 at 11:00:39PM +0000, Mark Thompson wrote:
>>> --- a/configure
>>> +++ b/configure
>>> @@ -1874,6 +1875,7 @@ nvenc_deps_any="dlopen LoadLibrary"
>>>  nvenc_extralibs='$ldl'
>>>  qsvdec_select="qsv"
>>>  qsvenc_select="qsv"
>>> +vaapi_encode_deps="vaapi"
>>>  vc1dsp_select="h264chroma qpeldsp startcode"
>>
>> A better place for this would be right next to the vaapi decoding entry.
> 
> Can you suggest more precisely where you mean (there is no vaapi decoder).  
> Are you referring to the hwaccel decoding section?
> 
> What I had here was modelled on qsv.

A little more thought on this - it might be better to split the current "vaapi"
config option into "vaapi" (which gives you the hwcontext code, and is a
dependency of everything else) and "vaapi_decode" (or "vaapi_hwaccel" which
gives you the lavc decode part to support the hwaccels).  That then fits with
the suggested "vaapi_encode" option, and the two separate parts can be used
independently.


>>> --- a/libavcodec/Makefile
>>> +++ b/libavcodec/Makefile
>>> @@ -105,6 +105,7 @@ OBJS-$(CONFIG_STARTCODE)               += startcode.o
>>>  OBJS-$(CONFIG_TEXTUREDSP)              += texturedsp.o
>>>  OBJS-$(CONFIG_TEXTUREDSPENC)           += texturedspenc.o
>>>  OBJS-$(CONFIG_TPELDSP)                 += tpeldsp.o
>>> +OBJS-$(CONFIG_VAAPI_ENCODE)            += vaapi_encode.o
>>>  OBJS-$(CONFIG_VC1DSP)                  += vc1dsp.o
>>>  OBJS-$(CONFIG_VIDEODSP)                += videodsp.o
>>>  OBJS-$(CONFIG_VP3DSP)                  += vp3dsp.o
>>
>> same

Some stuff in this Makefile would be rearranged too - vaapi.o would depend on
CONFIG_VAAPI_DECODE (and should maybe be renamed, though inconveniently vaapi.h
is a user-visible header).


>>> --- /dev/null
>>> +++ b/libavcodec/vaapi_encode.h
>>> @@ -0,0 +1,203 @@
>>> +
>>> +#include <va/va.h>
>>> +
>>> +#include "libavutil/hwcontext.h"
>>> +#include "libavutil/hwcontext_vaapi.h"
>>> +
>>> +#include "avcodec.h"
>>> +#include "put_bits.h"
>>
>> The last two headers seem unused, but you need at least stdint.h and
>> frame.h.
> 
> put_bits.h is unused now, removed.
> 
> What are you actually asking for with avcodec.h: I should forward-declare 
> AVCodecContext and AVPacket because I only use pointers?  Why not other 
> structures?  I don't actually need the definitions of AVFrame, AVClass, 
> AVHWDeviceContext etc. in the header, but it's easier to just include the 
> headers than to declare them all individually.

This comment is somewhat silly: structs used for pointers do include the
technically-unnecessary header everywhere else, so avcodec.h should be a direct
dependency in this case.


- Mark

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to