⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bisk3d.c

📁 spiht for linux this is used to decod and encode vedio i wich all enjoy
💻 C
📖 第 1 页 / 共 5 页
字号:
      QccErrorAddMessage("(QccWAVbisk3DCodeSet): Error calling QccWAVbisk3DPartitionSet()");      goto Error;    }    if (QccListAppendNode(garbage, subset_node1))    {      QccErrorAddMessage("(QccWAVbisk3DCodeSet): Error calling QccListAppendNode()");      goto Error;    }  if (QccListAppendNode(garbage, subset_node2))    {      QccErrorAddMessage("(QccWAVbisk3DCodeSet): Error calling QccListAppendNode()");      goto Error;    }    subset1 = (QccWAVbisk3DSet *)(subset_node1->value);    if (subset1->significance != QCCBISK3D_EMPTYSET)    {      if (QccListRemoveNode(garbage, subset_node1))        {          QccErrorAddMessage("(QccWAVbisk3DCodeSet): Error calling QccListRemoveNode()");          goto Error;        }      if (QccWAVbisk3DInsertSet(LIS,                                subset_node1,                                &current_list_node))        {          QccErrorAddMessage("(QccWAVbisk3DCodeSet): Error calling QccWAVbisk3DInsertSet()");          goto Error;        }      model->current_context = QCCBISK3D_CONTEXT_SIGNIFICANCE_SUBSET1;      return_value =        QccWAVbisk3DProcessSet(subset_node1,                               current_list_node,                               LIS,                               LSP,                               garbage,                               coefficients,                               mask,                               state_array,                               threshold,                               model,                               buffer);      if (return_value == 1)        {          QccErrorAddMessage("(QccWAVbisk3DCodeSet): Error calling QccWAVbisk3DProcessSet()");          goto Error;        }      else        if (return_value == 2)          goto Finished;    }    if (QccListRemoveNode(garbage, subset_node2))    {      QccErrorAddMessage("(QccWAVbisk3DCodeSet): Error calling QccListRemoveNode()");      goto Error;    }  if (QccWAVbisk3DInsertSet(LIS,                            subset_node2,                            &current_list_node))    {      QccErrorAddMessage("(QccWAVbisk3DCodeSet): Error calling QccWAVbisk3DInsertSet()");      goto Error;    }  if ((subset1->significance == QCCBISK3D_INSIGNIFICANT) ||      (subset1->significance == QCCBISK3D_EMPTYSET))    model->current_context = QCCBISK3D_CONTEXT_NOCODE;  else    model->current_context =      QCCBISK3D_CONTEXT_SIGNIFICANCE_SUBSET2;  return_value =    QccWAVbisk3DProcessSet(subset_node2,                           current_list_node,                           LIS,                           LSP,                           garbage,                           coefficients,                           mask,                           state_array,                           threshold,                           model,                           buffer);  if (return_value == 1)    {      QccErrorAddMessage("(QccWAVbisk3DCodeSet): Error calling QccWAVbisk3DProcessSet()");      goto Error;    }  else    if (return_value == 2)      goto Finished;  return_value = 0;  goto Return; Finished:  return_value = 2;  goto Return; Error:  return_value = 1; Return:  return(return_value);}static int QccWAVbisk3DProcessSet(QccListNode *current_set_node,                                  QccListNode *current_list_node,                                  QccList *LIS,                                  QccList *LSP,                                  QccList *garbage,                                  QccWAVSubbandPyramid3D *coefficients,                                  const QccWAVSubbandPyramid3D *mask,                                  unsigned char ***state_array,                                  double threshold,                                  QccENTArithmeticModel *model,                                  QccBitBuffer *buffer){  int return_value;  QccWAVbisk3DSet *current_set = (QccWAVbisk3DSet *)(current_set_node->value);  QccList *current_list = (QccList *)(current_list_node->value);    if (current_set->significance == QCCBISK3D_EMPTYSET)    {      if (QccListRemoveNode(current_list, current_set_node))        {          QccErrorAddMessage("(QccWAVbisk3DProcessSet): Error calling QccListRemoveNode()");          return(1);        }      if (QccListAppendNode(garbage, current_set_node))        {          QccErrorAddMessage("(QccWAVbisk3DProcessSet): Error calling QccListAppendNode()");          return(1);        }      return(0);    }  return_value = QccWAVbisk3DInputOutputSetSignificance(current_set,                                                        state_array,                                                        model,                                                        buffer);  if (return_value == 1)    {      QccErrorAddMessage("(QccWAVbisk3DProcessSet): Error calling QccWAVbisk3DInputOutputSetSignificance()");      return(1);    }  else    if (return_value == 2)      return(2);  if (current_set->significance != QCCBISK3D_INSIGNIFICANT)    {      if (QccListRemoveNode(current_list, current_set_node))        {          QccErrorAddMessage("(QccWAVbisk3DProcessSet): Error calling QccListRemoveNode()");          return(1);        }      if (QccListAppendNode(garbage, current_set_node))        {          QccErrorAddMessage("(QccWAVbisk3DProcessSet): Error calling QccListAppendNode()");          return(1);        }      if (QccWAVbisk3DSetIsPixel(current_set))        {          current_set->significance = QCCBISK3D_NEWLY_SIGNIFICANT;          return_value =            QccWAVbisk3DInputOutputSign(&state_array                                        [current_set->origin_frame]                                        [current_set->origin_row]                                        [current_set->origin_col],                                        &coefficients->volume                                        [current_set->origin_frame]                                        [current_set->origin_row]                                        [current_set->origin_col],                                        threshold,                                        model,                                        buffer);          if (return_value == 1)            {              QccErrorAddMessage("(QccWAVbisk3DProcessSet): Error calling QccWAVbisk3DInputOutputSign()");              return(1);            }          else            if (return_value == 2)              return(2);                    if (QccListRemoveNode(garbage, current_set_node))            {              QccErrorAddMessage("(QccWAVbisk3DProcessSet): Error calling QccListRemoveNode()");              return(1);            }          if (QccListAppendNode(LSP, current_set_node))            {              QccErrorAddMessage("(QccWAVbisk3DProcessSet): Error calling QccListAppendNode()");              return(1);            }        }      else        {          return_value =            QccWAVbisk3DCodeSet(current_set_node,                                current_list_node,                                LIS,                                LSP,                                garbage,                                coefficients,                                mask,                                state_array,                                threshold,                                model,                                buffer);          if (return_value == 1)            {              QccErrorAddMessage("(QccWAVbisk3DProcessSet): Error calling QccWAVbisk3DProcessSet()");              return(1);            }          else            if (return_value == 2)              return(2);        }    }  return(0);}static int QccWAVbisk3DSortingPass(QccWAVSubbandPyramid3D *coefficients,                                   const QccWAVSubbandPyramid3D *mask,                                   unsigned char ***state_array,                                   double threshold,                                   QccList *LIS,                                   QccList *LSP,                                   QccENTArithmeticModel *model,                                   QccBitBuffer *buffer){  int return_value;  QccListNode *current_list_node;  QccList *current_list;  QccListNode *current_set_node;  QccListNode *next_set_node;  QccList garbage;  QccListInitialize(&garbage);  if (QccWAVbisk3DSignificanceMap(coefficients,                                  mask,                                  state_array,                                  threshold))    {      QccErrorAddMessage("(QccWAVbisk3DSortingPass): Error calling QccWAVbisk3DSignificanceMap()");      goto Error;    }    current_list_node = LIS->end;  while (current_list_node != NULL)    {      current_list = (QccList *)(current_list_node->value);      current_set_node = current_list->start;      while (current_set_node != NULL)        {          next_set_node = current_set_node->next;                    if (model != NULL)            model->current_context = QCCBISK3D_CONTEXT_SIGNIFICANCE;                    return_value = QccWAVbisk3DProcessSet(current_set_node,                                                current_list_node,                                                LIS,                                                LSP,                                                &garbage,                                                coefficients,                                                mask,                                                state_array,                                                threshold,                                                model,                                                buffer);                    if (return_value == 1)            {              QccErrorAddMessage("(QccWAVbisk3DSortingPass): Error calling QccWAVbisk3DProcessSet()");              goto Error;            }          else            if (return_value == 2)              goto Finished;          current_set_node = next_set_node;        }      current_list_node = current_list_node->previous;    }  return_value = 0;  goto Return; Finished:  return_value = 2;  goto Return; Error:  return_value = 1; Return:  QccListFree(&garbage);  return(return_value);}static int QccWAVbisk3DRefinementInputOutput(double *coefficient,                                             double threshold,                                             QccENTArithmeticModel *model,                                             QccBitBuffer *buffer){  int return_value;  int symbol;    model->current_context = QCCBISK3D_CONTEXT_REFINEMENT;    if (buffer->type == QCCBITBUFFER_OUTPUT)    {      if (*coefficient >= threshold)        {          symbol = 1;          *coefficient -= threshold;        }      else        symbol = 0;            return_value =        QccENTArithmeticEncode(&symbol, 1,                               model,                               buffer);      if (return_value == 2)        return(2);      else        if (return_value)          {            QccErrorAddMessage("(QccWAVbisk3DRefinementInputOutput): Error calling QccENTArithmeticEncode()");            return(1);          }    }  else    {      if (QccENTArithmeticDecode(buffer,                                 model,                                 &symbol, 1))        return(2);      *coefficient +=        (symbol == 1) ? threshold / 2 : -threshold / 2;    }  return(0);}static int QccWAVbisk3DRefinementPass(QccWAVSubbandPyramid3D *coefficients,                                      QccList *LSP,                                      double threshold,                                      QccENTArithmeticModel *model,                                      QccBitBuffer *buffer){  int return_value;  QccListNode *current_set_node;  QccWAVbisk3DSet *current_set;  current_set_node = LSP->start;  while (current_set_node != NULL)    {      current_set = (QccWAVbisk3DSet *)(current_set_node->value);      if (current_set->significance == QCCBISK3D_NEWLY_SIGNIFICANT)        current_set->significance = QCCBISK3D_SIGNIFICANT;      else        {          return_value =            QccWAVbisk3DRefinementInputOutput(&coefficients->volume                                              [current_set->origin_frame]                                              [current_set->origin_row]                                              [current_set->origin_col],                                              threshold,                                              model,                                              buffer);          if (return_value == 1)            {              QccErrorAddMessage("(QccWAVbisk3DRefinementPass): Error calling QccWAVbisk3DRefinementInputOutput()");              return(1);            }          else            if (return_value == 2)              return(2);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -