]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/h264_mvpred.h
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavcodec / h264_mvpred.h
index 4cf79ea16163733dc3e2d8ba5f809db593177050..85405c154206fe7d383facf748be06a79e146b1b 100644 (file)
@@ -86,7 +86,7 @@ static av_always_inline int fetch_diagonal_mv(H264Context *h, const int16_t **C,
 }
 
 /**
- * gets the predicted MV.
+ * Get the predicted MV.
  * @param n the block index
  * @param part_width the width of the partition (4, 8,16) -> (1, 2, 4)
  * @param mx the x component of the predicted motion vector
@@ -142,7 +142,7 @@ static av_always_inline void pred_motion(H264Context * const h, int n, int part_
 }
 
 /**
- * gets the directionally predicted 16x8 MV.
+ * Get the directionally predicted 16x8 MV.
  * @param n the block index
  * @param mx the x component of the predicted motion vector
  * @param my the y component of the predicted motion vector
@@ -177,7 +177,7 @@ static av_always_inline void pred_16x8_motion(H264Context * const h, int n, int
 }
 
 /**
- * gets the directionally predicted 8x16 MV.
+ * Get the directionally predicted 8x16 MV.
  * @param n the block index
  * @param mx the x component of the predicted motion vector
  * @param my the y component of the predicted motion vector
@@ -633,7 +633,7 @@ static void fill_decode_caches(H264Context *h, int mb_type){
                 AV_ZERO32(mv_cache[4 - 1*8]);
                 ref_cache[4 - 1*8]= topright_type ? LIST_NOT_USED : PART_NOT_AVAILABLE;
             }
-            if(ref_cache[4 - 1*8] < 0){
+            if(ref_cache[2 - 1*8] < 0 || ref_cache[4 - 1*8] < 0){
                 if(USES_LIST(topleft_type, list)){
                     const int b_xy = h->mb2b_xy[topleft_xy] + 3 + b_stride + (h->topleft_partition & 2*b_stride);
                     const int b8_xy= 4*topleft_xy + 1 + (h->topleft_partition & 2);