Merge remote-tracking branch 'qatar/master'
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 31 Oct 2012 13:26:11 +0000 (14:26 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 31 Oct 2012 13:27:11 +0000 (14:27 +0100)
* qatar/master:
  aacdec: Drop some unused function arguments
  x86: Fix assembly with NASM
  x86: fmtconvert: Refactor cvtps2pi emulation through cpuflags

Conflicts:
libavcodec/aacdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/aacdec.c
libavcodec/x86/fmtconvert.asm

@@@ -1025,10 -992,10 +1024,10 @@@ static int decode_ics_info(AACContext *
                  }
              } else if (ac->oc[1].m4ac.object_type == AOT_AAC_LC) {
                  av_log(ac->avctx, AV_LOG_ERROR, "Prediction is not allowed in AAC-LC.\n");
 -                return AVERROR_INVALIDDATA;
 +                goto fail;
              } else {
                  if ((ics->ltp.present = get_bits(gb, 1)))
-                     decode_ltp(ac, &ics->ltp, gb, ics->max_sfb);
+                     decode_ltp(&ics->ltp, gb, ics->max_sfb);
              }
          }
      }
@@@ -2011,11 -1947,9 +2008,11 @@@ static int decode_extension_payload(AAC
          res = ff_decode_sbr_extension(ac, &che->sbr, gb, crc_flag, cnt, elem_type);
          break;
      case EXT_DYNAMIC_RANGE:
-         res = decode_dynamic_range(&ac->che_drc, gb, cnt);
+         res = decode_dynamic_range(&ac->che_drc, gb);
          break;
      case EXT_FILL:
 +        decode_fill(ac, gb, 8 * cnt - 4);
 +        break;
      case EXT_FILL_DATA:
      case EXT_DATA_ELEMENT:
      default:
@@@ -2403,21 -2334,6 +2399,21 @@@ static int parse_adts_frame_header(AACC
                  return -7;
          } else {
              ac->oc[1].m4ac.chan_config = 0;
-                                      0, OC_TRIAL_FRAME))
 +            /**
 +             * dual mono frames in Japanese DTV can have chan_config 0
 +             * WITHOUT specifying PCE.
 +             *  thus, set dual mono as default.
 +             */
 +            if (ac->enable_jp_dmono && ac->oc[0].status == OC_NONE) {
 +                layout_map_tags = 2;
 +                layout_map[0][0] = layout_map[1][0] = TYPE_SCE;
 +                layout_map[0][2] = layout_map[1][2] = AAC_CHANNEL_FRONT;
 +                layout_map[0][1] = 0;
 +                layout_map[1][1] = 1;
 +                if (output_configure(ac, layout_map, layout_map_tags,
++                                     OC_TRIAL_FRAME))
 +                    return -7;
 +            }
          }
          ac->oc[1].m4ac.sample_rate     = hdr_info.sample_rate;
          ac->oc[1].m4ac.sampling_index  = hdr_info.sampling_index;
@@@ -2513,9 -2426,7 +2509,9 @@@ static int aac_decode_frame_int(AVCodec
                         "Not evaluating a further program_config_element as this construct is dubious at best.\n");
                  pop_output_configuration(ac);
              } else {
-                 err = output_configure(ac, layout_map, tags, 0, OC_TRIAL_PCE);
+                 err = output_configure(ac, layout_map, tags, OC_TRIAL_PCE);
 +                if (!err)
 +                    ac->oc[1].m4ac.chan_config = 0;
                  pce_found = 1;
              }
              break;
Simple merge