controlPac_(b1, b2) {
    const row = this.pacToRow_(b1, b2);

    // Set up the defaults.
    let textColor = shaka.cea.CeaUtils.DEFAULT_TXT_COLOR;
    let italics = false;
    let indent = null;

    // Get PAC index;
    let pacIndex;
    if (b2 > 0x5f) {
      pacIndex = b2 - 0x60;
    } else {
      pacIndex = b2 - 0x40;
    }

    if (pacIndex <= 0xd) {
      const colorIndex = Math.floor(pacIndex / 2);
      textColor = shaka.cea.Cea608DataChannel.TEXT_COLORS[colorIndex];
    } else if (pacIndex <= 0xf) {
      italics = true; // color stays white
    } else {
      indent = Math.floor((pacIndex - 0x10) / 2);
    }

    // PACs toggle underline on the last bit of b2.
    const underline = (b2 & 0x01) === 0x01;

    if (this.type_ === shaka.cea.Cea608DataChannel.CaptionType.TEXT) {
      // Don't execute the PAC if in text mode.
      return;
    }

    // Execute the PAC.
    const buf = this.curBuf_;

    // Move entire scroll window to a new base in rollup mode.
    if (this.type_ === shaka.cea.Cea608DataChannel.CaptionType.ROLLUP &&
        row !== buf.getRow()) {
      const oldTopRow = 1 + buf.getRow() - buf.getScrollSize();
      const newTopRow = 1 + row - buf.getScrollSize();

      // Shift up the scroll window.
      buf.moveRows(newTopRow, oldTopRow, buf.getScrollSize());

      // Clear everything outside of the new scroll window.
      buf.resetRows(0, newTopRow - 1);
      buf.resetRows(row + 1,
          shaka.cea.Cea608Memory.CC_ROWS - row);
    }
    buf.setRow(row);

    buf.setUnderline(underline);
    buf.setItalics(italics);
    buf.setTextColor(textColor);
    buf.setIndent(indent);

    // Clear the background color, since new row (PAC) should reset ALL styles.
    buf.setBackgroundColor(shaka.cea.CeaUtils.DEFAULT_BG_COLOR);
  }
PAC - Preamble Address Code.
b1 is of the form |P|0|0|1|C|0|ROW|
b2 is of the form |P|1|N|ATTRIBUTE|U|
@param {number} b1 Byte 1.
@param {number} b2 Byte 2.
@private