1 /*
2 * - CrystalHD decoder module -
3 *
4 * Copyright(C) 2010,2011 Philip Langdale <ffmpeg.philipl@overt.org>
5 *
6 * This file is part of FFmpeg.
7 *
8 * FFmpeg is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * FFmpeg is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with FFmpeg; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
23 /*
24 * - Principles of Operation -
25 *
26 * The CrystalHD decoder operates at the bitstream level - which is an even
27 * higher level than the decoding hardware you typically see in modern GPUs.
28 * This means it has a very simple interface, in principle. You feed demuxed
29 * packets in one end and get decoded picture (fields/frames) out the other.
30 *
31 * Of course, nothing is ever that simple. Due, at the very least, to b-frame
32 * dependencies in the supported formats, the hardware has a delay between
33 * when a packet goes in, and when a picture comes out. Furthermore, this delay
34 * is not just a function of time, but also one of the dependency on additional
35 * frames being fed into the decoder to satisfy the b-frame dependencies.
36 *
37 * As such, a pipeline will build up that is roughly equivalent to the required
38 * DPB for the file being played. If that was all it took, things would still
39 * be simple - so, of course, it isn't.
40 *
41 * The hardware has a way of indicating that a picture is ready to be copied out,
42 * but this is unreliable - and sometimes the attempt will still fail so, based
43 * on testing, the code will wait until 3 pictures are ready before starting
44 * to copy out - and this has the effect of extending the pipeline.
45 *
46 * Finally, while it is tempting to say that once the decoder starts outputting
47 * frames, the software should never fail to return a frame from a decode(),
48 * this is a hard assertion to make, because the stream may switch between
49 * differently encoded content (number of b-frames, interlacing, etc) which
50 * might require a longer pipeline than before. If that happened, you could
51 * deadlock trying to retrieve a frame that can't be decoded without feeding
52 * in additional packets.
53 *
54 * As such, the code will return in the event that a picture cannot be copied
55 * out, leading to an increase in the length of the pipeline. This in turn,
56 * means we have to be sensitive to the time it takes to decode a picture;
57 * We do not want to give up just because the hardware needed a little more
58 * time to prepare the picture! For this reason, there are delays included
59 * in the decode() path that ensure that, under normal conditions, the hardware
60 * will only fail to return a frame if it really needs additional packets to
61 * complete the decoding.
62 *
63 * Finally, to be explicit, we do not want the pipeline to grow without bound
64 * for two reasons: 1) The hardware can only buffer a finite number of packets,
65 * and 2) The client application may not be able to cope with arbitrarily long
66 * delays in the video path relative to the audio path. For example. MPlayer
67 * can only handle a 20 picture delay (although this is arbitrary, and needs
68 * to be extended to fully support the CrystalHD where the delay could be up
69 * to 32 pictures - consider PAFF H.264 content with 16 b-frames).
70 */
71
72 /*****************************************************************************
73 * Includes
74 ****************************************************************************/
75
76 #define _XOPEN_SOURCE 600
77 #include <inttypes.h>
78 #include <stdio.h>
79 #include <stdlib.h>
80
81 #include <libcrystalhd/bc_dts_types.h>
82 #include <libcrystalhd/bc_dts_defs.h>
83 #include <libcrystalhd/libcrystalhd_if.h>
84
91
92 #if HAVE_UNISTD_H
93 #include <unistd.h>
94 #endif
95
96 /** Timeout parameter passed to DtsProcOutput() in us */
97 #define OUTPUT_PROC_TIMEOUT 50
98 /** Step between fake timestamps passed to hardware in units of 100ns */
99 #define TIMESTAMP_UNIT 100000
100 /** Initial value in us of the wait in decode() */
101 #define BASE_WAIT 10000
102 /** Increment in us to adjust wait in decode() */
103 #define WAIT_UNIT 1000
104
105
106 /*****************************************************************************
107 * Module private data
108 ****************************************************************************/
109
117
124
130
133
136
145
147
150
151 /* Options */
155
157 { "crystalhd_downscale_width",
158 "Turn on downscaling to the specified width",
162 { NULL, },
163 };
164
165
166 /*****************************************************************************
167 * Helper functions
168 ****************************************************************************/
169
171 {
172 switch (id) {
174 return BC_MSUBTYPE_DIVX;
176 return BC_MSUBTYPE_DIVX311;
178 return BC_MSUBTYPE_MPEG2VIDEO;
180 return BC_MSUBTYPE_VC1;
182 return BC_MSUBTYPE_WMV3;
184 return priv->
is_nal ? BC_MSUBTYPE_AVC1 : BC_MSUBTYPE_H264;
185 default:
186 return BC_MSUBTYPE_INVALID;
187 }
188 }
189
191 {
194 output->YBuffDoneSz);
196 output->UVBuffDoneSz);
198 output->PicInfo.timeStamp);
200 output->PicInfo.picture_number);
202 output->PicInfo.width);
204 output->PicInfo.height);
206 output->PicInfo.chroma_format);
208 output->PicInfo.pulldown);
210 output->PicInfo.flags);
212 output->PicInfo.frame_rate);
214 output->PicInfo.aspect_ratio);
216 output->PicInfo.colour_primaries);
218 output->PicInfo.picture_meta_payload);
220 output->PicInfo.sess_num);
222 output->PicInfo.ycom);
224 output->PicInfo.custom_aspect_ratio_width_height);
226 output->PicInfo.n_drop);
228 output->PicInfo.other.h264.valid);
229 }
230
231
232 /*****************************************************************************
233 * OpaqueList functions
234 ****************************************************************************/
235
238 {
240 if (!newNode) {
242 "Unable to allocate new node in OpaqueList.\n");
243 return 0;
244 }
247 priv->
head = newNode;
248 } else {
251 }
252 priv->
tail = newNode;
255
257 }
258
259 /*
260 * The OpaqueList is built in decode order, while elements will be removed
261 * in presentation order. If frames are reordered, this means we must be
262 * able to remove elements that are not the first element.
263 *
264 * Returned node must be freed by caller.
265 */
267 {
269
272 "CrystalHD: Attempted to query non-existent timestamps.\n");
273 return NULL;
274 }
275
276 /*
277 * The first element is special-cased because we have to manipulate
278 * the head pointer rather than the previous element in the list.
279 */
282
285
287 return node;
288 }
289
290 /*
291 * The list is processed at arm's length so that we have the
292 * previous element available to rewrite its next pointer.
293 */
298
301
302 current->
next = NULL;
303 return current;
304 } else {
305 node = current;
306 }
307 }
308
310 "CrystalHD: Couldn't match fake_timestamp.\n");
311 return NULL;
312 }
313
314
315 /*****************************************************************************
316 * Video decoder API function definitions
317 ****************************************************************************/
318
320 {
322
329
331
332 /* Flush mode 4 flushes all software and hardware buffers. */
333 DtsFlushInput(priv->
dev, 4);
334 }
335
336
338 {
341
343 DtsStopDecoder(device);
344 DtsCloseDecoder(device);
345 DtsDeviceClose(device);
346
347 /*
348 * Restore original extradata, so that if the decoder is
349 * reinitialised, the bitstream detection and filtering
350 * will work as expected.
351 */
358 }
359
363 }
364
366
368
371 while (node) {
374 node = next;
375 }
376 }
377
378 return 0;
379 }
380
381
383 {
387 BC_INPUT_FORMAT format = {
390 .OptFlags = 0x80000000 | vdecFrameRate59_94 | 0x40,
391 .width = avctx->
width,
393 };
394
395 BC_MEDIA_SUBTYPE subtype;
396
397 uint32_t
mode = DTS_PLAYBACK_MODE |
398 DTS_LOAD_FILE_PLAY_FW |
399 DTS_SKIP_TX_CHK_CPB |
400 DTS_PLAYBACK_DROP_RPT_MODE |
401 DTS_SINGLE_THREADED_MODE |
402 DTS_DFLT_RESOLUTION(vdecRESOLUTION_1080p23_976);
403
406
408
409 /* Initialize the library */
416
418 switch (subtype) {
419 case BC_MSUBTYPE_AVC1:
420 {
422 int dummy_int;
423
424 /* Back up the extradata so it can be restored at close time. */
428 "Failed to allocate copy of extradata\n");
430 }
433
437 "Cannot open the h264_mp4toannexb BSF!\n");
439 }
441 &dummy_int, NULL, 0, 0);
442 }
443 subtype = BC_MSUBTYPE_H264;
444 // Fall-through
445 case BC_MSUBTYPE_H264:
446 format.startCodeSz = 4;
447 // Fall-through
448 case BC_MSUBTYPE_VC1:
449 case BC_MSUBTYPE_WVC1:
450 case BC_MSUBTYPE_WMV3:
451 case BC_MSUBTYPE_WMVA:
452 case BC_MSUBTYPE_MPEG2VIDEO:
453 case BC_MSUBTYPE_DIVX:
454 case BC_MSUBTYPE_DIVX311:
457 break;
458 default:
461 }
462 format.mSubtype = subtype;
463
465 format.bEnableScaling = 1;
466 format.ScalingParams.sWidth = priv->
sWidth;
467 }
468
469 /* Get a decoder instance */
471 // Initialize the Link and Decoder devices
472 ret = DtsDeviceOpen(&priv->
dev, mode);
473 if (ret != BC_STS_SUCCESS) {
475 goto fail;
476 }
477
478 ret = DtsCrystalHDVersion(priv->
dev, &version);
479 if (ret != BC_STS_SUCCESS) {
481 "CrystalHD: DtsCrystalHDVersion failed\n");
482 goto fail;
483 }
484 priv->
is_70012 = version.device == 0;
485
487 (subtype == BC_MSUBTYPE_DIVX || subtype == BC_MSUBTYPE_DIVX311)) {
489 "CrystalHD: BCM70012 doesn't support MPEG4-ASP/DivX/Xvid\n");
490 goto fail;
491 }
492
493 ret = DtsSetInputFormat(priv->
dev, &format);
494 if (ret != BC_STS_SUCCESS) {
496 goto fail;
497 }
498
499 ret = DtsOpenDecoder(priv->
dev, BC_STREAM_TYPE_ES);
500 if (ret != BC_STS_SUCCESS) {
502 goto fail;
503 }
504
505 ret = DtsSetColorSpace(priv->
dev, OUTPUT_MODE422_YUY2);
506 if (ret != BC_STS_SUCCESS) {
508 goto fail;
509 }
510 ret = DtsStartDecoder(priv->
dev);
511 if (ret != BC_STS_SUCCESS) {
513 goto fail;
514 }
515 ret = DtsStartCapture(priv->
dev);
516 if (ret != BC_STS_SUCCESS) {
518 goto fail;
519 }
520
525 "Cannot open the h.264 parser! Interlaced h.264 content "
526 "will not be detected reliably.\n");
528 }
530
531 return 0;
532
533 fail:
535 return -1;
536 }
537
538
540 BC_DTS_PROC_OUT *output,
541 void *
data,
int *got_frame)
542 {
544 BC_DTS_STATUS decoder_status = { 0, };
547
551
552 uint8_t bottom_field = (output->PicInfo.flags & VDEC_FLAG_BOTTOMFIELD) ==
553 VDEC_FLAG_BOTTOMFIELD;
554 uint8_t bottom_first = !!(output->PicInfo.flags & VDEC_FLAG_BOTTOM_FIRST);
555
556 int width = output->PicInfo.width;
557 int height = output->PicInfo.height;
558 int bwidth;
560 int sStride;
562 int dStride;
563
564 if (output->PicInfo.timeStamp != 0) {
566 if (node) {
570 } else {
571 /*
572 * We will encounter a situation where a timestamp cannot be
573 * popped if a second field is being returned. In this case,
574 * each field has the same timestamp and the first one will
575 * cause it to be popped. To keep subsequent calculations
576 * simple, pic_type should be set a FIELD value - doesn't
577 * matter which, but I chose BOTTOM.
578 */
580 }
582 output->PicInfo.timeStamp);
584 pic_type);
585 }
586
587 ret = DtsGetDriverStatus(priv->
dev, &decoder_status);
588 if (ret != BC_STS_SUCCESS) {
590 "CrystalHD: GetDriverStatus failed: %u\n", ret);
592 }
593
594 /*
595 * For most content, we can trust the interlaced flag returned
596 * by the hardware, but sometimes we can't. These are the
597 * conditions under which we can trust the flag:
598 *
599 * 1) It's not h.264 content
600 * 2) The UNKNOWN_SRC flag is not set
601 * 3) We know we're expecting a second field
602 * 4) The hardware reports this picture and the next picture
603 * have the same picture number.
604 *
605 * Note that there can still be interlaced content that will
606 * fail this check, if the hardware hasn't decoded the next
607 * picture or if there is a corruption in the stream. (In either
608 * case a 0 will be returned for the next picture number)
609 */
611 !(output->PicInfo.flags & VDEC_FLAG_UNKNOWN_SRC) ||
613 (decoder_status.picNumFlags & ~0x40000000) ==
614 output->PicInfo.picture_number;
615
616 /*
617 * If we got a false negative for trust_interlaced on the first field,
618 * we will realise our mistake here when we see that the picture number is that
619 * of the previous picture. We cannot recover the frame and should discard the
620 * second field to keep the correct number of output frames.
621 */
624 "Incorrectly guessed progressive frame. Discarding second field\n");
625 /* Returning without providing a picture. */
627 }
628
629 interlaced = (output->PicInfo.flags & VDEC_FLAG_INTERLACED_SRC) &&
630 trust_interlaced;
631
632 if (!trust_interlaced && (decoder_status.picNumFlags & ~0x40000000) == 0) {
634 "Next picture number unknown. Assuming progressive frame.\n");
635 }
636
638 interlaced, trust_interlaced);
639
642
644
648 }
649
652 int pStride;
653
654 if (width <= 720)
655 pStride = 720;
656 else if (width <= 1280)
657 pStride = 1280;
658 else pStride = 1920;
660 } else {
661 sStride = bwidth;
662 }
663
666
668
669 if (interlaced) {
670 int dY = 0;
671 int sY = 0;
672
673 height /= 2;
674 if (bottom_field) {
676 dY = 1;
677 } else {
679 dY = 0;
680 }
681
682 for (sY = 0; sY <
height; dY++, sY++) {
683 memcpy(&(dst[dY * dStride]), &(src[sY * sStride]), bwidth);
684 dY++;
685 }
686 } else {
688 }
689
691 if (interlaced)
693
695
697 *got_frame = 1;
700 }
701 }
702
703 /*
704 * Two types of PAFF content have been observed. One form causes the
705 * hardware to return a field pair and the other individual fields,
706 * even though the input is always individual fields. We must skip
707 * copying on the next decode() call to maintain pipeline length in
708 * the first case.
709 */
710 if (!interlaced && (output->PicInfo.flags & VDEC_FLAG_UNKNOWN_SRC) &&
714 }
715
716 /*
717 * The logic here is purely based on empirical testing with samples.
718 * If we need a second field, it could come from a second input packet,
719 * or it could come from the same field-pair input packet at the current
720 * field. In the first case, we should return and wait for the next time
721 * round to get the second field, while in the second case, we should
722 * ask the decoder for it immediately.
723 *
724 * Testing has shown that we are dealing with the fieldpair -> two fields
725 * case if the VDEC_FLAG_UNKNOWN_SRC is not set or if the input picture
726 * type was PICT_FRAME (in this second case, the flag might still be set)
727 */
729 (!(output->PicInfo.flags & VDEC_FLAG_UNKNOWN_SRC) ||
732 }
733
734
736 void *
data,
int *got_frame)
737 {
739 BC_DTS_PROC_OUT output = {
740 .PicInfo.width = avctx->
width,
741 .PicInfo.height = avctx->
height,
742 };
745
746 *got_frame = 0;
747
748 // Request decoded data from the driver
750 if (ret == BC_STS_FMT_CHANGE) {
752 avctx->
width = output.PicInfo.width;
753 avctx->
height = output.PicInfo.height;
754 switch ( output.PicInfo.aspect_ratio ) {
755 case vdecAspectRatioSquare:
757 break;
758 case vdecAspectRatio12_11:
760 break;
761 case vdecAspectRatio10_11:
763 break;
764 case vdecAspectRatio16_11:
766 break;
767 case vdecAspectRatio40_33:
769 break;
770 case vdecAspectRatio24_11:
772 break;
773 case vdecAspectRatio20_11:
775 break;
776 case vdecAspectRatio32_11:
778 break;
779 case vdecAspectRatio80_33:
781 break;
782 case vdecAspectRatio18_11:
784 break;
785 case vdecAspectRatio15_11:
787 break;
788 case vdecAspectRatio64_33:
790 break;
791 case vdecAspectRatio160_99:
793 break;
794 case vdecAspectRatio4_3:
796 break;
797 case vdecAspectRatio16_9:
799 break;
800 case vdecAspectRatio221_1:
802 break;
803 }
805 } else if (ret == BC_STS_SUCCESS) {
806 int copy_ret = -1;
807 if (output.PoutFlags & BC_POUT_FLAGS_PIB_VALID) {
809 /*
810 * Init to one less, so that the incrementing code doesn't
811 * need to be special-cased.
812 */
814 }
815
817 output.PicInfo.timeStamp == 0 && priv->
bframe_bug) {
819 "CrystalHD: Not returning packed frame twice.\n");
821 DtsReleaseOutputBuffs(dev, NULL,
FALSE);
823 }
824
826
827 if (priv->
last_picture + 1 < output.PicInfo.picture_number) {
829 "CrystalHD: Picture Number discontinuity\n");
830 /*
831 * Have we lost frames? If so, we need to shrink the
832 * pipeline length appropriately.
833 *
834 * XXX: I have no idea what the semantics of this situation
835 * are so I don't even know if we've lost frames or which
836 * ones.
837 *
838 * In any case, only warn the first time.
839 */
841 }
842
843 copy_ret =
copy_frame(avctx, &output, data, got_frame);
844 if (*got_frame > 0) {
849 }
850 } else {
851 /*
852 * An invalid frame has been consumed.
853 */
855 "invalid PIB\n");
858 }
859 DtsReleaseOutputBuffs(dev, NULL,
FALSE);
860
861 return copy_ret;
862 } else if (ret == BC_STS_BUSY) {
864 } else {
867 }
868 }
869
870
872 {
874 BC_DTS_STATUS decoder_status = { 0, };
880 int free_data = 0;
882
884
886 /*
887 * The use of a drop frame triggers the bug
888 */
890 "CrystalHD: Enabling work-around for packed b-frame bug\n");
893 /*
894 * Delay frames don't trigger the bug
895 */
897 "CrystalHD: Disabling work-around for packed b-frame bug\n");
899 }
900
901 if (len) {
903
905 int ret = 0;
906
909 &in_data, &len,
910 avpkt->
data, len, 0);
911 }
912 free_data = ret > 0;
913
914 if (ret >= 0) {
916 int psize;
919
923 if (index < 0) {
925 "CrystalHD: Failed to parse h.264 packet to "
926 "detect interlacing.\n");
927 } else if (index != len) {
929 "CrystalHD: Failed to parse h.264 packet "
930 "completely. Interlaced frames may be "
931 "incorrectly detected.\n");
932 } else {
934 "CrystalHD: parser picture type %d\n",
937 }
938 } else {
940 "CrystalHD: mp4toannexb filter failed to filter "
941 "packet. Interlaced frames may be incorrectly "
942 "detected.\n");
943 }
944 }
945
946 if (len < tx_free - 1024) {
947 /*
948 * Despite being notionally opaque, either libcrystalhd or
949 * the hardware itself will mangle pts values that are too
950 * small or too large. The docs claim it should be in units
951 * of 100ns. Given that we're nominally dealing with a black
952 * box on both sides, any transform we do has no guarantee of
953 * avoiding mangling so we need to build a mapping to values
954 * we know will not be mangled.
955 */
957 if (!pts) {
958 if (free_data) {
960 }
962 }
964 "input \"pts\": %"PRIu64"\n", pts);
965 ret = DtsProcInput(dev, in_data, len, pts, 0);
966 if (free_data) {
968 }
969 if (ret == BC_STS_BUSY) {
971 "CrystalHD: ProcInput returned busy\n");
974 } else if (ret != BC_STS_SUCCESS) {
976 "CrystalHD: ProcInput failed: %u\n", ret);
977 return -1;
978 }
980 } else {
982 len = 0; // We didn't consume any bytes.
983 }
984 } else {
986 }
987
993 }
994
995 ret = DtsGetDriverStatus(dev, &decoder_status);
996 if (ret != BC_STS_SUCCESS) {
998 return -1;
999 }
1000
1001 /*
1002 * No frames ready. Don't try to extract.
1003 *
1004 * Empirical testing shows that ReadyListCount can be a damn lie,
1005 * and ProcOut still fails when count > 0. The same testing showed
1006 * that two more iterations were needed before ProcOutput would
1007 * succeed.
1008 */
1010 if (decoder_status.ReadyListCount != 0)
1015 } else if (decoder_status.ReadyListCount == 0) {
1016 /*
1017 * After the pipeline is established, if we encounter a lack of frames
1018 * that probably means we're not giving the hardware enough time to
1019 * decode them, so start increasing the wait time at the end of a
1020 * decode call.
1021 */
1026 }
1027
1028 do {
1030 if (rec_ret ==
RET_OK && *got_frame == 0) {
1031 /*
1032 * This case is for when the encoded fields are stored
1033 * separately and we get a separate avpkt for each one. To keep
1034 * the pipeline stable, we should return nothing and wait for
1035 * the next time round to grab the second field.
1036 * H.264 PAFF is an example of this.
1037 */
1041 /*
1042 * This case is for when the encoded fields are stored in a
1043 * single avpkt but the hardware returns then separately. Unless
1044 * we grab the second field before returning, we'll slip another
1045 * frame in the pipeline and if that happens a lot, we're sunk.
1046 * So we have to get that second field now.
1047 * Interlaced mpeg2 and vc1 are examples of this.
1048 */
1050 while (1) {
1052 ret = DtsGetDriverStatus(dev, &decoder_status);
1053 if (ret == BC_STS_SUCCESS &&
1054 decoder_status.ReadyListCount > 0) {
1056 if ((rec_ret ==
RET_OK && *got_frame > 0) ||
1058 break;
1059 }
1060 }
1063 /*
1064 * Two input packets got turned into a field pair. Gawd.
1065 */
1067 "Don't output on next decode call.\n");
1069 }
1070 /*
1071 * If rec_ret == RET_COPY_AGAIN, that means that either we just handled
1072 * a FMT_CHANGE event and need to go around again for the actual frame,
1073 * we got a busy status and need to try again, or we're dealing with
1074 * packed b-frames, where the hardware strangely returns the packed
1075 * p-frame twice. We choose to keep the second copy as it carries the
1076 * valid pts.
1077 */
1081 }
1082
1083
1084 #if CONFIG_H264_CRYSTALHD_DECODER
1086 "h264_crystalhd",
1090 };
1091
1092 AVCodec ff_h264_crystalhd_decoder = {
1093 .
name =
"h264_crystalhd",
1094 .long_name =
NULL_IF_CONFIG_SMALL(
"H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (CrystalHD acceleration)"),
1105 };
1106 #endif
1107
1108 #if CONFIG_MPEG2_CRYSTALHD_DECODER
1109 static AVClass mpeg2_class = {
1110 "mpeg2_crystalhd",
1114 };
1115
1116 AVCodec ff_mpeg2_crystalhd_decoder = {
1117 .
name =
"mpeg2_crystalhd",
1128 .priv_class = &mpeg2_class,
1129 };
1130 #endif
1131
1132 #if CONFIG_MPEG4_CRYSTALHD_DECODER
1134 "mpeg4_crystalhd",
1138 };
1139
1140 AVCodec ff_mpeg4_crystalhd_decoder = {
1141 .
name =
"mpeg4_crystalhd",
1153 };
1154 #endif
1155
1156 #if CONFIG_MSMPEG4_CRYSTALHD_DECODER
1157 static AVClass msmpeg4_class = {
1158 "msmpeg4_crystalhd",
1162 };
1163
1164 AVCodec ff_msmpeg4_crystalhd_decoder = {
1165 .
name =
"msmpeg4_crystalhd",
1166 .long_name =
NULL_IF_CONFIG_SMALL(
"MPEG-4 Part 2 Microsoft variant version 3 (CrystalHD acceleration)"),
1176 .priv_class = &msmpeg4_class,
1177 };
1178 #endif
1179
1180 #if CONFIG_VC1_CRYSTALHD_DECODER
1182 "vc1_crystalhd",
1186 };
1187
1188 AVCodec ff_vc1_crystalhd_decoder = {
1189 .
name =
"vc1_crystalhd",
1200 .priv_class = &vc1_class,
1201 };
1202 #endif
1203
1204 #if CONFIG_WMV3_CRYSTALHD_DECODER
1206 "wmv3_crystalhd",
1210 };
1211
1212 AVCodec ff_wmv3_crystalhd_decoder = {
1213 .
name =
"wmv3_crystalhd",
1224 .priv_class = &wmv3_class,
1225 };
1226 #endif