1 /*
2 * H.26L/H.264/AVC/JVT/14496-10/... decoder
3 * Copyright (c) 2003 Michael Niedermayer <michaelni@gmx.at>
4 *
5 * This file is part of FFmpeg.
6 *
7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * FFmpeg is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with FFmpeg; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22 /**
23 * @file
24 * H.264 / AVC / MPEG4 part10 codec.
25 * @author Michael Niedermayer <michaelni@gmx.at>
26 */
27
28 #define UNCHECKED_BITSTREAM_READER 1
29
53
55
57 {
60 }
61
64 int mb_x, int mb_y, int mb_intra, int mb_skipped)
65 {
67
73 /* FIXME: It is possible albeit uncommon that slice references
74 * differ between slices. We take the easy approach and ignore
75 * it for now. If this turns out to have any relevance in
76 * practice then correct remapping should be added. */
78 ref = 0;
81 ref = 0;
82 }
85 return;
86 }
88 2, 2, 2, ref, 1);
95 }
96
98 {
105 if (field_pic) {
106 height <<= 1;
107 y <<= 1;
108 }
109
111
113 return;
114
118 int i;
119
122 src = cur;
123 else if (last)
124 src = last;
125 else
126 return;
127
129 offset[1] =
130 offset[2] = (y >> vshift) * src->
linesize[1];
132 offset[i] = 0;
133
134 emms_c();
135
138 }
139 }
140
141 /**
142 * Check if the top & left blocks are available if needed and
143 * change the dc mode so it only uses the available blocks.
144 */
146 {
147 static const int8_t top[12] = {
149 };
150 static const int8_t left[12] = {
152 };
153 int i;
154
156 for (i = 0; i < 4; i++) {
158 if (status < 0) {
160 "top block unavailable for requested intra4x4 mode %d at %d %d\n",
163 } else if (status) {
165 }
166 }
167 }
168
170 static const int mask[4] = { 0x8000, 0x2000, 0x80, 0x20 };
171 for (i = 0; i < 4; i++)
174 if (status < 0) {
176 "left block unavailable for requested intra4x4 mode %d at %d %d\n",
179 } else if (status) {
181 }
182 }
183 }
184
185 return 0;
186 } // FIXME cleanup like ff_h264_check_intra_pred_mode
187
188 /**
189 * Check if the top & left blocks are available if needed and
190 * change the dc mode so it only uses the available blocks.
191 */
193 {
196
199 "out of range intra chroma pred mode at %d %d\n",
202 }
203
206 if (mode < 0) {
208 "top block unavailable for requested intra mode at %d %d\n",
211 }
212 }
213
216 if (mode < 0) {
218 "left block unavailable for requested intra mode at %d %d\n",
221 }
223 // mad cow disease mode, aka MBAFF + constrained_intra_pred
227 }
228 }
229
231 }
232
234 int *dst_length,
int *consumed,
int length)
235 {
236 int i, si, di;
238 int bufidx;
239
240 // src[0]&0x80; // forbidden bit
243
244 src++;
245 length--;
246
247 #define STARTCODE_TEST \
248 if (i + 2 < length && src[i + 1] == 0 && src[i + 2] <= 3) { \
249 if (src[i + 2] != 3 && src[i + 2] != 0) { \
250 /* startcode, so we must be past the end */ \
251 length = i; \
252 } \
253 break; \
254 }
255
256 #if HAVE_FAST_UNALIGNED
257 #define FIND_FIRST_ZERO \
258 if (i > 0 && !src[i]) \
259 i--; \
260 while (src[i]) \
261 i++
262
263 #if HAVE_FAST_64BIT
264 for (i = 0; i + 1 <
length; i += 9) {
266 (
AV_RN64A(src + i) - 0x0100010001000101ULL)) &
267 0x8000800080008080ULL))
268 continue;
269 FIND_FIRST_ZERO;
271 i -= 7;
272 }
273 #else
274 for (i = 0; i + 1 <
length; i += 5) {
276 (
AV_RN32A(src + i) - 0x01000101U)) &
277 0x80008080U))
278 continue;
279 FIND_FIRST_ZERO;
281 i -= 3;
282 }
283 #endif
284 #else
285 for (i = 0; i + 1 <
length; i += 2) {
286 if (src[i])
287 continue;
288 if (i > 0 && src[i - 1] == 0)
289 i--;
291 }
292 #endif
293
294 // use second escape buffer for inter data
296
299
300 if (!dst)
302
303 if(i>=length-1){ //no escaped 0
305 *consumed= length+1; //+1 for the header
308 }else{
309 memcpy(dst, src, length);
310 return dst;
311 }
312 }
313
314 memcpy(dst, src, i);
315 si = di = i;
316 while (si + 2 < length) {
317 // remove escapes (very rare 1:2^22)
318 if (src[si + 2] > 3) {
319 dst[di++] = src[si++];
320 dst[di++] = src[si++];
321 } else if (src[si] == 0 && src[si + 1] == 0 && src[si + 2] != 0) {
322 if (src[si + 2] == 3) { // escape
323 dst[di++] = 0;
324 dst[di++] = 0;
325 si += 3;
326 continue;
327 } else // next start code
328 goto nsc;
329 }
330
331 dst[di++] = src[si++];
332 }
333 while (si < length)
334 dst[di++] = src[si++];
335
336 nsc:
338
339 *dst_length = di;
340 *consumed = si + 1; // +1 for the header
341 /* FIXME store exact number of bits in the getbitcontext
342 * (it is needed for decoding) */
343 return dst;
344 }
345
346 /**
347 * Identify the exact end of the bitstream
348 * @return the length of the trailing, or 0 if damaged
349 */
351 {
354
356
357 for (r = 1; r < 9; r++) {
358 if (v & 1)
360 v >>= 1;
361 }
362 return 0;
363 }
364
366 {
367 int i;
369
380
383
388
389 if (free_rbsp && h->
DPB) {
397 }
398
400
403 if (!hx)
404 continue;
415
416 if (free_rbsp) {
421 }
422 if (i)
424 }
425 }
426
428 {
432
434 row_mb_num, 8 *
sizeof(
uint8_t), fail)
436 big_mb_num * 48 *
sizeof(
uint8_t), fail)
440 big_mb_num * sizeof(uint16_t), fail)
442 big_mb_num *
sizeof(
uint8_t), fail)
444 row_mb_num, 16 *
sizeof(
uint8_t), fail);
446 row_mb_num, 16 *
sizeof(
uint8_t), fail);
448 4 * big_mb_num *
sizeof(
uint8_t), fail);
450 big_mb_num *
sizeof(
uint8_t), fail)
451
455
457 big_mb_num * sizeof(uint32_t), fail);
459 big_mb_num * sizeof(uint32_t), fail);
463 const int b_xy = 4 * x + 4 * y * h->
b_stride;
464
467 }
468
471
475 goto fail;
479 }
480
481 return 0;
482
483 fail:
486 }
487
488 /**
489 * Init context
490 * Allocate buffers which are not shared amongst multiple threads.
491 */
493 {
498 int yc_size = y_size + 2 * c_size;
500
505
512
513 if (CONFIG_ERROR_RESILIENCE) {
514 /* init ER */
519
525
526 // error resilience code looks cleaner with this
528 (h->
mb_num + 1) *
sizeof(
int), fail);
529
533
536
538 mb_array_size *
sizeof(
uint8_t), fail);
539
542
544
547
549 yc_size * sizeof(int16_t), fail);
553 for (i = 0; i < yc_size; i++)
555 }
556
557 return 0;
558
559 fail:
560 return AVERROR(ENOMEM);
// ff_h264_free_tables will clean up for us
561 }
562
564 int parse_extradata);
565
567 {
570
571 if (!buf || size <= 0)
572 return -1;
573
574 if (buf[0] == 1) {
575 int i, cnt, nalsize;
576 const unsigned char *p =
buf;
577
579
580 if (size < 7) {
582 "avcC %d too short\n", size);
584 }
585 /* sps and pps in the avcC always have length coded with 2 bytes,
586 * so put a fake nal_length_size = 2 while parsing them */
588 // Decode sps from avcC
589 cnt = *(p + 5) & 0x1f; // Number of sps
590 p += 6;
591 for (i = 0; i < cnt; i++) {
593 if(nalsize > size - (p-buf))
596 if (ret < 0) {
598 "Decoding sps %d from avcC failed\n", i);
600 }
601 p += nalsize;
602 }
603 // Decode pps from avcC
604 cnt = *(p++); // Number of pps
605 for (i = 0; i < cnt; i++) {
607 if(nalsize > size - (p-buf))
610 if (ret < 0) {
612 "Decoding pps %d from avcC failed\n", i);
614 }
615 p += nalsize;
616 }
617 // Store right nal length size that will be used to parse all other nals
619 } else {
622 if (ret < 0)
624 }
626 }
627
629 {
631 int i;
633
635
638
641
647
650
651 /* needed so that IDCT permutation is known early */
653
656
661
662 /* set defaults */
663 // s->decode_mb = ff_h263_decode_mb;
666
668
670
672
675
689 } else
691 }
693 }
694
697 if (ret < 0) {
700 }
701 }
702
707 }
708
710
712
713 return 0;
714 }
715
717 {
719
721 return 0;
724
731
732 return 0;
733 }
734
735 /**
736 * Run setup operations that must be run after slice header decoding.
737 * This includes finding the next displayed frame.
738 *
739 * @param h h264 master context
740 * @param setup_finished enough NALs have been read that we can call
741 * ff_thread_finish_setup()
742 */
744 {
747 int i, pics, out_of_order, out_idx;
748
750
752 return;
753
755 /* FIXME: if we have two PAFF fields in one packet, we can't start
756 * the next thread here. If we have one field per packet, we can.
757 * The check in decode_nal_units() is not good enough to find this
758 * yet, so we assume the worst for now. */
759 // if (setup_finished)
760 // ff_thread_finish_setup(h->avctx);
762 return;
764 return;
765 }
766
769
770 /* Signal interlacing information externally. */
771 /* Prioritize picture timing SEI information over used
772 * decoding process if it exists. */
773
777 break;
781 break;
786 else
787 // try to flag soft telecine progressive
789 break;
792 /* Signal the possibility of telecined film externally
793 * (pic_struct 5,6). From these hints, let the applications
794 * decide if they apply deinterlacing. */
796 break;
799 break;
802 break;
803 }
804
808 } else {
809 /* Derive interlacing flag from used decoding process. */
811 }
813
815 /* Derive top_field_first from field pocs. */
817 } else {
819 /* Use picture timing SEI information. Even if it is a
820 * information of a past frame, better than nothing. */
824 else
826 } else {
827 /* Most likely progressive */
829 }
830 }
831
838 if (stereo) {
840 case 0:
842 break;
843 case 1:
845 break;
846 case 2:
848 break;
849 case 3:
852 else
854 break;
855 case 4:
857 break;
858 case 5:
860 break;
861 case 6:
863 break;
864 }
865
868 }
869 }
870
877 if (rotation) {
881 }
882 }
883
886
887 // FIXME do something with unavailable reference frames
888
889 /* Sort B-frames into display order */
890
895 }
896
901 }
902
903 for (i = 0; 1; i++) {
905 if(i)
907 break;
908 } else if(i) {
910 }
911 }
915 out_of_order =
FFMAX(out_of_order, 1);
926 }
927
928 pics = 0;
930 pics++;
931
933
937
939 out_idx = 0;
943 i++)
946 out_idx = i;
947 }
952
955 // for frame threading, the owner must be the second field's thread or
956 // else the first thread can release the picture and reuse it unsafely
959 }
964 } else
966 } else {
968 }
969
972 // We have reached an recovery point and all frames after it in
973 // display order are "recovered".
975 }
977 }
978
981 }
982
984 {
985 int list, i;
986 int luma_def, chroma_def;
987
993
997 }
1001 }
1002
1005
1006 for (list = 0; list < 2; list++) {
1009 for (i = 0; i < h->
ref_count[list]; i++) {
1010 int luma_weight_flag, chroma_weight_flag;
1011
1013 if (luma_weight_flag) {
1020 }
1021 } else {
1024 }
1025
1028 if (chroma_weight_flag) {
1029 int j;
1030 for (j = 0; j < 2; j++) {
1037 }
1038 }
1039 } else {
1040 int j;
1041 for (j = 0; j < 2; j++) {
1044 }
1045 }
1046 }
1047 }
1049 break;
1050 }
1052 return 0;
1053 }
1054
1055 /**
1056 * instantaneous decoder refresh.
1057 */
1059 {
1060 int i;
1068 }
1069
1070 /* forget old pics after a seek */
1072 {
1073 int i, j;
1074
1078
1086 }
1088
1096 }
1097
1098 /* forget old pics after a seek */
1100 {
1102 int i;
1103
1105
1107
1113
1115
1118 }
1119
1121 {
1123 int field_poc[2];
1124
1128
1131
1138 else
1140 field_poc[0] =
1145 int abs_frame_num, expected_delta_per_poc_cycle, expectedpoc;
1146 int i;
1147
1150 else
1151 abs_frame_num = 0;
1152
1154 abs_frame_num--;
1155
1156 expected_delta_per_poc_cycle = 0;
1158 // FIXME integrate during sps parse
1160
1161 if (abs_frame_num > 0) {
1164
1165 expectedpoc = poc_cycle_cnt * expected_delta_per_poc_cycle;
1166 for (i = 0; i <= frame_num_in_poc_cycle; i++)
1168 } else
1169 expectedpoc = 0;
1170
1173
1174 field_poc[0] = expectedpoc + h->
delta_poc[0];
1176
1179 } else {
1181
1183 poc--;
1184
1185 field_poc[0] = poc;
1186 field_poc[1] = poc;
1187 }
1188
1190 pic_field_poc[0] = field_poc[0];
1192 pic_field_poc[1] = field_poc[1];
1193 *pic_poc =
FFMIN(pic_field_poc[0], pic_field_poc[1]);
1194
1195 return 0;
1196 }
1197
1198 /**
1199 * Compute profile from profile_idc and constraint_set?_flags.
1200 *
1201 * @param sps SPS
1202 *
1203 * @return profile as defined by FF_PROFILE_H264_*
1204 */
1206 {
1208
1211 // constraint_set1_flag set to 1
1213 break;
1217 // constraint_set3_flag set to 1
1219 break;
1220 }
1221
1223 }
1224
1226 {
1232 "Reenabling low delay requires a codec flush.\n");
1233 else
1235 }
1236
1239
1246 "VDPAU decoding does not support video colorspace.\n");
1248 }
1254
1261
1263 } else {
1267 }
1268 }
1269 return 0;
1270 }
1271
1273 {
1274 int ref_count[2], list_count;
1275 int num_ref_idx_active_override_flag;
1276
1277 // set defaults, might be overridden a few lines later
1280
1282 unsigned max[2];
1284
1287 num_ref_idx_active_override_flag =
get_bits1(&h->
gb);
1288
1289 if (num_ref_idx_active_override_flag) {
1293 } else
1294 // full range is spec-ok in this case, even for frames
1295 ref_count[1] = 1;
1296 }
1297
1298 if (ref_count[0]-1 > max[0] || ref_count[1]-1 > max[1]){
1299 av_log(h->
avctx,
AV_LOG_ERROR,
"reference overflow %u > %u or %u > %u\n", ref_count[0]-1, max[0], ref_count[1]-1, max[1]);
1303 }
1304
1306 list_count = 2;
1307 else
1308 list_count = 1;
1309 } else {
1310 list_count = 0;
1311 ref_count[0] = ref_count[1] = 0;
1312 }
1313
1320 return 1;
1321 }
1322
1323 return 0;
1324 }
1325
1327
1329 const uint8_t *ptr,
int dst_length,
1330 int i, int next_avc)
1331 {
1333 buf[i] == 0x00 && buf[i + 1] == 0x00 &&
1334 buf[i + 2] == 0x01 && buf[i + 3] == 0xE0)
1336
1338 while (dst_length > 0 && ptr[dst_length - 1] == 0)
1339 dst_length--;
1340
1341 if (!dst_length)
1342 return 0;
1343
1345 }
1346
1348 {
1349 int next_avc = h->
is_avc ? 0 : buf_size;
1350 int nal_index = 0;
1351 int buf_index = 0;
1352 int nals_needed = 0;
1353 int first_slice = 0;
1354
1355 while(1) {
1356 int nalsize = 0;
1357 int dst_length, bit_length, consumed;
1359
1360 if (buf_index >= next_avc) {
1362 if (nalsize < 0)
1363 break;
1364 next_avc = buf_index + nalsize;
1365 } else {
1367 if (buf_index >= buf_size)
1368 break;
1369 if (buf_index >= next_avc)
1370 continue;
1371 }
1372
1374 next_avc - buf_index);
1375
1376 if (!ptr || dst_length < 0)
1378
1379 buf_index += consumed;
1380
1382 buf_index, next_avc);
1383 nal_index++;
1384
1385 /* packets can sometimes contain multiple PPS/SPS,
1386 * e.g. two PAFF field pictures in one packet, or a demuxer
1387 * which splits NALs strangely if so, when frame threading we
1388 * can't start the next thread until we've read all of them */
1392 nals_needed = nal_index;
1393 break;
1399 !first_slice ||
1401 nals_needed = nal_index;
1402 if (!first_slice)
1404 }
1405 }
1406
1407 return nals_needed;
1408 }
1409
1411 int parse_extradata)
1412 {
1415 int buf_index;
1416 unsigned context_count;
1417 int next_avc;
1418 int nals_needed = 0; ///< number of NALs that need decoding before the next frame thread starts
1419 int nal_index;
1420 int idr_cleared=0;
1422
1424
1433 }
1434
1436 if (buf_size > 8 &&
AV_RB32(buf) == 1 &&
AV_RB32(buf+5) > (
unsigned)buf_size) {
1438 }
else if(buf_size > 3 &&
AV_RB32(buf) > 1 &&
AV_RB32(buf) <= (
unsigned)buf_size)
1440 }
1441
1444
1445 {
1446 buf_index = 0;
1447 context_count = 0;
1448 next_avc = h->
is_avc ? 0 : buf_size;
1449 nal_index = 0;
1450 for (;;) {
1451 int consumed;
1452 int dst_length;
1453 int bit_length;
1455 int nalsize = 0;
1456 int err;
1457
1458 if (buf_index >= next_avc) {
1460 if (nalsize < 0)
1461 break;
1462 next_avc = buf_index + nalsize;
1463 } else {
1465 if (buf_index >= buf_size)
1466 break;
1467 if (buf_index >= next_avc)
1468 continue;
1469 }
1470
1472
1474 &consumed, next_avc - buf_index);
1475 if (!ptr || dst_length < 0) {
1476 ret = -1;
1478 }
1479
1481 buf_index + consumed, next_avc);
1482
1485 "NAL %d/%d at %d/%d length %d\n",
1487
1488 if (h->
is_avc && (nalsize != consumed) && nalsize)
1490 "AVC: Consumed only %d bytes instead of %d\n",
1491 consumed, nalsize);
1492
1493 buf_index += consumed;
1494 nal_index++;
1495
1499 continue;
1500
1501 again:
1505 /* Ignore per frame NAL unit type during extradata
1506 * parsing. Decoding slices is not possible in codec init
1507 * with frame-mt */
1508 if (parse_extradata) {
1516 "Ignoring NAL %d in global header/extradata\n",
1518 // fall through to next case
1521 }
1522 }
1523
1524 err = 0;
1525
1528 if ((ptr[0] & 0xFC) == 0x98) {
1531 ret = -1;
1533 }
1536 "Invalid mix of idr and non-idr slices\n");
1537 ret = -1;
1539 }
1540 if(!idr_cleared)
1541 idr(h);
// FIXME ensure we don't lose some frames if there is reordering
1542 idr_cleared = 1;
1548
1550 break;
1551
1555
1560
1563 }
1564 }
1565
1568
1573 }
1574 // If we have an IDR, all frames after it in decoded order are
1575 // "recovered".
1580 #if 1
1582 #else
1584 #endif
1585
1589
1593 if (CONFIG_H264_VDPAU_DECODER &&
1596 }
1597
1601 &buf[buf_index - consumed],
1602 consumed);
1603 if (ret < 0)
1605 } else if (CONFIG_H264_VDPAU_DECODER &&
1608 start_code,
1609 sizeof(start_code));
1611 &buf[buf_index - consumed],
1612 consumed);
1613 } else
1614 context_count++;
1615 }
1616 break;
1623 break;
1629 break;
1634 "SPS decoding failure, trying again with the complete NAL\n");
1636 av_assert0(next_avc - buf_index + consumed == nalsize);
1637 if ((next_avc - buf_index + consumed - 1) >= INT_MAX/8)
1638 break;
1640 8*(next_avc - buf_index + consumed - 1));
1642 }
1643
1644 break;
1650 break;
1657 break;
1659 break;
1660 default:
1663 }
1664
1669 context_count = 0;
1670 }
1671
1673 if (err < 0)
1677 /* Slice could not be decoded in parallel mode, copy down
1678 * NAL unit stuff to context 0 and restart. Note that
1679 * rbsp_buffer is not transferred, but since we no longer
1680 * run in parallel mode this should not be an issue. */
1683 hx = h;
1684 goto again;
1685 }
1686 }
1687 }
1688 if (context_count) {
1692 }
1693
1694 ret = 0;
1696 /* clean up */
1700 }
1701
1702 return (ret < 0) ? ret : buf_index;
1703 }
1704
1705 /**
1706 * Return the number of bytes consumed for building the current frame.
1707 */
1709 {
1710 if (pos == 0)
1711 pos = 1; // avoid infinite loops (I doubt that is needed but...)
1712 if (pos + 10 > buf_size)
1713 pos = buf_size; // oops ;)
1714
1715 return pos;
1716 }
1717
1719 {
1722 int i;
1724 if (ret < 0)
1726
1728
1732 return 0;
1733
1739 dst->
data[i] += off;
1740 }
1741 return 0;
1742 }
1743
1745 {
1746 int cnt= buf[5]&0x1f;
1748 while(cnt--){
1750 if(nalsize > buf_size - (p-buf) || p[2]!=0x67)
1751 return 0;
1752 p += nalsize;
1753 }
1754 cnt = *(p++);
1755 if(!cnt)
1756 return 0;
1757 while(cnt--){
1759 if(nalsize > buf_size - (p-buf) || p[2]!=0x68)
1760 return 0;
1761 p += nalsize;
1762 }
1763 return 1;
1764 }
1765
1768 {
1770 int buf_size = avpkt->
size;
1773 int buf_index = 0;
1775 int i, out_idx;
1777
1779
1781
1782 /* end of stream, output what is still in the buffers */
1783 if (buf_size == 0) {
1784 out:
1785
1788
1789 // FIXME factorize this with the output code below
1791 out_idx = 0;
1792 for (i = 1;
1796 i++)
1799 out_idx = i;
1800 }
1801
1804
1808 if (ret < 0)
1810 *got_frame = 1;
1811 }
1812
1813 return buf_index;
1814 }
1816 int side_size;
1820 }
1821 if(h->
is_avc && buf_size >= 9 && buf[0]==1 && buf[2]==0 && (buf[4]&0xFC)==0xFC && (buf[5]&0x1F) && buf[8]==0x67){
1824 }
1825
1827 if (buf_index < 0)
1829
1833 }
1834
1837 buf_size >= 4 && !memcmp("Q264", buf, 4))
1838 return buf_size;
1841 }
1842
1847
1849
1850 /* Wait for second field. */
1851 *got_frame = 0;
1856
1860 ) {
1861 int p;
1865 int linesizes[4];
1867
1869
1870 for (p = 0; p<4; p++) {
1874 }
1875
1878 }
1879
1881 if (ret < 0)
1883 *got_frame = 1;
1884 if (CONFIG_MPEGVIDEO) {
1891 }
1892 }
1893 }
1894
1896
1898
1900 }
1901
1903 {
1904 int i;
1905
1907
1910
1913 }
1914
1916 {
1918
1921
1924
1925 return 0;
1926 }
1927
1943 };
1944
1949 };
1950
1956 };
1957
1967 .capabilities =
/*CODEC_CAP_DRAW_HORIZ_BAND |*/ CODEC_CAP_DR1 |
1975 };
1976
1977 #if CONFIG_H264_VDPAU_DECODER
1978 static const AVClass h264_vdpau_class = {
1983 };
1984
1985 AVCodec ff_h264_vdpau_decoder = {
1986 .
name =
"h264_vdpau",
1987 .long_name =
NULL_IF_CONFIG_SMALL(
"H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (VDPAU acceleration)"),
1999 .priv_class = &h264_vdpau_class,
2000 };
2001 #endif