This resolves a circular dependency between the headers.
Unified · Split
| @@ -770,8 +770,6 @@ static av_always_inline int get_chroma_qp(H264Context *h, int t, int qscale){ · 769 unmodified lines | ||
| 770 | 770 | return h->pps.chroma_qp_table[t][qscale]; |
| 771 | 771 | } |
| 772 | 772 | |
| 773 | −#include "h264_mvpred.h" //For pred_pskip_motion() | |
| 774 | − | |
| 775 | 773 | static void fill_decode_neighbors(H264Context *h, int mb_type){ |
| 776 | 774 | MpegEncContext * const s = &h->s; |
| 777 | 775 | const int mb_xy= h->mb_xy; |
| @@ -1302,43 +1300,4 @@ static av_always_inline int get_dct8x8_allowed(H264Context *h){ · 524 unmodified lines | ||
| 1302 | 1300 | return !(AV_RN64A(h->sub_mb_type) & ((MB_TYPE_16x8|MB_TYPE_8x16|MB_TYPE_8x8|MB_TYPE_DIRECT2)*0x0001000100010001ULL)); |
| 1303 | 1301 | } |
| 1304 | 1302 | |
| 1305 | −/** | |
| 1306 | − * decodes a P_SKIP or B_SKIP macroblock | |
| 1307 | − */ | |
| 1308 | −static void av_unused decode_mb_skip(H264Context *h){ | |
| 1309 | − MpegEncContext * const s = &h->s; | |
| 1310 | − const int mb_xy= h->mb_xy; | |
| 1311 | − int mb_type=0; | |
| 1312 | − | |
| 1313 | − memset(h->non_zero_count[mb_xy], 0, 48); | |
| 1314 | − | |
| 1315 | − if(MB_FIELD) | |
| 1316 | − mb_type|= MB_TYPE_INTERLACED; | |
| 1317 | − | |
| 1318 | − if( h->slice_type_nos == AV_PICTURE_TYPE_B ) | |
| 1319 | − { | |
| 1320 | − // just for fill_caches. pred_direct_motion will set the real mb_type | |
| 1321 | − mb_type|= MB_TYPE_L0L1|MB_TYPE_DIRECT2|MB_TYPE_SKIP; | |
| 1322 | − if(h->direct_spatial_mv_pred){ | |
| 1323 | − fill_decode_neighbors(h, mb_type); | |
| 1324 | − fill_decode_caches(h, mb_type); //FIXME check what is needed and what not ... | |
| 1325 | − } | |
| 1326 | − ff_h264_pred_direct_motion(h, &mb_type); | |
| 1327 | − mb_type|= MB_TYPE_SKIP; | |
| 1328 | − } | |
| 1329 | − else | |
| 1330 | − { | |
| 1331 | − mb_type|= MB_TYPE_16x16|MB_TYPE_P0L0|MB_TYPE_P1L0|MB_TYPE_SKIP; | |
| 1332 | − | |
| 1333 | − fill_decode_neighbors(h, mb_type); | |
| 1334 | − pred_pskip_motion(h); | |
| 1335 | − } | |
| 1336 | − | |
| 1337 | − write_back_motion(h, mb_type); | |
| 1338 | − s->current_picture.f.mb_type[mb_xy] = mb_type; | |
| 1339 | − s->current_picture.f.qscale_table[mb_xy] = s->qscale; | |
| 1340 | − h->slice_table[ mb_xy ]= h->slice_num; | |
| 1341 | − h->prev_mb_skipped= 1; | |
| 1342 | −} | |
| 1343 | − | |
| 1344 | 1303 | #endif /* AVCODEC_H264_H */ |
| @@ -327,4 +327,43 @@ zeromv: · 326 unmodified lines | ||
| 327 | 327 | return; |
| 328 | 328 | } |
| 329 | 329 | |
| 330 | +/** | |
| 331 | + * decodes a P_SKIP or B_SKIP macroblock | |
| 332 | + */ | |
| 333 | +static void av_unused decode_mb_skip(H264Context *h){ | |
| 334 | + MpegEncContext * const s = &h->s; | |
| 335 | + const int mb_xy= h->mb_xy; | |
| 336 | + int mb_type=0; | |
| 337 | + | |
| 338 | + memset(h->non_zero_count[mb_xy], 0, 48); | |
| 339 | + | |
| 340 | + if(MB_FIELD) | |
| 341 | + mb_type|= MB_TYPE_INTERLACED; | |
| 342 | + | |
| 343 | + if( h->slice_type_nos == AV_PICTURE_TYPE_B ) | |
| 344 | + { | |
| 345 | + // just for fill_caches. pred_direct_motion will set the real mb_type | |
| 346 | + mb_type|= MB_TYPE_L0L1|MB_TYPE_DIRECT2|MB_TYPE_SKIP; | |
| 347 | + if(h->direct_spatial_mv_pred){ | |
| 348 | + fill_decode_neighbors(h, mb_type); | |
| 349 | + fill_decode_caches(h, mb_type); //FIXME check what is needed and what not ... | |
| 350 | + } | |
| 351 | + ff_h264_pred_direct_motion(h, &mb_type); | |
| 352 | + mb_type|= MB_TYPE_SKIP; | |
| 353 | + } | |
| 354 | + else | |
| 355 | + { | |
| 356 | + mb_type|= MB_TYPE_16x16|MB_TYPE_P0L0|MB_TYPE_P1L0|MB_TYPE_SKIP; | |
| 357 | + | |
| 358 | + fill_decode_neighbors(h, mb_type); | |
| 359 | + pred_pskip_motion(h); | |
| 360 | + } | |
| 361 | + | |
| 362 | + write_back_motion(h, mb_type); | |
| 363 | + s->current_picture.f.mb_type[mb_xy] = mb_type; | |
| 364 | + s->current_picture.f.qscale_table[mb_xy] = s->qscale; | |
| 365 | + h->slice_table[ mb_xy ]= h->slice_num; | |
| 366 | + h->prev_mb_skipped= 1; | |
| 367 | +} | |
| 368 | + | |
| 330 | 369 | #endif /* AVCODEC_H264_MVPRED_H */ |