~ubuntu-branches/ubuntu/saucy/gst-libav1.0/saucy-proposed

« back to all changes in this revision

Viewing changes to ext/libav/gstavcfg.c

  • Committer: Package Import Robot
  • Author(s): Sebastian Dröge
  • Date: 2013-07-30 09:00:15 UTC
  • mfrom: (1.1.16) (7.1.7 experimental)
  • Revision ID: package-import@ubuntu.com-20130730090015-sc1ou2yssu7q5w4e
Tags: 1.1.3-1
* New upstream development snapshot:
  + debian/control:
    - Build depend on GStreamer and gst-plugins-base >= 1.1.3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 *
17
17
 * You should have received a copy of the GNU Library General Public
18
18
 * License along with this library; if not, write to the
19
 
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20
 
 * Boston, MA 02111-1307, USA.
 
19
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
 
20
 * Boston, MA 02110-1301, USA.
21
21
 */
22
22
 
23
23
 
147
147
      {FF_DCT_FASTINT, "Fast Integer", "fastint"},
148
148
      {FF_DCT_INT, "Accurate Integer", "int"},
149
149
      {FF_DCT_MMX, "MMX", "mmx"},
150
 
      {FF_DCT_MLIB, "MLIB", "mlib"},
151
150
      {FF_DCT_ALTIVEC, "ALTIVEC", "altivec"},
152
151
      {FF_DCT_FAAN, "FAAN", "faan"},
153
152
      {0, NULL, NULL},
173
172
      {FF_IDCT_SIMPLE, "Simple", "simple"},
174
173
      {FF_IDCT_SIMPLEMMX, "Simple MMX", "simplemmx"},
175
174
      {FF_IDCT_LIBMPEG2MMX, "LIBMPEG2MMX", "libmpeg2mmx"},
176
 
      {FF_IDCT_PS2, "PS2", "ps2"},
177
 
      {FF_IDCT_MLIB, "MLIB", "mlib"},
178
175
      {FF_IDCT_ARM, "ARM", "arm"},
179
176
      {FF_IDCT_ALTIVEC, "ALTIVEC", "altivec"},
180
177
      {FF_IDCT_SH4, "SH4", "sh4"},
263
260
 
