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34, 46, 43 },
152 #if CONFIG_H264_DXVA2_HWACCEL
155 #if CONFIG_H264_VAAPI_HWACCEL
158 #if CONFIG_H264_VDA_HWACCEL
162 #if CONFIG_H264_VDPAU_HWACCEL
170 #if CONFIG_H264_DXVA2_HWACCEL
173 #if CONFIG_H264_VAAPI_HWACCEL
176 #if CONFIG_H264_VDA_HWACCEL
180 #if CONFIG_H264_VDPAU_HWACCEL
226 const int b4_stride = h->
mb_width * 4 + 1;
227 const int b4_array_size = b4_stride * h->
mb_height * 4;
278 int h_chroma_shift, v_chroma_shift;
280 &h_chroma_shift, &v_chroma_shift);
284 0x80, FF_CEIL_RSHIFT(h->
avctx->
width, h_chroma_shift));
286 0x80, FF_CEIL_RSHIFT(h->
avctx->
width, h_chroma_shift));
304 for (i = 0; i < 2; i++) {
317 return (ret < 0) ? ret :
AVERROR(ENOMEM);
337 if (i == H264_MAX_PICTURE_COUNT)
354 for (i = 0; i < 6; i++) {
356 for (j = 0; j < i; j++)
365 for (q = 0; q < max_qp + 1; q++) {
368 for (x = 0; x < 64; x++)
380 for (i = 0; i < 6; i++) {
382 for (j = 0; j < i; j++)
391 for (q = 0; q < max_qp + 1; q++) {
394 for (x = 0; x < 16; x++)
411 for (i = 0; i < 6; i++)
412 for (x = 0; x < 16; x++)
415 for (i = 0; i < 6; i++)
416 for (x = 0; x < 64; x++)
446 #define IN_RANGE(a, b, size) (((a) >= (b)) && ((a) < ((b) + (size))))
447 #undef REBASE_PICTURE
448 #define REBASE_PICTURE(pic, new_ctx, old_ctx) \
449 (((pic) && (pic) >= (old_ctx)->DPB && \
450 (pic) < (old_ctx)->DPB + H264_MAX_PICTURE_COUNT) ? \
451 &(new_ctx)->DPB[(pic) - (old_ctx)->DPB] : NULL)
459 for (i = 0; i <
count; i++) {
460 assert((
IN_RANGE(from[i], old_base,
sizeof(*old_base)) ||
472 for (i = 0; i <
count; i++) {
473 if (to[i] && !from[i]) {
475 }
else if (from[i] && !to[i]) {
482 memcpy(to[i], from[i], size);
488 #define copy_fields(to, from, start_field, end_field) \
489 memcpy(&(to)->start_field, &(from)->start_field, \
490 (char *)&(to)->end_field - (char *)&(to)->start_field)
499 int context_reinitialized = 0;
506 (h->
width != h1->width ||
507 h->
height != h1->height ||
521 h->
width = h1->width;
530 (
void **)h1->sps_buffers,
535 (
void **)h1->pps_buffers,
544 context_reinitialized = 1;
547 h264_set_parameter_from_sps(h);
569 memcpy(h, h1, offsetof(
H264Context, intra_pcm_ptr));
570 memcpy(&h->
cabac, &h1->cabac,
577 memset(&h->
er, 0,
sizeof(h->
er));
578 memset(&h->
mb, 0,
sizeof(h->
mb));
589 for (i = 0; i < 2; i++) {
594 if (h1->context_initialized) {
633 if (h1->DPB && h1->DPB[i].f.buf[0] &&
652 (
void **)h1->sps_buffers,
657 (
void **)h1->pps_buffers,
664 copy_fields(h, h1, dequant4_buffer, dequant4_coeff);
666 for (i = 0; i < 6; i++)
668 (h1->dequant4_coeff[i] - h1->dequant4_buffer[0]);
670 for (i = 0; i < 6; i++)
672 (h1->dequant8_coeff[i] - h1->dequant8_buffer[0]);
689 if (context_reinitialized)
759 if (CONFIG_ERROR_RESILIENCE) {
766 if (CONFIG_ERROR_RESILIENCE) {
774 for (i = 0; i < 16; i++) {
778 for (i = 0; i < 16; i++) {
802 int linesize,
int uvlinesize,
812 src_cb -= uvlinesize;
813 src_cr -= uvlinesize;
819 AV_COPY128(top_border, src_y + 15 * linesize);
821 AV_COPY128(top_border + 16, src_y + 15 * linesize + 16);
825 AV_COPY128(top_border + 32, src_cb + 15 * uvlinesize);
826 AV_COPY128(top_border + 48, src_cb + 15 * uvlinesize + 16);
827 AV_COPY128(top_border + 64, src_cr + 15 * uvlinesize);
828 AV_COPY128(top_border + 80, src_cr + 15 * uvlinesize + 16);
830 AV_COPY128(top_border + 16, src_cb + 15 * uvlinesize);
831 AV_COPY128(top_border + 32, src_cr + 15 * uvlinesize);
833 }
else if (chroma422) {
835 AV_COPY128(top_border + 32, src_cb + 15 * uvlinesize);
836 AV_COPY128(top_border + 48, src_cr + 15 * uvlinesize);
838 AV_COPY64(top_border + 16, src_cb + 15 * uvlinesize);
839 AV_COPY64(top_border + 24, src_cr + 15 * uvlinesize);
843 AV_COPY128(top_border + 32, src_cb + 7 * uvlinesize);
844 AV_COPY128(top_border + 48, src_cr + 7 * uvlinesize);
846 AV_COPY64(top_border + 16, src_cb + 7 * uvlinesize);
847 AV_COPY64(top_border + 24, src_cr + 7 * uvlinesize);
861 AV_COPY128(top_border, src_y + 16 * linesize);
863 AV_COPY128(top_border + 16, src_y + 16 * linesize + 16);
868 AV_COPY128(top_border + 32, src_cb + 16 * linesize);
869 AV_COPY128(top_border + 48, src_cb + 16 * linesize + 16);
870 AV_COPY128(top_border + 64, src_cr + 16 * linesize);
871 AV_COPY128(top_border + 80, src_cr + 16 * linesize + 16);
873 AV_COPY128(top_border + 16, src_cb + 16 * linesize);
874 AV_COPY128(top_border + 32, src_cr + 16 * linesize);
876 }
else if (chroma422) {
878 AV_COPY128(top_border + 32, src_cb + 16 * uvlinesize);
879 AV_COPY128(top_border + 48, src_cr + 16 * uvlinesize);
881 AV_COPY64(top_border + 16, src_cb + 16 * uvlinesize);
882 AV_COPY64(top_border + 24, src_cr + 16 * uvlinesize);
886 AV_COPY128(top_border + 32, src_cb + 8 * uvlinesize);
887 AV_COPY128(top_border + 48, src_cr + 8 * uvlinesize);
889 AV_COPY64(top_border + 16, src_cb + 8 * uvlinesize);
890 AV_COPY64(top_border + 24, src_cr + 8 * uvlinesize);
903 int ref0, ref1, i, cur_poc, ref_start, ref_count0, ref_count1;
905 for (i = 0; i < 2; i++) {
937 for (ref0 = ref_start; ref0 < ref_count0; ref0++) {
939 for (ref1 = ref_start; ref1 < ref_count1; ref1++) {
943 int td = av_clip(poc1 - poc0, -128, 127);
945 int tb = av_clip(cur_poc - poc0, -128, 127);
946 int tx = (16384 + (
FFABS(td) >> 1)) /
td;
947 int dist_scale_factor = (tb * tx + 32) >> 8;
948 if (dist_scale_factor >= -64 && dist_scale_factor <= 128)
949 w = 64 - dist_scale_factor;
968 for (i = 0; i < 16; i++) {
969 #define TRANSPOSE(x) ((x) >> 2) | (((x) << 2) & 0xF)
974 for (i = 0; i < 64; i++) {
975 #define TRANSPOSE(x) ((x) >> 3) | (((x) & 7) << 3)
1124 if (width <= 0 || height <= 0) {
1148 int nb_slices = (HAVE_THREADS &&
1184 " reducing to %d\n", nb_slices, max_slices);
1185 nb_slices = max_slices;
1202 if (CONFIG_ERROR_RESILIENCE) {
1271 unsigned int first_mb_in_slice;
1272 unsigned int pps_id;
1274 unsigned int slice_type, tmp, i, j;
1275 int last_pic_structure, last_pic_droppable;
1277 int needs_reinit = 0;
1278 int field_pic_flag, bottom_field_flag;
1285 if (first_mb_in_slice == 0) {
1301 if (slice_type > 9) {
1303 "slice type %d too large at %d %d\n",
1307 if (slice_type > 4) {
1342 "non-existing PPS %u referenced\n",
1348 "PPS change from %d to %d forbidden\n",
1356 "non-existing SPS %u referenced\n",
1429 (must_reinit || needs_reinit)) {
1432 "changing width %d -> %d / height %d -> %d on "
1451 "h264_slice_header_init() failed\n");
1458 "Cannot (re-)initialize context during parallel decoding.\n");
1468 "h264_slice_header_init() failed\n");
1493 if (field_pic_flag) {
1507 "Changing field mode (%d -> %d) between slices is not allowed\n",
1514 "unset cur_pic_ptr on slice %d\n",
1525 if (unwrap_prev_frame_num > h->
frame_num)
1526 unwrap_prev_frame_num -= max_frame_num;
1530 if (unwrap_prev_frame_num < 0)
1531 unwrap_prev_frame_num += max_frame_num;
1578 "Invalid field mode combination %d/%d\n",
1583 }
else if (last_pic_droppable != h->
droppable) {
1585 "Found reference and non-reference fields in the same frame, which");
1710 first_mb_in_slice >= h->
mb_num) {
1780 for (i = 0; i < 2; i++) {
1844 "deblocking_filter_idc %u out of range\n", tmp);
1859 "deblocking filter parameters %d %d out of range\n",
1886 "Cannot parallelize slice decoding with deblocking filter type 1, decoding such frames in sequential order\n"
1887 "To parallelize slice decoding you need video encoded with disable_deblocking_filter_idc set to 2 (deblock only edges that do not cross slices).\n"
1888 "Setting the flags2 libavcodec option to +fast (-flags2 +fast) will disable deblocking across slices and enable parallel slice decoding "
1889 "but will generate non-standard-compliant output.\n");
1894 "Deblocking switched inside frame.\n");
1919 for (j = 0; j < 2; j++) {
1922 for (i = 0; i < 16; i++) {
1924 if (j < h->list_count && i < h->ref_count[j] &&
1943 for (i = 0; i < 16; i++)
1946 ref2frm[18 + 1] = -1;
1947 for (i = 16; i < 48; i++)
1948 ref2frm[i + 4] = 4 * id_list[(i - 16) >> 1] +
1963 "slice:%d %s mb:%d %c%s%s pps:%u frame:%d poc:%d/%d ref:%d/%d qp:%d loop:%d:%d:%d weight:%d%s %s\n",
2004 int mb_type,
int top_xy,
2007 int left_type[LEFT_MBS],
2008 int mb_xy,
int list)
2015 const int b_xy = h->
mb2b_xy[top_xy] + 3 * b_stride;
2016 const int b8_xy = 4 * top_xy + 2;
2019 ref_cache[0 - 1 * 8] =
2020 ref_cache[1 - 1 * 8] = ref2frm[list][h->
cur_pic.
ref_index[list][b8_xy + 0]];
2021 ref_cache[2 - 1 * 8] =
2022 ref_cache[3 - 1 * 8] = ref2frm[list][h->
cur_pic.
ref_index[list][b8_xy + 1]];
2031 const int b8_xy = 4 * left_xy[
LTOP] + 1;
2038 ref_cache[-1 + 8] = ref2frm[list][h->
cur_pic.
ref_index[list][b8_xy + 2 * 0]];
2039 ref_cache[-1 + 16] =
2040 ref_cache[-1 + 24] = ref2frm[list][h->
cur_pic.
ref_index[list][b8_xy + 2 * 1]];
2048 ref_cache[-1 + 16] =
2066 uint32_t ref01 = (
pack16to32(ref2frm[list][ref[0]], ref2frm[list][ref[1]]) & 0x00FF00FF) * 0x0101;
2067 uint32_t ref23 = (
pack16to32(ref2frm[list][ref[2]], ref2frm[list][ref[3]]) & 0x00FF00FF) * 0x0101;
2068 AV_WN32A(&ref_cache[0 * 8], ref01);
2069 AV_WN32A(&ref_cache[1 * 8], ref01);
2070 AV_WN32A(&ref_cache[2 * 8], ref23);
2071 AV_WN32A(&ref_cache[3 * 8], ref23);
2076 AV_COPY128(mv_dst + 8 * 0, mv_src + 0 * b_stride);
2077 AV_COPY128(mv_dst + 8 * 1, mv_src + 1 * b_stride);
2078 AV_COPY128(mv_dst + 8 * 2, mv_src + 2 * b_stride);
2079 AV_COPY128(mv_dst + 8 * 3, mv_src + 3 * b_stride);
2089 const int mb_xy = h->
mb_xy;
2100 left_xy[
LBOT] = left_xy[
LTOP] = mb_xy - 1;
2105 if (left_mb_field_flag != curr_mb_field_flag)
2108 if (curr_mb_field_flag)
2111 if (left_mb_field_flag != curr_mb_field_flag)
2125 if (qp <= qp_thresh &&
2126 (left_xy[
LTOP] < 0 ||
2132 if ((left_xy[
LTOP] < 0 ||
2147 left_type[
LTOP] = left_type[
LBOT] = 0;
2152 left_type[
LTOP] = left_type[
LBOT] = 0;
2162 top_type, left_type, mb_xy, 0);
2165 top_type, left_type, mb_xy, 1);
2169 AV_COPY32(&nnz_cache[4 + 8 * 1], &nnz[0]);
2170 AV_COPY32(&nnz_cache[4 + 8 * 2], &nnz[4]);
2171 AV_COPY32(&nnz_cache[4 + 8 * 3], &nnz[8]);
2172 AV_COPY32(&nnz_cache[4 + 8 * 4], &nnz[12]);
2177 AV_COPY32(&nnz_cache[4 + 8 * 0], &nnz[3 * 4]);
2180 if (left_type[
LTOP]) {
2182 nnz_cache[3 + 8 * 1] = nnz[3 + 0 * 4];
2183 nnz_cache[3 + 8 * 2] = nnz[3 + 1 * 4];
2184 nnz_cache[3 + 8 * 3] = nnz[3 + 2 * 4];
2185 nnz_cache[3 + 8 * 4] = nnz[3 + 3 * 4];
2192 nnz_cache[4 + 8 * 0] =
2193 nnz_cache[5 + 8 * 0] = (h->
cbp_table[top_xy] & 0x4000) >> 12;
2194 nnz_cache[6 + 8 * 0] =
2195 nnz_cache[7 + 8 * 0] = (h->
cbp_table[top_xy] & 0x8000) >> 12;
2198 nnz_cache[3 + 8 * 1] =
2199 nnz_cache[3 + 8 * 2] = (h->
cbp_table[left_xy[
LTOP]] & 0x2000) >> 12;
2202 nnz_cache[3 + 8 * 3] =
2203 nnz_cache[3 + 8 * 4] = (h->
cbp_table[left_xy[
LBOT]] & 0x8000) >> 12;
2207 nnz_cache[
scan8[0]] =
2208 nnz_cache[scan8[1]] =
2209 nnz_cache[scan8[2]] =
2210 nnz_cache[scan8[3]] = (h->
cbp & 0x1000) >> 12;
2212 nnz_cache[scan8[0 + 4]] =
2213 nnz_cache[scan8[1 + 4]] =
2214 nnz_cache[scan8[2 + 4]] =
2215 nnz_cache[scan8[3 + 4]] = (h->
cbp & 0x2000) >> 12;
2217 nnz_cache[scan8[0 + 8]] =
2218 nnz_cache[scan8[1 + 8]] =
2219 nnz_cache[scan8[2 + 8]] =
2220 nnz_cache[scan8[3 + 8]] = (h->
cbp & 0x4000) >> 12;
2222 nnz_cache[scan8[0 + 12]] =
2223 nnz_cache[scan8[1 + 12]] =
2224 nnz_cache[scan8[2 + 12]] =
2225 nnz_cache[scan8[3 + 12]] = (h->
cbp & 0x8000) >> 12;
2234 uint8_t *dest_y, *dest_cb, *dest_cr;
2235 int linesize, uvlinesize, mb_x, mb_y;
2242 for (mb_x = start_x; mb_x < end_x; mb_x++)
2243 for (mb_y = end_mb_y -
FRAME_MBAFF(h); mb_y <= end_mb_y; mb_y++) {
2257 ((mb_x << pixel_shift) + mb_y * h->
linesize) * 16;
2259 (mb_x << pixel_shift) * (8 <<
CHROMA444(h)) +
2262 (mb_x << pixel_shift) * (8 <<
CHROMA444(h)) +
2287 linesize, uvlinesize);
2290 dest_cr, linesize, uvlinesize);
2322 if ((top + height) >= pic_height)
2323 height += deblock_border;
2324 top -= deblock_border;
2327 if (top >= pic_height || (top + height) < 0)
2330 height =
FFMIN(height, pic_height - top);
2346 int endx,
int endy,
int status)
2348 if (CONFIG_ERROR_RESILIENCE) {
2358 int lf_x_start = h->
mb_x;
2414 if (h->
mb_x >= lf_x_start)
2432 h->
mb_x = lf_x_start = 0;
2447 if (h->
mb_x > lf_x_start)
2471 "error while decoding MB %d %d\n", h->
mb_x, h->
mb_y);
2479 h->
mb_x = lf_x_start = 0;
2516 if (h->
mb_x > lf_x_start)
2548 if (context_count == 1) {
2552 for (i = 1; i < context_count; i++) {
2554 if (CONFIG_ERROR_RESILIENCE) {
2561 NULL, context_count,
sizeof(
void *));
2569 if (CONFIG_ERROR_RESILIENCE) {
2570 for (i = 1; i < context_count; i++)