[FFmpeg-devel] [Toy] LucasArts SMUSH demuxer and decoder

Michael Niedermayer michaelni
Thu Jan 29 12:41:13 CET 2009


On Thu, Jan 29, 2009 at 10:47:58AM +0200, Kostya wrote:
> Again, for the record and not for review.
> 
> I just took very old patch and extended it to decode palettized LucasArts FMVs
> from the games like Full Throttle, Curse of Monkey Island, The Dig, etc.
> 
> I would be glad if somebody pick and finish it (there are minor glitches during
> decoding and fade in/fade out scenes are rendered as madly flipping frames
> instead; oh, and the code style is rather bad).

you arent escaping an automated review though, just a manual one :)

tabs
ffmpeg_smush_full.patch:1789:+	    /* TODO: uncomment the below code when there is audio api
ffmpeg_smush_full.patch:1790:+	       support for larger/dynamic frame sizes. */

These functions may need av_cold, please review the whole patch for similar functions needing av_cold
ffmpeg_smush_full.patch:308:+static void init_sizes(sanm_ctx* pctx, int width, int height)
ffmpeg_smush_full.patch:321:+static void init_buffers(sanm_ctx* pctx)
ffmpeg_smush_full.patch:340:+static int decode_init(AVCodecContext* pav_ctx)
ffmpeg_smush_full.patch:374:+static int decode_end(AVCodecContext* pav_ctx)
ffmpeg_smush_full.patch:1615:+static int init_vinfo(AVStream* pstream, sanm_ctx *pctx)
ffmpeg_smush_full.patch:1643:+static int init_ainfo(AVStream* pstream, sanm_ainfo* painfo)

can be simplified to ++
ffmpeg_smush_full.patch:403:+    pheader->codec = *pinput; pinput += 1;
ffmpeg_smush_full.patch:404:+    pheader->rotate_code = *pinput; pinput += 1;

Missing context in av_log
ffmpeg_smush_full.patch:991:+        av_log(NULL,0,"Codec 37 compr 1: TODO\n");
ffmpeg_smush_full.patch:1168:+        av_log(NULL,0,"Codec 47 compr 1: TODO\n");
ffmpeg_smush_full.patch:1266:+        av_log(NULL,0,"Unknown codec %d\n",codec);
ffmpeg_smush_full.patch:1278:+            av_log(NULL,0,"Incorrect size (%d|%X, %d)\n",size,size,frame_end-pinput);
ffmpeg_smush_full.patch:1683:+        av_log(NULL,0,"Wrong magic\n");
ffmpeg_smush_full.patch:1691:+        av_log(NULL,0,"wrong vinfo\n");
ffmpeg_smush_full.patch:1696:+        av_log(NULL,0,"wrong vinfo\n");
ffmpeg_smush_full.patch:1708:+        av_log(NULL,0,"error initing vinfo\n");
ffmpeg_smush_full.patch:1714:+        av_log(NULL,0,"wrong ainfo\n");

Non static with no ff_/av_ prefix
ffmpeg_smush_full.patch:1388:+AVCodec sanm_decoder =
ffmpeg_smush_full.patch:1825:+AVInputFormat sanm_demuxer =

