Merge commit '71f7b22dba60524b2285643ae0b49d8f64977129'
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 21 Oct 2012 12:35:47 +0000 (14:35 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 21 Oct 2012 12:37:15 +0000 (14:37 +0200)
* commit '71f7b22dba60524b2285643ae0b49d8f64977129':
  ffv1: split decoder and encoder

Conflicts:
libavcodec/Makefile
libavcodec/ffv1.c
libavcodec/ffv1.h
libavcodec/ffv1dec.c
libavcodec/ffv1enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/ffv1.c
libavcodec/ffv1.h
libavcodec/ffv1dec.c
libavcodec/ffv1enc.c

@@@ -177,10 -259,10 +177,10 @@@ void ffv1_clear_slice_state(FFV1Contex
                  }
              }
          }
 -    }
  }
  
- av_cold int ffv1_common_end(AVCodecContext *avctx)
 +
+ av_cold int ffv1_close(AVCodecContext *avctx)
  {
      FFV1Context *s = avctx->priv_data;
      int i, j;
@@@ -120,17 -94,8 +120,17 @@@ typedef struct FFV1Context 
      int slice_height;
      int slice_x;
      int slice_y;
 +    int bits_per_raw_sample;
  } FFV1Context;
  
- int ffv1_common_end(AVCodecContext *avctx);
 +int ffv1_common_init(AVCodecContext *avctx);
 +int ffv1_init_slice_state(FFV1Context *f, FFV1Context *fs);
 +int ffv1_init_slices_state(FFV1Context *f);
 +int ffv1_init_slice_contexts(FFV1Context *f);
 +int ffv1_allocate_initial_states(FFV1Context *f);
 +void ffv1_clear_slice_state(FFV1Context *f, FFV1Context *fs);
++int ffv1_close(AVCodecContext *avctx);
 +
  static av_always_inline int fold(int diff, int bits)
  {
      if (bits == 8)
@@@ -834,9 -627,9 +834,9 @@@ AVCodec ff_ffv1_decoder = 
      .type           = AVMEDIA_TYPE_VIDEO,
      .id             = AV_CODEC_ID_FFV1,
      .priv_data_size = sizeof(FFV1Context),
 -    .init           = ffv1_decode_init,
 +    .init           = decode_init,
-     .close          = ffv1_common_end,
+     .close          = ffv1_close,
 -    .decode         = ffv1_decode_frame,
 +    .decode         = decode_frame,
      .capabilities   = CODEC_CAP_DR1 /*| CODEC_CAP_DRAW_HORIZ_BAND*/ |
                        CODEC_CAP_SLICE_THREADS,
      .long_name      = NULL_IF_CONFIG_SMALL("FFmpeg video codec #1"),
@@@ -1122,19 -856,15 +1122,19 @@@ AVCodec ff_ffv1_encoder = 
      .type           = AVMEDIA_TYPE_VIDEO,
      .id             = AV_CODEC_ID_FFV1,
      .priv_data_size = sizeof(FFV1Context),
 -    .init           = ffv1_encode_init,
 -    .encode2        = ffv1_encode_frame,
 +    .init           = encode_init,
 +    .encode2        = encode_frame,
-     .close          = ffv1_common_end,
+     .close          = ffv1_close,
      .capabilities   = CODEC_CAP_SLICE_THREADS,
 +    .defaults       = ffv1_defaults,
      .pix_fmts       = (const enum AVPixelFormat[]) {
 -        AV_PIX_FMT_YUV420P,   AV_PIX_FMT_YUV422P,   AV_PIX_FMT_YUV444P,
 -        AV_PIX_FMT_YUV411P,   AV_PIX_FMT_YUV410P,
 -        AV_PIX_FMT_YUV420P16, AV_PIX_FMT_YUV422P16, AV_PIX_FMT_YUV444P16,
 -        AV_PIX_FMT_RGB32,
 +        AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVA420P, AV_PIX_FMT_YUVA422P, AV_PIX_FMT_YUV444P,
 +        AV_PIX_FMT_YUVA444P, AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV411P,
 +        AV_PIX_FMT_YUV410P, AV_PIX_FMT_0RGB32, AV_PIX_FMT_RGB32, AV_PIX_FMT_YUV420P16,
 +        AV_PIX_FMT_YUV422P16, AV_PIX_FMT_YUV444P16, AV_PIX_FMT_YUV444P9, AV_PIX_FMT_YUV422P9,
 +        AV_PIX_FMT_YUV420P9, AV_PIX_FMT_YUV420P10, AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV444P10,
 +        AV_PIX_FMT_GRAY16, AV_PIX_FMT_GRAY8, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10,
 +        AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14,
          AV_PIX_FMT_NONE
      },
      .long_name      = NULL_IF_CONFIG_SMALL("FFmpeg video codec #1"),