]> git.sesse.net Git - x264/commitdiff
Fix decoder desync with positive --chroma-qp-offset and zones
authorAnton Mitrofanov <BugMaster@narod.ru>
Sat, 23 Apr 2011 11:19:40 +0000 (15:19 +0400)
committerFiona Glaser <fiona@x264.com>
Tue, 26 Apr 2011 05:37:14 +0000 (22:37 -0700)
common/deblock.c

index 6e8f104261f88f77f94950e1c2632c35ce2c8c66..d7709b1ecd57a2a0d6f3c37950f0d9522566b2e5 100644 (file)
@@ -305,7 +305,7 @@ static inline void deblock_edge_intra( x264_t *h, pixel *pix, int i_stride, uint
 void x264_frame_deblock_row( x264_t *h, int mb_y )
 {
     int b_interlaced = h->sh.b_mbaff;
-    int qp_thresh = 15 - X264_MIN( h->sh.i_alpha_c0_offset, h->sh.i_beta_offset ) - X264_MAX( 0, h->param.analyse.i_chroma_qp_offset );
+    int qp_thresh = 15 - X264_MIN( h->sh.i_alpha_c0_offset, h->sh.i_beta_offset ) - X264_MAX( 0, h->pps->i_chroma_qp_index_offset );
     int stridey   = h->fdec->i_stride[0];
     int stride2y  = stridey << b_interlaced;
     int strideuv  = h->fdec->i_stride[1];
@@ -401,7 +401,7 @@ void x264_frame_deblock_row( x264_t *h, int mb_y )
  */
 void x264_macroblock_deblock( x264_t *h )
 {
-    int qp_thresh = 15 - X264_MIN( h->sh.i_alpha_c0_offset, h->sh.i_beta_offset ) - X264_MAX( 0, h->param.analyse.i_chroma_qp_offset );
+    int qp_thresh = 15 - X264_MIN( h->sh.i_alpha_c0_offset, h->sh.i_beta_offset ) - X264_MAX( 0, h->pps->i_chroma_qp_index_offset );
     int qp = h->mb.i_qp;
     if( qp <= qp_thresh || h->mb.i_type == P_SKIP )
         return;