wok-next annotate opal/stuff/patches/opal-3.10.10-ffmpeg2-1.patch @ rev 20616
xrdp: up 0.9.3.1; zopfli: fix build; gcc61: attempt to fix; add gcc6 (latest among 6.x.x).
gcc61 and gcc6 are broken now.
gcc61 and gcc6 are broken now.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Apr 21 05:15:11 2018 +0300 (2018-04-21) |
parents | |
children |
rev | line source |
---|---|
pascal@20092 | 1 Submitted By: Igor Živković <contact@igor-zivkovic.from.hr> |
pascal@20092 | 2 Date: 2013-10-08 |
pascal@20092 | 3 Initial Package Version: 3.10.10 |
pascal@20092 | 4 Upstream Status: Unknown |
pascal@20092 | 5 Origin: Gentoo |
pascal@20092 | 6 Description: Fixes building against FFmpeg version >= 2.0.0 |
pascal@20092 | 7 |
pascal@20092 | 8 diff -Naur opal-3.10.10.orig/plugins/video/common/dyna.cxx opal-3.10.10/plugins/video/common/dyna.cxx |
pascal@20092 | 9 --- opal-3.10.10.orig/plugins/video/common/dyna.cxx 2013-02-20 03:18:05.000000000 +0100 |
pascal@20092 | 10 +++ opal-3.10.10/plugins/video/common/dyna.cxx 2013-10-08 12:57:25.058873513 +0200 |
pascal@20092 | 11 @@ -210,7 +210,7 @@ |
pascal@20092 | 12 #endif |
pascal@20092 | 13 |
pascal@20092 | 14 |
pascal@20092 | 15 -FFMPEGLibrary::FFMPEGLibrary(CodecID codec) |
pascal@20092 | 16 +FFMPEGLibrary::FFMPEGLibrary(AVCodecID codec) |
pascal@20092 | 17 { |
pascal@20092 | 18 m_codec = codec; |
pascal@20092 | 19 if (m_codec==CODEC_ID_H264) |
pascal@20092 | 20 @@ -348,12 +348,12 @@ |
pascal@20092 | 21 return true; |
pascal@20092 | 22 } |
pascal@20092 | 23 |
pascal@20092 | 24 -AVCodec *FFMPEGLibrary::AvcodecFindEncoder(enum CodecID id) |
pascal@20092 | 25 +AVCodec *FFMPEGLibrary::AvcodecFindEncoder(enum AVCodecID id) |
pascal@20092 | 26 { |
pascal@20092 | 27 return Favcodec_find_encoder(id); |
pascal@20092 | 28 } |
pascal@20092 | 29 |
pascal@20092 | 30 -AVCodec *FFMPEGLibrary::AvcodecFindDecoder(enum CodecID id) |
pascal@20092 | 31 +AVCodec *FFMPEGLibrary::AvcodecFindDecoder(enum AVCodecID id) |
pascal@20092 | 32 { |
pascal@20092 | 33 WaitAndSignal m(processLock); |
pascal@20092 | 34 |
pascal@20092 | 35 diff -Naur opal-3.10.10.orig/plugins/video/common/dyna.h opal-3.10.10/plugins/video/common/dyna.h |
pascal@20092 | 36 --- opal-3.10.10.orig/plugins/video/common/dyna.h 2013-02-20 03:18:05.000000000 +0100 |
pascal@20092 | 37 +++ opal-3.10.10/plugins/video/common/dyna.h 2013-10-08 12:57:25.058873513 +0200 |
pascal@20092 | 38 @@ -88,13 +88,13 @@ |
pascal@20092 | 39 class FFMPEGLibrary |
pascal@20092 | 40 { |
pascal@20092 | 41 public: |
pascal@20092 | 42 - FFMPEGLibrary(CodecID codec); |
pascal@20092 | 43 + FFMPEGLibrary(AVCodecID codec); |
pascal@20092 | 44 ~FFMPEGLibrary(); |
pascal@20092 | 45 |
pascal@20092 | 46 bool Load(); |
pascal@20092 | 47 |
pascal@20092 | 48 - AVCodec *AvcodecFindEncoder(enum CodecID id); |
pascal@20092 | 49 - AVCodec *AvcodecFindDecoder(enum CodecID id); |
pascal@20092 | 50 + AVCodec *AvcodecFindEncoder(enum AVCodecID id); |
pascal@20092 | 51 + AVCodec *AvcodecFindDecoder(enum AVCodecID id); |
pascal@20092 | 52 AVCodecContext *AvcodecAllocContext(void); |
pascal@20092 | 53 AVFrame *AvcodecAllocFrame(void); |
pascal@20092 | 54 int AvcodecOpen(AVCodecContext *ctx, AVCodec *codec); |
pascal@20092 | 55 @@ -117,15 +117,15 @@ |
pascal@20092 | 56 DynaLink m_libAvcodec; |
pascal@20092 | 57 DynaLink m_libAvutil; |
pascal@20092 | 58 |
pascal@20092 | 59 - CodecID m_codec; |
pascal@20092 | 60 + AVCodecID m_codec; |
pascal@20092 | 61 char m_codecString[32]; |
pascal@20092 | 62 |
pascal@20092 | 63 void (*Favcodec_init)(void); |
pascal@20092 | 64 void (*Fav_init_packet)(AVPacket *pkt); |
pascal@20092 | 65 |
pascal@20092 | 66 void (*Favcodec_register_all)(void); |
pascal@20092 | 67 - AVCodec *(*Favcodec_find_encoder)(enum CodecID id); |
pascal@20092 | 68 - AVCodec *(*Favcodec_find_decoder)(enum CodecID id); |
pascal@20092 | 69 + AVCodec *(*Favcodec_find_encoder)(enum AVCodecID id); |
pascal@20092 | 70 + AVCodec *(*Favcodec_find_decoder)(enum AVCodecID id); |
pascal@20092 | 71 AVCodecContext *(*Favcodec_alloc_context)(void); |
pascal@20092 | 72 AVFrame *(*Favcodec_alloc_frame)(void); |
pascal@20092 | 73 int (*Favcodec_open)(AVCodecContext *ctx, AVCodec *codec); |
pascal@20092 | 74 diff -Naur opal-3.10.10.orig/plugins/video/common/ffmpeg/libavcodec/avcodec.h opal-3.10.10/plugins/video/common/ffmpeg/libavcodec/avcodec.h |
pascal@20092 | 75 --- opal-3.10.10.orig/plugins/video/common/ffmpeg/libavcodec/avcodec.h 2013-02-20 03:18:04.000000000 +0100 |
pascal@20092 | 76 +++ opal-3.10.10/plugins/video/common/ffmpeg/libavcodec/avcodec.h 2013-10-08 12:57:25.060873488 +0200 |
pascal@20092 | 77 @@ -101,7 +101,7 @@ |
pascal@20092 | 78 * 1. no value of a existing codec ID changes (that would break ABI), |
pascal@20092 | 79 * 2. it is as close as possible to similar codecs. |
pascal@20092 | 80 */ |
pascal@20092 | 81 -enum CodecID { |
pascal@20092 | 82 +enum AVCodecID { |
pascal@20092 | 83 CODEC_ID_NONE, |
pascal@20092 | 84 |
pascal@20092 | 85 /* video codecs */ |
pascal@20092 | 86 @@ -1390,7 +1390,7 @@ |
pascal@20092 | 87 |
pascal@20092 | 88 char codec_name[32]; |
pascal@20092 | 89 enum AVMediaType codec_type; /* see AVMEDIA_TYPE_xxx */ |
pascal@20092 | 90 - enum CodecID codec_id; /* see CODEC_ID_xxx */ |
pascal@20092 | 91 + enum AVCodecID codec_id; /* see CODEC_ID_xxx */ |
pascal@20092 | 92 |
pascal@20092 | 93 /** |
pascal@20092 | 94 * fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A'). |
pascal@20092 | 95 @@ -2843,7 +2843,7 @@ |
pascal@20092 | 96 */ |
pascal@20092 | 97 const char *name; |
pascal@20092 | 98 enum AVMediaType type; |
pascal@20092 | 99 - enum CodecID id; |
pascal@20092 | 100 + enum AVCodecID id; |
pascal@20092 | 101 int priv_data_size; |
pascal@20092 | 102 int (*init)(AVCodecContext *); |
pascal@20092 | 103 int (*encode)(AVCodecContext *, uint8_t *buf, int buf_size, void *data); |
pascal@20092 | 104 @@ -2898,7 +2898,7 @@ |
pascal@20092 | 105 * |
pascal@20092 | 106 * See CODEC_ID_xxx |
pascal@20092 | 107 */ |
pascal@20092 | 108 - enum CodecID id; |
pascal@20092 | 109 + enum AVCodecID id; |
pascal@20092 | 110 |
pascal@20092 | 111 /** |
pascal@20092 | 112 * Supported pixel format. |
pascal@20092 | 113 @@ -3402,10 +3402,10 @@ |
pascal@20092 | 114 /** |
pascal@20092 | 115 * Find a registered encoder with a matching codec ID. |
pascal@20092 | 116 * |
pascal@20092 | 117 - * @param id CodecID of the requested encoder |
pascal@20092 | 118 + * @param id AVCodecID of the requested encoder |
pascal@20092 | 119 * @return An encoder if one was found, NULL otherwise. |
pascal@20092 | 120 */ |
pascal@20092 | 121 -AVCodec *avcodec_find_encoder(enum CodecID id); |
pascal@20092 | 122 +AVCodec *avcodec_find_encoder(enum AVCodecID id); |
pascal@20092 | 123 |
pascal@20092 | 124 /** |
pascal@20092 | 125 * Find a registered encoder with the specified name. |
pascal@20092 | 126 @@ -3418,10 +3418,10 @@ |
pascal@20092 | 127 /** |
pascal@20092 | 128 * Find a registered decoder with a matching codec ID. |
pascal@20092 | 129 * |
pascal@20092 | 130 - * @param id CodecID of the requested decoder |
pascal@20092 | 131 + * @param id AVCodecID of the requested decoder |
pascal@20092 | 132 * @return A decoder if one was found, NULL otherwise. |
pascal@20092 | 133 */ |
pascal@20092 | 134 -AVCodec *avcodec_find_decoder(enum CodecID id); |
pascal@20092 | 135 +AVCodec *avcodec_find_decoder(enum AVCodecID id); |
pascal@20092 | 136 |
pascal@20092 | 137 /** |
pascal@20092 | 138 * Find a registered decoder with the specified name. |
pascal@20092 | 139 @@ -3822,7 +3822,7 @@ |
pascal@20092 | 140 * @param[in] codec_id the codec |
pascal@20092 | 141 * @return Number of bits per sample or zero if unknown for the given codec. |
pascal@20092 | 142 */ |
pascal@20092 | 143 -int av_get_bits_per_sample(enum CodecID codec_id); |
pascal@20092 | 144 +int av_get_bits_per_sample(enum AVCodecID codec_id); |
pascal@20092 | 145 |
pascal@20092 | 146 #if FF_API_OLD_SAMPLE_FMT |
pascal@20092 | 147 /** |
pascal@20092 | 148 diff -Naur opal-3.10.10.orig/plugins/video/H.263-1998/h263-1998.cxx opal-3.10.10/plugins/video/H.263-1998/h263-1998.cxx |
pascal@20092 | 149 --- opal-3.10.10.orig/plugins/video/H.263-1998/h263-1998.cxx 2013-02-20 03:18:03.000000000 +0100 |
pascal@20092 | 150 +++ opal-3.10.10/plugins/video/H.263-1998/h263-1998.cxx 2013-10-08 12:57:25.061873475 +0200 |
pascal@20092 | 151 @@ -48,6 +48,10 @@ |
pascal@20092 | 152 #endif |
pascal@20092 | 153 |
pascal@20092 | 154 #include "h263-1998.h" |
pascal@20092 | 155 +extern "C" |
pascal@20092 | 156 +{ |
pascal@20092 | 157 +#include <libavutil/opt.h> |
pascal@20092 | 158 +} |
pascal@20092 | 159 #include <limits> |
pascal@20092 | 160 #include <iomanip> |
pascal@20092 | 161 #include <stdio.h> |
pascal@20092 | 162 @@ -203,7 +207,7 @@ |
pascal@20092 | 163 PTRACE(4, m_prefix, "Encoder closed"); |
pascal@20092 | 164 } |
pascal@20092 | 165 |
pascal@20092 | 166 -bool H263_Base_EncoderContext::Init(CodecID codecId) |
pascal@20092 | 167 +bool H263_Base_EncoderContext::Init(AVCodecID codecId) |
pascal@20092 | 168 { |
pascal@20092 | 169 PTRACE(5, m_prefix, "Opening encoder"); |
pascal@20092 | 170 |
pascal@20092 | 171 @@ -317,9 +321,9 @@ |
pascal@20092 | 172 // Level 2+ |
pascal@20092 | 173 // works with eyeBeam, signaled via non-standard "D" |
pascal@20092 | 174 if (atoi(value) == 1) |
pascal@20092 | 175 - m_context->flags |= CODEC_FLAG_H263P_UMV; |
pascal@20092 | 176 + av_opt_set_int(m_context->priv_data, "umv", 1, 0); |
pascal@20092 | 177 else |
pascal@20092 | 178 - m_context->flags &= ~CODEC_FLAG_H263P_UMV; |
pascal@20092 | 179 + av_opt_set_int(m_context->priv_data, "umv", 0, 0); |
pascal@20092 | 180 return; |
pascal@20092 | 181 } |
pascal@20092 | 182 |
pascal@20092 | 183 @@ -328,9 +332,9 @@ |
pascal@20092 | 184 // Annex F: Advanced Prediction Mode |
pascal@20092 | 185 // does not work with eyeBeam |
pascal@20092 | 186 if (atoi(value) == 1) |
pascal@20092 | 187 - m_context->flags |= CODEC_FLAG_OBMC; |
pascal@20092 | 188 + av_opt_set_int(m_context->priv_data, "obmc", 1, 0); |
pascal@20092 | 189 else |
pascal@20092 | 190 - m_context->flags &= ~CODEC_FLAG_OBMC; |
pascal@20092 | 191 + av_opt_set_int(m_context->priv_data, "obmc", 0, 0); |
pascal@20092 | 192 return; |
pascal@20092 | 193 } |
pascal@20092 | 194 #endif |
pascal@20092 | 195 @@ -360,9 +364,9 @@ |
pascal@20092 | 196 // Annex K: Slice Structure |
pascal@20092 | 197 // does not work with eyeBeam |
pascal@20092 | 198 if (atoi(value) != 0) |
pascal@20092 | 199 - m_context->flags |= CODEC_FLAG_H263P_SLICE_STRUCT; |
pascal@20092 | 200 + av_opt_set_int(m_context->priv_data, "structured_slices", 1, 0); |
pascal@20092 | 201 else |
pascal@20092 | 202 - m_context->flags &= ~CODEC_FLAG_H263P_SLICE_STRUCT; |
pascal@20092 | 203 + av_opt_set_int(m_context->priv_data, "structured_slices", 0, 0); |
pascal@20092 | 204 return; |
pascal@20092 | 205 } |
pascal@20092 | 206 |
pascal@20092 | 207 @@ -370,9 +374,9 @@ |
pascal@20092 | 208 // Annex S: Alternative INTER VLC mode |
pascal@20092 | 209 // does not work with eyeBeam |
pascal@20092 | 210 if (atoi(value) == 1) |
pascal@20092 | 211 - m_context->flags |= CODEC_FLAG_H263P_AIV; |
pascal@20092 | 212 + av_opt_set_int(m_context->priv_data, "aiv", 1, 0); |
pascal@20092 | 213 else |
pascal@20092 | 214 - m_context->flags &= ~CODEC_FLAG_H263P_AIV; |
pascal@20092 | 215 + av_opt_set_int(m_context->priv_data, "aiv", 0, 0); |
pascal@20092 | 216 return; |
pascal@20092 | 217 } |
pascal@20092 | 218 |
pascal@20092 | 219 @@ -450,15 +454,6 @@ |
pascal@20092 | 220 PTRACE(5, m_prefix, "qmax set to " << m_context->qmax); |
pascal@20092 | 221 PTRACE(5, m_prefix, "payload size set to " << m_context->rtp_payload_size); |
pascal@20092 | 222 |
pascal@20092 | 223 - #define CODEC_TRACER_FLAG(tracer, flag) \ |
pascal@20092 | 224 - PTRACE(4, m_prefix, #flag " is " << ((m_context->flags & flag) ? "enabled" : "disabled")); |
pascal@20092 | 225 - CODEC_TRACER_FLAG(tracer, CODEC_FLAG_H263P_UMV); |
pascal@20092 | 226 - CODEC_TRACER_FLAG(tracer, CODEC_FLAG_OBMC); |
pascal@20092 | 227 - CODEC_TRACER_FLAG(tracer, CODEC_FLAG_AC_PRED); |
pascal@20092 | 228 - CODEC_TRACER_FLAG(tracer, CODEC_FLAG_H263P_SLICE_STRUCT) |
pascal@20092 | 229 - CODEC_TRACER_FLAG(tracer, CODEC_FLAG_LOOP_FILTER); |
pascal@20092 | 230 - CODEC_TRACER_FLAG(tracer, CODEC_FLAG_H263P_AIV); |
pascal@20092 | 231 - |
pascal@20092 | 232 return FFMPEGLibraryInstance.AvcodecOpen(m_context, m_codec) == 0; |
pascal@20092 | 233 } |
pascal@20092 | 234 |
pascal@20092 | 235 @@ -521,7 +516,7 @@ |
pascal@20092 | 236 |
pascal@20092 | 237 // Need to copy to local buffer to guarantee 16 byte alignment |
pascal@20092 | 238 memcpy(m_inputFrame->data[0], OPAL_VIDEO_FRAME_DATA_PTR(header), header->width*header->height*3/2); |
pascal@20092 | 239 - m_inputFrame->pict_type = (flags & PluginCodec_CoderForceIFrame) ? FF_I_TYPE : AV_PICTURE_TYPE_NONE; |
pascal@20092 | 240 + m_inputFrame->pict_type = (flags & PluginCodec_CoderForceIFrame) ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_NONE; |
pascal@20092 | 241 |
pascal@20092 | 242 /* |
pascal@20092 | 243 m_inputFrame->pts = (int64_t)srcRTP.GetTimestamp()*m_context->time_base.den/m_context->time_base.num/VIDEO_CLOCKRATE; |
pascal@20092 | 244 @@ -603,13 +598,13 @@ |
pascal@20092 | 245 m_context->rtp_callback = &H263_RFC2190_EncoderContext::RTPCallBack; |
pascal@20092 | 246 m_context->opaque = this; // used to separate out packets from different encode threads |
pascal@20092 | 247 |
pascal@20092 | 248 - m_context->flags &= ~CODEC_FLAG_H263P_UMV; |
pascal@20092 | 249 + av_opt_set_int(m_context->priv_data, "umv", 0, 0); |
pascal@20092 | 250 m_context->flags &= ~CODEC_FLAG_4MV; |
pascal@20092 | 251 #if LIBAVCODEC_RTP_MODE |
pascal@20092 | 252 m_context->flags &= ~CODEC_FLAG_H263P_AIC; |
pascal@20092 | 253 #endif |
pascal@20092 | 254 - m_context->flags &= ~CODEC_FLAG_H263P_AIV; |
pascal@20092 | 255 - m_context->flags &= ~CODEC_FLAG_H263P_SLICE_STRUCT; |
pascal@20092 | 256 + av_opt_set_int(m_context->priv_data, "aiv", 0, 0); |
pascal@20092 | 257 + av_opt_set_int(m_context->priv_data, "structured_slices", 0, 0); |
pascal@20092 | 258 |
pascal@20092 | 259 return true; |
pascal@20092 | 260 } |
pascal@20092 | 261 diff -Naur opal-3.10.10.orig/plugins/video/H.263-1998/h263-1998.h opal-3.10.10/plugins/video/H.263-1998/h263-1998.h |
pascal@20092 | 262 --- opal-3.10.10.orig/plugins/video/H.263-1998/h263-1998.h 2013-02-20 03:18:03.000000000 +0100 |
pascal@20092 | 263 +++ opal-3.10.10/plugins/video/H.263-1998/h263-1998.h 2013-10-08 12:57:25.062873463 +0200 |
pascal@20092 | 264 @@ -115,7 +115,7 @@ |
pascal@20092 | 265 virtual ~H263_Base_EncoderContext(); |
pascal@20092 | 266 |
pascal@20092 | 267 virtual bool Init() = 0; |
pascal@20092 | 268 - virtual bool Init(CodecID codecId); |
pascal@20092 | 269 + virtual bool Init(AVCodecID codecId); |
pascal@20092 | 270 |
pascal@20092 | 271 virtual bool SetOptions(const char * const * options); |
pascal@20092 | 272 virtual void SetOption(const char * option, const char * value); |
pascal@20092 | 273 diff -Naur opal-3.10.10.orig/plugins/video/H.263-1998/Makefile.in opal-3.10.10/plugins/video/H.263-1998/Makefile.in |
pascal@20092 | 274 --- opal-3.10.10.orig/plugins/video/H.263-1998/Makefile.in 2013-02-20 03:18:03.000000000 +0100 |
pascal@20092 | 275 +++ opal-3.10.10/plugins/video/H.263-1998/Makefile.in 2013-10-08 12:57:25.062873463 +0200 |
pascal@20092 | 276 @@ -35,7 +35,7 @@ |
pascal@20092 | 277 $(COMMONDIR)/dyna.cxx |
pascal@20092 | 278 |
pascal@20092 | 279 CFLAGS += @LIBAVCODEC_CFLAGS@ -I$(COMMONDIR) |
pascal@20092 | 280 -LIBS += @DL_LIBS@ |
pascal@20092 | 281 +LIBS += @DL_LIBS@ @LIBAVUTIL_LIBS@ |
pascal@20092 | 282 |
pascal@20092 | 283 HAVE_LIBAVCODEC_RTP_MODE=@HAVE_LIBAVCODEC_RTP_MODE@ |
pascal@20092 | 284 ifeq ($(HAVE_LIBAVCODEC_RTP_MODE),yes) |
pascal@20092 | 285 diff -Naur opal-3.10.10.orig/plugins/video/H.264/gpl/h264_helper.cxx opal-3.10.10/plugins/video/H.264/gpl/h264_helper.cxx |
pascal@20092 | 286 --- opal-3.10.10.orig/plugins/video/H.264/gpl/h264_helper.cxx 2013-02-20 03:18:02.000000000 +0100 |
pascal@20092 | 287 +++ opal-3.10.10/plugins/video/H.264/gpl/h264_helper.cxx 2013-10-08 12:57:25.062873463 +0200 |
pascal@20092 | 288 @@ -27,6 +27,7 @@ |
pascal@20092 | 289 #include <fstream> |
pascal@20092 | 290 #include <stdlib.h> |
pascal@20092 | 291 #include <sys/stat.h> |
pascal@20092 | 292 +#include <unistd.h> |
pascal@20092 | 293 |
pascal@20092 | 294 #ifdef HAVE_UNISTD_H |
pascal@20092 | 295 #include <unistd.h> |
pascal@20092 | 296 diff -Naur opal-3.10.10.orig/plugins/video/H.264/h264-x264.cxx opal-3.10.10/plugins/video/H.264/h264-x264.cxx |
pascal@20092 | 297 --- opal-3.10.10.orig/plugins/video/H.264/h264-x264.cxx 2013-02-20 03:18:02.000000000 +0100 |
pascal@20092 | 298 +++ opal-3.10.10/plugins/video/H.264/h264-x264.cxx 2013-10-08 12:57:25.063873450 +0200 |
pascal@20092 | 299 @@ -40,6 +40,9 @@ |
pascal@20092 | 300 #include "plugin-config.h" |
pascal@20092 | 301 #endif |
pascal@20092 | 302 |
pascal@20092 | 303 +#define FF_IDCT_H264 11 |
pascal@20092 | 304 +#define CODEC_FLAG2_SKIP_RD 0x00004000 |
pascal@20092 | 305 + |
pascal@20092 | 306 #include <codec/opalplugin.hpp> |
pascal@20092 | 307 |
pascal@20092 | 308 #include "../common/ffmpeg.h" |
pascal@20092 | 309 @@ -1071,13 +1074,10 @@ |
pascal@20092 | 310 return false; |
pascal@20092 | 311 |
pascal@20092 | 312 m_context->workaround_bugs = FF_BUG_AUTODETECT; |
pascal@20092 | 313 - m_context->error_recognition = FF_ER_AGGRESSIVE; |
pascal@20092 | 314 m_context->idct_algo = FF_IDCT_H264; |
pascal@20092 | 315 m_context->error_concealment = FF_EC_GUESS_MVS | FF_EC_DEBLOCK; |
pascal@20092 | 316 m_context->flags = CODEC_FLAG_INPUT_PRESERVED | CODEC_FLAG_EMU_EDGE; |
pascal@20092 | 317 - m_context->flags2 = CODEC_FLAG2_BRDO | |
pascal@20092 | 318 - CODEC_FLAG2_MEMC_ONLY | |
pascal@20092 | 319 - CODEC_FLAG2_DROP_FRAME_TIMECODE | |
pascal@20092 | 320 + m_context->flags2 = CODEC_FLAG2_DROP_FRAME_TIMECODE | |
pascal@20092 | 321 CODEC_FLAG2_SKIP_RD | |
pascal@20092 | 322 CODEC_FLAG2_CHUNKS; |
pascal@20092 | 323 |
pascal@20092 | 324 diff -Naur opal-3.10.10.orig/plugins/video/H.264/shared/x264wrap.cxx opal-3.10.10/plugins/video/H.264/shared/x264wrap.cxx |
pascal@20092 | 325 --- opal-3.10.10.orig/plugins/video/H.264/shared/x264wrap.cxx 2013-02-20 03:18:02.000000000 +0100 |
pascal@20092 | 326 +++ opal-3.10.10/plugins/video/H.264/shared/x264wrap.cxx 2013-10-08 12:57:25.064873438 +0200 |
pascal@20092 | 327 @@ -33,6 +33,7 @@ |
pascal@20092 | 328 |
pascal@20092 | 329 #include <codec/opalplugin.hpp> |
pascal@20092 | 330 #include <stdio.h> |
pascal@20092 | 331 +#include <unistd.h> |
pascal@20092 | 332 |
pascal@20092 | 333 #ifdef HAVE_UNISTD_H |
pascal@20092 | 334 #include <unistd.h> |
pascal@20092 | 335 diff -Naur opal-3.10.10.orig/plugins/video/MPEG4-ffmpeg/Makefile.in opal-3.10.10/plugins/video/MPEG4-ffmpeg/Makefile.in |
pascal@20092 | 336 --- opal-3.10.10.orig/plugins/video/MPEG4-ffmpeg/Makefile.in 2013-02-20 03:18:07.000000000 +0100 |
pascal@20092 | 337 +++ opal-3.10.10/plugins/video/MPEG4-ffmpeg/Makefile.in 2013-10-08 12:57:25.064873438 +0200 |
pascal@20092 | 338 @@ -31,7 +31,7 @@ |
pascal@20092 | 339 SRCS := mpeg4.cxx $(COMMONDIR)/dyna.cxx |
pascal@20092 | 340 |
pascal@20092 | 341 CFLAGS += @LIBAVCODEC_CFLAGS@ -I$(COMMONDIR) |
pascal@20092 | 342 -LIBS += @DL_LIBS@ |
pascal@20092 | 343 +LIBS += @DL_LIBS@ @LIBAVUTIL_LIBS@ |
pascal@20092 | 344 |
pascal@20092 | 345 # Add LIBAVCODEC_SOURCE_DIR to the include path so we can #include <libavcodec/...h> |
pascal@20092 | 346 # Also add libavutil, so ffmpeg headers can #include "log.h". |
pascal@20092 | 347 diff -Naur opal-3.10.10.orig/plugins/video/MPEG4-ffmpeg/mpeg4.cxx opal-3.10.10/plugins/video/MPEG4-ffmpeg/mpeg4.cxx |
pascal@20092 | 348 --- opal-3.10.10.orig/plugins/video/MPEG4-ffmpeg/mpeg4.cxx 2013-02-20 03:18:07.000000000 +0100 |
pascal@20092 | 349 +++ opal-3.10.10/plugins/video/MPEG4-ffmpeg/mpeg4.cxx 2013-10-08 12:57:25.065873425 +0200 |
pascal@20092 | 350 @@ -103,6 +103,7 @@ |
pascal@20092 | 351 |
pascal@20092 | 352 #else /* LIBAVCODEC_HAVE_SOURCE_DIR */ |
pascal@20092 | 353 #include "../common/ffmpeg.h" |
pascal@20092 | 354 +#include <libavutil/opt.h> |
pascal@20092 | 355 #endif /* LIBAVCODEC_HAVE_SOURCE_DIR */ |
pascal@20092 | 356 } |
pascal@20092 | 357 |
pascal@20092 | 358 @@ -589,17 +590,17 @@ |
pascal@20092 | 359 m_avpicture->quality = m_videoQMin; |
pascal@20092 | 360 |
pascal@20092 | 361 #ifdef USE_ORIG |
pascal@20092 | 362 - m_avcontext->flags |= CODEC_FLAG_PART; // data partitioning |
pascal@20092 | 363 + av_opt_set_int(m_avcontext->priv_data, "data_partitionin", 1, 0); |
pascal@20092 | 364 m_avcontext->flags |= CODEC_FLAG_4MV; // 4 motion vectors |
pascal@20092 | 365 #else |
pascal@20092 | 366 m_avcontext->max_b_frames=0; /*don't use b frames*/ |
pascal@20092 | 367 m_avcontext->flags|=CODEC_FLAG_AC_PRED; |
pascal@20092 | 368 - m_avcontext->flags|=CODEC_FLAG_H263P_UMV; |
pascal@20092 | 369 + av_opt_set_int(m_avcontext->priv_data, "umv", 1, 0); |
pascal@20092 | 370 /*c->flags|=CODEC_FLAG_QPEL;*/ /*don't enable this one: this forces profile_level to advanced simple profile */ |
pascal@20092 | 371 m_avcontext->flags|=CODEC_FLAG_4MV; |
pascal@20092 | 372 m_avcontext->flags|=CODEC_FLAG_GMC; |
pascal@20092 | 373 m_avcontext->flags|=CODEC_FLAG_LOOP_FILTER; |
pascal@20092 | 374 - m_avcontext->flags|=CODEC_FLAG_H263P_SLICE_STRUCT; |
pascal@20092 | 375 + av_opt_set_int(m_avcontext->priv_data, "structured_slices", 1, 0); |
pascal@20092 | 376 #endif |
pascal@20092 | 377 m_avcontext->opaque = this; // for use in RTP callback |
pascal@20092 | 378 } |
pascal@20092 | 379 @@ -804,7 +805,7 @@ |
pascal@20092 | 380 // Should the next frame be an I-Frame? |
pascal@20092 | 381 if ((flags & PluginCodec_CoderForceIFrame) || (m_frameNum == 0)) |
pascal@20092 | 382 { |
pascal@20092 | 383 - m_avpicture->pict_type = FF_I_TYPE; |
pascal@20092 | 384 + m_avpicture->pict_type = AV_PICTURE_TYPE_I; |
pascal@20092 | 385 } |
pascal@20092 | 386 else // No IFrame requested, let avcodec decide what to do |
pascal@20092 | 387 { |
pascal@20092 | 388 @@ -1325,7 +1326,7 @@ |
pascal@20092 | 389 |
pascal@20092 | 390 void MPEG4DecoderContext::SetStaticDecodingParams() { |
pascal@20092 | 391 m_avcontext->flags |= CODEC_FLAG_4MV; |
pascal@20092 | 392 - m_avcontext->flags |= CODEC_FLAG_PART; |
pascal@20092 | 393 + av_opt_set_int(m_avcontext->priv_data, "data_partitionin", 1, 0); |
pascal@20092 | 394 m_avcontext->workaround_bugs = 0; // no workaround for buggy implementations |
pascal@20092 | 395 } |
pascal@20092 | 396 |