On Wed, Feb 27, 2013 at 04:49:08PM +0100, Maxym Dmytrychenko wrote:
> --- a/libavcodec/Makefile
> +++ b/libavcodec/Makefile
> @@ -199,6 +200,7 @@ OBJS-$(CONFIG_H264_DECODER)            += h264.o          
>                      \
>                                            cabac.o h264_sei.o h264_ps.o       
>   \
>                                            h264_refs.o h264_cavlc.o 
> h264_cabac.o
>  OBJS-$(CONFIG_H264_DXVA2_HWACCEL)      += dxva2_h264.o
> +OBJS-$(CONFIG_H264_QSV_DECODER)        += qsv.o qsv_h264.o
>  OBJS-$(CONFIG_H264_VAAPI_HWACCEL)      += vaapi_h264.o

Can or will qsv be extended to other codecs apart from h264?
Then the common code should be compiled dependent on just
CONFIG_QSV (see vdpau and vaapi above in the Makefile).

> --- a/libavcodec/qsv_h264.c
> +++ b/libavcodec/qsv_h264.c
> @@ -267,8 +267,8 @@ int ff_qsv_decode_init(AVCodecContext *avctx)
>                 "Using default config for QSV decode\n");
>          avctx->hwaccel_context = &av_qsv_default_config;
>      } else {
> -        if ((*qsv_config_context)->io_pattern != 
> MFX_IOPATTERN_OUT_OPAQUE_MEMORY
> -            && (*qsv_config_context)->io_pattern != 
> MFX_IOPATTERN_OUT_SYSTEM_MEMORY) {
> +        if ((*qsv_config_context)->io_pattern != 
> MFX_IOPATTERN_OUT_OPAQUE_MEMORY &&
> +            (*qsv_config_context)->io_pattern != 
> MFX_IOPATTERN_OUT_SYSTEM_MEMORY) {
>              av_log_missing_feature(avctx, "MFX_IOPATTERN_OUT_SYSTEM_MEMORY 
> type", 0);
>              return AVERROR_PATCHWELCOME;
>          }
> @@ -408,8 +408,7 @@ static int qsv_decode_frame(AVCodecContext *avctx, void 
> *data,
>  
>          sts = MFX_ERR_NONE;
>          // ignore warnings, where warnings >0 , and not error codes <0
> -        while (MFX_ERR_NONE <= sts || MFX_ERR_MORE_SURFACE == sts
> -               || MFX_WRN_DEVICE_BUSY == sts) {
> +        while (MFX_ERR_NONE <= sts || MFX_ERR_MORE_SURFACE == sts || 
> MFX_WRN_DEVICE_BUSY == sts) {
>              if (MFX_ERR_MORE_SURFACE == sts || MFX_ERR_NONE == sts) {
>                  surface_idx = av_qsv_get_free_surface(qsv_decode, qsv, 
> &qsv_decode->request[0].Info, QSV_PART_ANY);
>                  if (surface_idx == -1) {
> @@ -766,7 +765,7 @@ mfxStatus ff_qsv_mem_buffer_alloc(mfxHDL pthis, mfxU32 
> nbytes, mfxU16 type,
>      if (!mid)
>          return MFX_ERR_NULL_PTR;
>  
> -    if (0 == (type & MFX_MEMTYPE_SYSTEM_MEMORY))
> +    if (!(type & MFX_MEMTYPE_SYSTEM_MEMORY))
>          return MFX_ERR_UNSUPPORTED;

This is all nice and good, but it should have been squashed.

> --- a/libavcodec/version.h
> +++ b/libavcodec/version.h
> @@ -27,7 +27,7 @@
>  
>  #define LIBAVCODEC_VERSION_MAJOR 54
> -#define LIBAVCODEC_VERSION_MINOR 41
> +#define LIBAVCODEC_VERSION_MINOR 42
>  #define LIBAVCODEC_VERSION_MICRO  1

Rebase on top of master.

Diego
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to