264
261
  if (!ffmpeg_flags_type) {
265
262
    static const GFlagsValue ffmpeg_flags[] = {
266
 
      {CODEC_FLAG_OBMC, "Use overlapped block motion compensation (h263+)",
267
 
          "obmc"},
268
263
      {CODEC_FLAG_QSCALE, "Use fixed qscale", "qscale"},
269
264
      {CODEC_FLAG_4MV, "Allow 4 MV per MB", "4mv"},
270
 
      {CODEC_FLAG_H263P_AIV, "H.263 alternative inter VLC", "aiv"},
271
265
      {CODEC_FLAG_QPEL, "Quartel Pel Motion Compensation", "qpel"},
272
266
      {CODEC_FLAG_GMC, "GMC", "gmc"},
273
267
      {CODEC_FLAG_MV0, "Always try a MB with MV (0,0)", "mv0"},
274
 
      {CODEC_FLAG_PART,
275
 
          "Store MV, DC and AC coefficients in seperate partitions", "part"},
276
268
      {CODEC_FLAG_LOOP_FILTER, "Loop filter", "loop-filter"},
277
269
      {CODEC_FLAG_GRAY, "Only decode/encode grayscale", "gray"},
278
270
      {CODEC_FLAG_NORMALIZE_AQP,
282
274
          "global-headers"},
283
275
      {CODEC_FLAG_AC_PRED, "H263 Advanced Intra Coding / MPEG4 AC prediction",
284
276
          "aic"},
285
 
      {CODEC_FLAG_H263P_UMV, "Unlimited Motion Vector", "umv"},
286
277
      {CODEC_FLAG_CBP_RD, "Rate Distoration Optimization for CBP", "cbp-rd"},
287
278
      {CODEC_FLAG_QP_RD, "Rate Distoration Optimization for QP selection",
288
279
          "qp-rd"},
289
 
      {CODEC_FLAG_H263P_SLICE_STRUCT, "H263 slice struct", "ss"},
290
 
      {CODEC_FLAG_SVCD_SCAN_OFFSET,
291
 
          "Reserve space for SVCD scan offset user data", "scanoffset"},
292
280
      {CODEC_FLAG_CLOSED_GOP, "Closed GOP", "closedgop"},
293
281
      {0, NULL, NULL},
294
282
    };
314
302
  /* if TRUE, try to get the default from lavc and ignore the paramspec default */
315
303
  gboolean lavc_default;
316
304
 
317
 
  /* these lists are arrays terminated by CODEC_ID_NONE entry:
 
305
  /* these lists are arrays terminated by AV_CODEC_ID_NONE entry:
318
306
   * property applies to a codec if it's not in the exclude_list
319
307
   * and in exclude_list (or the latter is NULL) */
320
308
  gint *include_list;
358
346
/* some typical include and exclude lists; modify and/or add where needed */
359
347
 
360
348
static gint mpeg[] = {
361
 
  CODEC_ID_MPEG4,
362
 
  CODEC_ID_MSMPEG4V1,
363
 
  CODEC_ID_MSMPEG4V2,
364
 
  CODEC_ID_MSMPEG4V3,
365
 
  CODEC_ID_MPEG1VIDEO,
366
 
  CODEC_ID_MPEG2VIDEO,
367
 
  CODEC_ID_H263P,
368
 
  CODEC_ID_FLV1,
369
 
  CODEC_ID_H263,
370
 
  CODEC_ID_NONE
 
349
  AV_CODEC_ID_MPEG4,
 
350
  AV_CODEC_ID_MSMPEG4V1,
 
351
  AV_CODEC_ID_MSMPEG4V2,
 
352
  AV_CODEC_ID_MSMPEG4V3,
 
353
  AV_CODEC_ID_MPEG1VIDEO,
 
354
  AV_CODEC_ID_MPEG2VIDEO,
 
355
  AV_CODEC_ID_H263P,
 
356
  AV_CODEC_ID_FLV1,
 
357
  AV_CODEC_ID_H263,
 
358
  AV_CODEC_ID_NONE
371
359
};
372
360
 
373
361
static gint huffyuv[] = {
374
 
  CODEC_ID_HUFFYUV,
375
 
  CODEC_ID_FFVHUFF,
376
 
  CODEC_ID_NONE
 
362
  AV_CODEC_ID_HUFFYUV,
 
363
  AV_CODEC_ID_FFVHUFF,
 
364
  AV_CODEC_ID_NONE
377
365
};
378
366
 
379
367
/* Properties should be added here for registration into the config store.
719
707
 
720
708
  /* check if excluded first */
721
709
  if ((codec = qdata->exclude_list)) {
722
 
    for (; *codec != CODEC_ID_NONE; ++codec) {
 
710
    for (; *codec != AV_CODEC_ID_NONE; ++codec) {
723
711
      if (*codec == codec_id)
724
712
        return FALSE;
725
713
    }
727
715
 
728
716
  /* no include list means it is accepted */
729
717
  if ((codec = qdata->include_list)) {
730
 
    for (; *codec != CODEC_ID_NONE; ++codec) {
 
718
    for (; *codec != AV_CODEC_ID_NONE; ++codec) {
731
719
      if (*codec == codec_id)
732
720
        ret = TRUE;
733
721
    }
750
738
  prop_id = base;
751
739
  g_return_if_fail (base > 0);
752
740
 
753
 
  ctx = avcodec_alloc_context ();
754
 
  if (ctx)
755
 
    avcodec_get_context_defaults (ctx);
756
 
  else
 
741
  ctx = avcodec_alloc_context3 (klass->in_plugin);
 
742
  if (!ctx)
757
743
    g_warning ("could not get context");
758
744
 
759
745
  for (list = property_list; list; list = list->next) {