missing } prior to else
ffmpeg_smush_full.patch:181:+    else if (edge_max == y)
ffmpeg_smush_full.patch:185:+    else if (!x)
ffmpeg_smush_full.patch:189:+    else if (edge_max == x)
ffmpeg_smush_full.patch:193:+    else
ffmpeg_smush_full.patch:212:+    else if ((top_edge == edge0 && bottom_edge != edge1) ||
ffmpeg_smush_full.patch:217:+    else if ((left_edge == edge0 && right_edge != edge1) ||
ffmpeg_smush_full.patch:222:+    else if ((top_edge == edge0 && bottom_edge == edge1) ||
ffmpeg_smush_full.patch:240:+    else
ffmpeg_smush_full.patch:444:+    else if (2 == rotate_code)
ffmpeg_smush_full.patch:538:+    else
ffmpeg_smush_full.patch:561:+    else
ffmpeg_smush_full.patch:659:+        else
ffmpeg_smush_full.patch:688:+        else
ffmpeg_smush_full.patch:1204:+    else
ffmpeg_smush_full.patch:1317:+    else

{ should be on the same line as the related previous statement
ffmpeg_smush_full.patch:178:+    {
ffmpeg_smush_full.patch:182:+    {
ffmpeg_smush_full.patch:186:+    {
ffmpeg_smush_full.patch:190:+    {
ffmpeg_smush_full.patch:194:+    {
ffmpeg_smush_full.patch:209:+    {
ffmpeg_smush_full.patch:214:+    {
ffmpeg_smush_full.patch:219:+    {
ffmpeg_smush_full.patch:226:+    {
ffmpeg_smush_full.patch:236:+    {
ffmpeg_smush_full.patch:241:+    {
ffmpeg_smush_full.patch:254:+    {
ffmpeg_smush_full.patch:259:+        {
ffmpeg_smush_full.patch:267:+            {
ffmpeg_smush_full.patch:274:+                {
ffmpeg_smush_full.patch:277:+                    {
ffmpeg_smush_full.patch:284:+                    {
ffmpeg_smush_full.patch:291:+                    {
ffmpeg_smush_full.patch:298:+                    {
ffmpeg_smush_full.patch:346:+    {
ffmpeg_smush_full.patch:397:+    {
ffmpeg_smush_full.patch:426:+    {
ffmpeg_smush_full.patch:441:+    {
ffmpeg_smush_full.patch:445:+    {
ffmpeg_smush_full.patch:457:+    {
ffmpeg_smush_full.patch:459:+        {
ffmpeg_smush_full.patch:473:+    {
ffmpeg_smush_full.patch:483:+    {
ffmpeg_smush_full.patch:493:+    {
ffmpeg_smush_full.patch:495:+        {
ffmpeg_smush_full.patch:508:+    {
ffmpeg_smush_full.patch:517:+    {
ffmpeg_smush_full.patch:519:+        {
ffmpeg_smush_full.patch:528:+    {
ffmpeg_smush_full.patch:539:+    {
ffmpeg_smush_full.patch:554:+    {
ffmpeg_smush_full.patch:562:+    {
ffmpeg_smush_full.patch:578:+    {
ffmpeg_smush_full.patch:594:+    {
ffmpeg_smush_full.patch:600:+        {
ffmpeg_smush_full.patch:614:+        {
ffmpeg_smush_full.patch:656:+        {
ffmpeg_smush_full.patch:660:+        {
ffmpeg_smush_full.patch:678:+    {
ffmpeg_smush_full.patch:684:+        {
ffmpeg_smush_full.patch:689:+        {
ffmpeg_smush_full.patch:710:+    {
ffmpeg_smush_full.patch:723:+    {
ffmpeg_smush_full.patch:725:+        {
ffmpeg_smush_full.patch:741:+    {
ffmpeg_smush_full.patch:759:+    {
ffmpeg_smush_full.patch:766:+    {
ffmpeg_smush_full.patch:1116:+            {
ffmpeg_smush_full.patch:1307:+    {
ffmpeg_smush_full.patch:1312:+    {
ffmpeg_smush_full.patch:1318:+    {
ffmpeg_smush_full.patch:1323:+    {
ffmpeg_smush_full.patch:1368:+    {
ffmpeg_smush_full.patch:1373:+    {
ffmpeg_smush_full.patch:1378:+    {
ffmpeg_smush_full.patch:1508:+    {
ffmpeg_smush_full.patch:1521:+    {
ffmpeg_smush_full.patch:1548:+    {
ffmpeg_smush_full.patch:1579:+    {
ffmpeg_smush_full.patch:1588:+    {
ffmpeg_smush_full.patch:1593:+        {
ffmpeg_smush_full.patch:1682:+    {
ffmpeg_smush_full.patch:1690:+    {
ffmpeg_smush_full.patch:1695:+    {
ffmpeg_smush_full.patch:1702:+    {
ffmpeg_smush_full.patch:1707:+    {
ffmpeg_smush_full.patch:1713:+    {
ffmpeg_smush_full.patch:1720:+    {
ffmpeg_smush_full.patch:1723:+        {
ffmpeg_smush_full.patch:1728:+        {
ffmpeg_smush_full.patch:1747:+    {
ffmpeg_smush_full.patch:1749:+        {
ffmpeg_smush_full.patch:1759:+        {
ffmpeg_smush_full.patch:1764:+                {
ffmpeg_smush_full.patch:1778:+            {
ffmpeg_smush_full.patch:1794:+            {
ffmpeg_smush_full.patch:1799:+            {

 Non doxy comments
ffmpeg_smush_full.patch-1642-+/*
ffmpeg_smush_full.patch:1643:+static int init_ainfo(AVStream* pstream, sanm_ainfo* painfo)
--
--
ffmpeg_smush_full.patch-1791-+/*
ffmpeg_smush_full.patch:1792:+        case MKBETAG('W', 'a', 'v', 'e'):
ffmpeg_smush_full.patch-1793-+            if (av_new_packet(ppacket, size + FF_INPUT_BUFFER_PADDING_SIZE))

Missing changelog entry (ignore if minor change)

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you really think that XML is the answer, then you definitly missunderstood
the question -- Attila Kinali
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090129/f624b068/attachment.pgp>



More information about the ffmpeg-devel mailing list