Ticket #10733: 0001-ffmpeg-Allow-building-with-libx264-0.85.patch

File 0001-ffmpeg-Allow-building-with-libx264-0.85.patch, 3.1 KB (added by Lawrence Rust <lvr@…>, 12 years ago)
  • mythtv/configure

    From 681fb007ff012b7e7be2dcf297c5da09403c409f Mon Sep 17 00:00:00 2001
    From: Lawrence Rust <lvr@softsystem.co.uk>
    Date: Thu, 17 May 2012 17:07:00 +0200
    Subject: [PATCH] ffmpeg: Allow building with libx264 >= 0.85
    
    Signed-off-by: Lawrence Rust <lvr@softsystem.co.uk>
    ---
     mythtv/configure                            |    4 ++--
     mythtv/external/FFmpeg/libavcodec/libx264.c |    6 ++++++
     2 files changed, 8 insertions(+), 2 deletions(-)
    
    diff --git a/mythtv/configure b/mythtv/configure
    index 9547f00..e208de1 100755
    a b enabled libvpx && { 
    39343934    enabled libvpx_encoder && { check_lib2 "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_enc_init_ver -lvpx ||
    39353935                                die "ERROR: libvpx encoder version must be >=0.9.1"; } }
    39363936enabled libx264    && require  libx264 x264.h x264_encoder_encode -lx264 &&
    3937                       { check_cpp_condition x264.h "X264_BUILD >= 118" ||
    3938                         die "ERROR: libx264 version must be >= 0.118."; }
     3937                      { check_cpp_condition x264.h "X264_BUILD >= 85" ||
     3938                        die "ERROR: libx264 version must be >= 0.85."; }
    39393939enabled libxavs    && require  libxavs xavs.h xavs_encoder_encode -lxavs
    39403940enabled libxvid    && require  libxvid xvid.h xvid_global -lxvidcore
    39413941enabled mlib       && require  mediaLib mlib_types.h mlib_VectorSub_S16_U8_Mod -lmlib
  • mythtv/external/FFmpeg/libavcodec/libx264.c

    diff --git a/mythtv/external/FFmpeg/libavcodec/libx264.c b/mythtv/external/FFmpeg/libavcodec/libx264.c
    index d8200d3..ad01c39 100644
    a b static int convert_pix_fmt(enum PixelFormat pix_fmt) 
    251251    case PIX_FMT_YUVJ420P:
    252252    case PIX_FMT_YUV420P9:
    253253    case PIX_FMT_YUV420P10: return X264_CSP_I420;
     254#ifdef X264_CSP_I422
    254255    case PIX_FMT_YUV422P:
    255256    case PIX_FMT_YUV422P10: return X264_CSP_I422;
     257#endif
     258#ifdef X264_CSP_I444
    256259    case PIX_FMT_YUV444P:
    257260    case PIX_FMT_YUV444P9:
    258261    case PIX_FMT_YUV444P10: return X264_CSP_I444;
     262#endif
    259263#ifdef X264_CSP_BGR
    260264    case PIX_FMT_BGR24:
    261265        return X264_CSP_BGR;
    static const AVOption options[] = { 
    568572    { "weightb",       "Weighted prediction for B-frames.",               OFFSET(weightb),       AV_OPT_TYPE_INT,    {-1 }, -1, 1, VE },
    569573    { "weightp",       "Weighted prediction analysis method.",            OFFSET(weightp),       AV_OPT_TYPE_INT,    {-1 }, -1, INT_MAX, VE, "weightp" },
    570574    { "none",          NULL, 0, AV_OPT_TYPE_CONST, {X264_WEIGHTP_NONE},   INT_MIN, INT_MAX, VE, "weightp" },
     575#ifdef X264_WEIGHTP_SIMPLE
    571576    { "simple",        NULL, 0, AV_OPT_TYPE_CONST, {X264_WEIGHTP_SIMPLE}, INT_MIN, INT_MAX, VE, "weightp" },
     577#endif
    572578    { "smart",         NULL, 0, AV_OPT_TYPE_CONST, {X264_WEIGHTP_SMART},  INT_MIN, INT_MAX, VE, "weightp" },
    573579    { "ssim",          "Calculate and print SSIM stats.",                 OFFSET(ssim),          AV_OPT_TYPE_INT,    {-1 }, -1, 1, VE },
    574580    { "intra-refresh", "Use Periodic Intra Refresh instead of IDR frames.",OFFSET(intra_refresh),AV_OPT_TYPE_INT,    {-1 }, -1, 1, VE },