* Init context * Allocate buffers which are not shared amongst multiple threads. */
| 811 | * Allocate buffers which are not shared amongst multiple threads. |
| 812 | */ |
| 813 | static int context_init(H264Context *h){ |
| 814 | FF_ALLOCZ_OR_GOTO(h->s.avctx, h->top_borders[0], h->s.mb_width * (16+8+8) * sizeof(uint8_t), fail) |
| 815 | FF_ALLOCZ_OR_GOTO(h->s.avctx, h->top_borders[1], h->s.mb_width * (16+8+8) * sizeof(uint8_t), fail) |
| 816 | |
| 817 | h->ref_cache[0][scan8[5 ]+1] = h->ref_cache[0][scan8[7 ]+1] = h->ref_cache[0][scan8[13]+1] = |
| 818 | h->ref_cache[1][scan8[5 ]+1] = h->ref_cache[1][scan8[7 ]+1] = h->ref_cache[1][scan8[13]+1] = PART_NOT_AVAILABLE; |
| 819 | |
| 820 | return 0; |
| 821 | fail: |
| 822 | return -1; // free_tables will clean up for us |
| 823 | } |
| 824 | |
| 825 | static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size); |
| 826 |
no outgoing calls
no test coverage detected