[svn] / branches / dev-api-4 / xvidcore / src / plugins / plugin_single.c Repository:
ViewVC logotype

Diff of /branches/dev-api-4/xvidcore/src/plugins/plugin_single.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1225, Fri Nov 28 14:20:13 2003 UTC revision 1241, Fri Dec 5 14:23:02 2003 UTC
# Line 20  Line 20 
20   *  along with this program; if not, write to the Free Software   *  along with this program; if not, write to the Free Software
21   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
22   *   *
23   * $Id: plugin_single.c,v 1.1.2.7 2003-11-28 14:20:13 syskin Exp $   * $Id: plugin_single.c,v 1.1.2.8 2003-12-05 14:23:02 syskin Exp $
24   *   *
25   ****************************************************************************/   ****************************************************************************/
26    
# Line 153  Line 153 
153              data->quant = (int)rc->fq_error;              data->quant = (int)rc->fq_error;
154              rc->fq_error -= data->quant;              rc->fq_error -= data->quant;
155          }else {          }else {
156                  data->quant = rc->rtn_quant;                          int q = rc->rtn_quant;
157                            /* limit to min/max range
158                               we don't know frame type of the next frame, so we just use
159                               P-VOP's range... */
160                            if (q > data->max_quant[XVID_TYPE_PVOP-1])
161                                    q = data->max_quant[XVID_TYPE_PVOP-1];
162                            else if (q < data->min_quant[XVID_TYPE_PVOP-1])
163                                    q = data->min_quant[XVID_TYPE_PVOP-1];
164    
165                            data->quant = q;
166          }          }
167      }      }
168          return 0;          return 0;
# Line 245  Line 254 
254          else if (rtn_quant < data->quant - 1)          else if (rtn_quant < data->quant - 1)
255                  rtn_quant = data->quant - 1;                  rtn_quant = data->quant - 1;
256    
     /* limit to min/max range  
            we don't know frame type of the next frame, so we just use  
            P-VOP's range... */  
         if (rtn_quant > data->max_quant[XVID_TYPE_PVOP-1])  
                 rtn_quant = data->max_quant[XVID_TYPE_PVOP-1];  
         else if (rtn_quant < data->min_quant[XVID_TYPE_PVOP-1])  
                 rtn_quant = data->min_quant[XVID_TYPE_PVOP-1];  
   
257          rc->rtn_quant = rtn_quant;          rc->rtn_quant = rtn_quant;
258    
259          return (0);          return (0);

Legend:
Removed from v.1225  
changed lines
  Added in v.1241

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4