1 Submitted By: Bruce Dubbs <bdubbs at linuxfromscratch dot org>
3 Initial Package Version: 3.10.2
4 Rediffed for 3.10.7 on 2012-10-28
5 Upstream Status: Not applied, supposedly fixed by a change to configure.
6 Origin: http://sourceforge.net/tracker/index.php?func=detail&aid=3369480&group_id=204472&atid=989750
7 Modified by: Andy Benton
8 Modified by: Ken Moffat <ken at linuxfromscratch dot org>
9 Description: Fixes compiling with recent releases of ffmpeg.
11 diff -Naur opal-3.10.7.orig/plugins/video/H.263-1998/h263-1998.cxx opal-3.10.7/plugins/video/H.263-1998/h263-1998.cxx
12 --- opal-3.10.7.orig/plugins/video/H.263-1998/h263-1998.cxx 2012-08-23 02:18:42.000000000 +0000
13 +++ opal-3.10.7/plugins/video/H.263-1998/h263-1998.cxx 2012-10-29 04:02:50.000000000 +0000
18 +#ifndef CODEC_FLAG_H263P_UMV
19 +#define CODEC_FLAG_H263P_UMV 0x02000000
23 static const char YUV420PDesc[] = { "YUV420P" };
24 static const char h263PDesc[] = { "H.263plus" };
29 +#ifndef CODEC_FLAG_OBMC
30 +#define CODEC_FLAG_OBMC 0x00000001
32 +#ifndef CODEC_FLAG_H263P_AIV
33 +#define CODEC_FLAG_H263P_AIV 0x00000008
35 +#ifndef CODEC_FLAG_H263P_UMV
36 +#define CODEC_FLAG_H263P_UMV 0x02000000
38 +#ifndef CODEC_FLAG_H263P_SLICE_STRUCT
39 +#define CODEC_FLAG_H263P_SLICE_STRUCT 0x10000000
42 if (STRCMPI(option, H263_ANNEX_I) == 0) {
43 // Annex I: Advanced Intra Coding
47 // Need to copy to local buffer to guarantee 16 byte alignment
48 memcpy(m_inputFrame->data[0], OPAL_VIDEO_FRAME_DATA_PTR(header), header->width*header->height*3/2);
49 - m_inputFrame->pict_type = (flags & PluginCodec_CoderForceIFrame) ? FF_I_TYPE : AV_PICTURE_TYPE_NONE;
50 + m_inputFrame->pict_type = (flags & PluginCodec_CoderForceIFrame) ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_NONE;
53 m_inputFrame->pts = (int64_t)srcRTP.GetTimestamp()*m_context->time_base.den/m_context->time_base.num/VIDEO_CLOCKRATE;
54 diff -Naur opal-3.10.7.orig/plugins/video/MPEG4-ffmpeg/mpeg4.cxx opal-3.10.7/plugins/video/MPEG4-ffmpeg/mpeg4.cxx
55 --- opal-3.10.7.orig/plugins/video/MPEG4-ffmpeg/mpeg4.cxx 2012-08-23 02:18:44.000000000 +0000
56 +++ opal-3.10.7/plugins/video/MPEG4-ffmpeg/mpeg4.cxx 2012-10-29 03:49:41.000000000 +0000
58 // unchanged through the duration of the encoding context.
61 +#ifndef CODEC_FLAG_H263P_UMV
62 +#define CODEC_FLAG_H263P_UMV 0x02000000
64 +#ifndef CODEC_FLAG_H263P_SLICE_STRUCT
65 +#define CODEC_FLAG_H263P_SLICE_STRUCT 0x10000000
67 +#ifndef CODEC_FLAG_PART
68 +#define CODEC_FLAG_PART 0x0080
71 void MPEG4EncoderContext::SetStaticEncodingParams(){
72 m_avcontext->pix_fmt = PIX_FMT_YUV420P;
73 m_avcontext->mb_decision = FF_MB_DECISION_SIMPLE; // high quality off
75 // Should the next frame be an I-Frame?
76 if ((flags & PluginCodec_CoderForceIFrame) || (m_frameNum == 0))
78 - m_avpicture->pict_type = FF_I_TYPE;
79 + m_avpicture->pict_type = AV_PICTURE_TYPE_I;
81 else // No IFrame requested, let avcodec decide what to do
86 MpegEncContext *s = (MpegEncContext *) m_avcontext->priv_data;
87 - if (s->error_count && m_avcontext->coded_frame->pict_type == FF_I_TYPE) {
88 + if (s->error_count && m_avcontext->coded_frame->pict_type == AV_PICTURE_TYPE_I) {
89 const uint8_t badflags = AC_ERROR | DC_ERROR | MV_ERROR;
90 for (int i = 0; i < s->mb_num && errors < threshold; ++i) {
91 if (s->error_status_table[s->mb_index2xy[i]] & badflags)
92 --- opal-3.10.8/plugins/video/H.264/h264-x264.cxx.orig 2012-10-05 08:19:40.000000000 +0200
93 +++ opal-3.10.8/plugins/video/H.264/h264-x264.cxx 2012-11-19 12:41:41.265765218 +0100
94 @@ -1071,13 +1071,11 @@
97 m_context->workaround_bugs = FF_BUG_AUTODETECT;
98 - m_context->error_recognition = FF_ER_AGGRESSIVE;
99 + m_context->err_recognition = AV_EF_AGGRESSIVE;
100 m_context->idct_algo = FF_IDCT_H264;
101 m_context->error_concealment = FF_EC_GUESS_MVS | FF_EC_DEBLOCK;
102 m_context->flags = CODEC_FLAG_INPUT_PRESERVED | CODEC_FLAG_EMU_EDGE;
103 - m_context->flags2 = CODEC_FLAG2_BRDO |
104 - CODEC_FLAG2_MEMC_ONLY |
105 - CODEC_FLAG2_DROP_FRAME_TIMECODE |
106 + m_context->flags2 = CODEC_FLAG2_DROP_FRAME_TIMECODE |
107 CODEC_FLAG2_SKIP_RD |