OSDN Git Service

Merge commit '5da51284937649a8ebb84fa951c235438fcbf8ae'
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 6 Mar 2013 23:18:22 +0000 (00:18 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 6 Mar 2013 23:18:22 +0000 (00:18 +0100)
* commit '5da51284937649a8ebb84fa951c235438fcbf8ae':
  cavs: Add a dependency on h264chroma
  lavc: Split out ff_hwaccel_pixfmt_list_420[] over individual codecs

Conflicts:
libavcodec/h263dec.c
libavcodec/h264.c
libavcodec/mpeg12.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/h264.c

@@@ -63,12 -58,10 +63,12 @@@ static const uint8_t rem6[QP_MAX_NUM + 
  static const uint8_t div6[QP_MAX_NUM + 1] = {
      0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3,  3,  3,
      3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6,  6,  6,
 -    7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10,
 +    7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10,
 +   10,10,10,11,11,11,11,11,11,12,12,12,12,12,12,13,13,13, 13, 13, 13,
 +   14,14,14,14,
  };
  
- static const enum AVPixelFormat hwaccel_pixfmt_list_h264_420[] = {
+ static const enum AVPixelFormat h264_hwaccel_pixfmt_list_420[] = {
  #if CONFIG_H264_DXVA2_HWACCEL
      AV_PIX_FMT_DXVA2_VLD,
  #endif
@@@ -85,7 -78,7 +85,7 @@@
      AV_PIX_FMT_NONE
  };
  
--static const enum AVPixelFormat hwaccel_pixfmt_list_h264_jpeg_420[] = {
++static const enum AVPixelFormat h264_hwaccel_pixfmt_list_jpeg_420[] = {
  #if CONFIG_H264_DXVA2_HWACCEL
      AV_PIX_FMT_DXVA2_VLD,
  #endif
@@@ -2968,17 -2836,11 +2968,17 @@@ static enum PixelFormat get_pixel_forma
              return h->avctx->color_range == AVCOL_RANGE_JPEG ? AV_PIX_FMT_YUVJ422P
                                                               : AV_PIX_FMT_YUV422P;
          } else {
 -            return h->avctx->get_format(h->avctx, h->avctx->codec->pix_fmts ?
 +            int i;
 +            const enum AVPixelFormat * fmt = h->avctx->codec->pix_fmts ?
                                          h->avctx->codec->pix_fmts :
                                          h->avctx->color_range == AVCOL_RANGE_JPEG ?
--                                        hwaccel_pixfmt_list_h264_jpeg_420 :
-                                         hwaccel_pixfmt_list_h264_420;
 -                                        h264_hwaccel_pixfmt_list_420);
++                                        h264_hwaccel_pixfmt_list_jpeg_420 :
++                                        h264_hwaccel_pixfmt_list_420;
 +
 +            for (i=0; fmt[i] != AV_PIX_FMT_NONE; i++)
 +                if (fmt[i] == h->avctx->pix_fmt && !force_callback)
 +                    return fmt[i];
 +            return h->avctx->get_format(h->avctx, fmt);
          }
          break;
      default: