Re: [mpeg2-dev] having probleing with frame rate while testing by mpeg2dec.c

2006-07-06 Thread Keith Winstein
Hi Elen, libmpeg2's job doesn't really extend to the display of the decoded sequences beyond the simple example code you saw. In a full MPEG-2 video decode-and-display application, you would need to display the decoded fields or frames at intervals separated by the field period or frame period

Re: [mpeg2-dev] Macroblock Size

2006-10-12 Thread Keith Winstein
On Thu, 12 Oct 2006, Balaji Raman wrote: > I want to count the number of bits for each macroblock after VLD and IQ > task execution, also I want to count the number of bits for each > macroblock after IDCT and MC execution. Can you advice me how to do > this? Hi Balaji, Sounds fun! You should

Re: [mpeg2-dev] hello...finiding frame sizes

2007-04-04 Thread Keith Winstein
Hi Anand, Not sure exactly what you mean. Are you asking about: (1) The number of bits required to code each picture (e.g., "911376 bits for the I frame, 115936 for the B frame after it, etc.")? For this, you'll have to call mpeg2_getpos() to get the position in the stream as you hit PICTURE h

Re: [mpeg2-dev] hello...finiding frame sizes

2007-04-04 Thread Keith Winstein
anyways i am really glad for ur quick reply. >> If i get any more doubts..i will try to >> mail you. >> >> Thanks & regards >> >> Anand. >> >> >> >> >> On 4/4/07, Keith Winstein <[EMAIL PROTECTE

Re: [mpeg2-dev] hello...finiding frame sizes

2007-04-04 Thread Keith Winstein
i take the difference of > mpeg2_getpos() return values when it hits the STATE_PICTURE(when the picture > header is found) and STATE_SLICE(when the last slice of a picture has been > found) to get the exact frame size. > Thanks in advan

Re: [mpeg2-dev] Seek and skip

2007-04-04 Thread Keith Winstein
Hi Sebastian, Unfortunately, MPEG-2 isn't quite this simple. The approach you're describing will only work on a *closed* GOP. In normal (non-closed) GOPs, decoding the first two B frames will require access to the previous P frame -- from the previous GOP. Here's an example of what you'll see

Re: [mpeg2-dev] hello...finiding frame sizes

2007-04-04 Thread Keith Winstein
ore if > required. > > so i need calrification whether what i > am doing is correct or not.. > I can use the secondary method u suggested but i am using,libmpeg2 already > for getting the other info like chroam_width etc.. > >

Re: [mpeg2-dev] Seek and skip

2007-04-06 Thread Keith Winstein
Hi Keith, > > Thanks for this example. In this example, would the first picture that is > displayed > be the P-picture in the second GOP followed by the I picture? I am getting a > little > confused about the display order of the all the frames. > > Thanks > Dinkar &g

Re: [mpeg2-dev] Seek and skip

2007-04-06 Thread Keith Winstein
me, decode it (it stands alone) and display the *previously encountered* "reference frame" if one exists. (4) If you hit a P-frame, decode it (using the previous "reference frame") and display the previously encountered "reference frame" if one exists. -K

Re: [mpeg2-dev] why can not recognize real-time mpeg2 dat a from satelite receiver?

2007-04-24 Thread Keith Winstein
Hello, Can you please post a section of this file on the Internet so we can examine it? Maybe you've got a transport stream instead of an elementary stream or something like that. -Keith On Wed, 25 Apr 2007, hdzhang wrote: > hi, now I receive mpeg2 data from satelite receiver. > But when I ru

Re: [mpeg2-dev] why can not recognize real-time mpeg2 dat a from satelite rece iver?

2007-04-24 Thread Keith Winstein
Allison, I have no idea. Please post the file somewhere or we won't be able to help you. -Keith On Wed, 25 Apr 2007, hdzhang wrote: Keith, I used a "MPEG push demultiplexer". Is data from this demultiplexer TS or ES? Allison ??2007-04-25??"Keith Winstei

Re: [mpeg2-dev] why can not recognize real-time mpeg2 dat a from satelite rece iver?

2007-04-24 Thread Keith Winstein
if (info->discard_fbuf) ((struct fbuf_s *)info->discard_fbuf->id)->used = 0; break; default: break; }//end switch } while (bMem!=2); return S_OK; } ??2007-04-25??"Keith Win

Re: [mpeg2-dev] Regarding Syncronization of video in mpeg2dec.

2007-05-02 Thread Keith Winstein
Yugandhar, libmpeg2 only decodes MPEG-2 part 2 (video). It doesn't have anything to do with MPEG audio. And it only does the decoding process, not the output process (which would include synchronization with other streams, like audio, and timing). If you want an integrated decoder, try vlc (ww

Re: [mpeg2-dev] why de-interlace so slow(sawtooth obvious)?

2007-05-07 Thread Keith Winstein
Allison, I don't understand exactly what you mean by "SD DV mpeg2 data". DV (aka, MiniDV) is a different format that does not use MPEG-2. Assuming you're just referring to interlaced content, there is no perfect way to display interlaced material on a progressive display like a computer moni

Re: [mpeg2-dev] why de-interlace so slow(sawtooth obvious)?

2007-05-08 Thread Keith Winstein
Allison, On Wed, 9 May 2007, hdzhne wrote: Is "info->display_fbuf->buf" one field or one frame data (my mpeg2 source is interlaced)? I think it's always a frame. (Not 100% sure in the case of field pictures, but nobody seems to use those. I think it's still a frame even when field pictures

Re: [mpeg2-dev] picture structure is FRMAE, still need do de-interlace?

2007-05-14 Thread Keith Winstein
Allison, You're a bit confused on the terminology. MPEG-2 can use FRAME PICTURES or FIELD PICTURES. If it uses frame pictures, they can be INTERLACED or PROGRESSIVE. Much ATSC HDTV content is sent as interlaced frame pictures. The resulting frame you get from libmpeg2 has the odd field on the

Re: [mpeg2-dev] picture structure is FRMAE, still need do de-interlace?

2007-05-14 Thread Keith Winstein
On Mon, 14 May 2007, hdzhne wrote: > So, does info->diaplay_fbuf->buf in libmpeg2 store odd filed followed by > even field if HDTV content is sent as interlaced frame picture? Just I > need reorder two fields to one full frame which can be displayed > directly? buf[] is an array of three fram

Re: [mpeg2-dev] Decode MPEG4 Stream

2007-08-19 Thread Keith Winstein
Johann, You can have ffmpeg decode a stream. On Linux, for example, just have it read from /dev/stdin and pipe the stream to it. Regards, Keith On Sun, 19 Aug 2007, Johann Horvat wrote: > Dear libmpeg2 people, > > I know that libmpeg2 is not able to decode MPEG4 streams, but can please tell >

Re: [mpeg2-dev] Doubts regarding the Decoding time for Picture headers

2008-02-14 Thread Keith Winstein
Hi Krishna, Sorry, I don't understand your question. Are you talking about the computation time required to decode the headers, or literally the decoding time (aka, when must a particular MPEG-2 picture be decoded)? I guess the real question is, what are you trying to do? I think if you gave us

Re: [mpeg2-dev] Doubts regarding the Decoding time for Picture headers

2008-02-14 Thread Keith Winstein
Is > that a fixed time for all the frames or pictures...if it is so, what is the > general time or how do i get to know in the libmpeg2 [mpeg2dec 0.4.1]. > > I am trying to find the decoding time for a GOP using the mpeg2dec.c > > Cheers > Krishna Prasad > > On Fri,

Re: [mpeg2-dev] Doubts regarding the Decoding time for Picture headers

2008-02-14 Thread Keith Winstein
; > Cheers > Krishna Prasad > > On Fri, Feb 15, 2008 at 2:23 AM, Keith Winstein <[EMAIL PROTECTED]> wrote: > >> Hi Krishna, >> >> Thanks for clarifying. Better not to call that the "decoding time," which >> is a specific defined term in the MPEG-2

Re: [mpeg2-dev] Clarifications regarding the Decoding Time

2008-02-22 Thread Keith Winstein
Hi Krishna, That sounds plausible. Make sure you're running mpeg2dec with "-o null" so that none of your time is consumed with drawing (aka displaying) the frame. It's hard to know for sure without seeing the code, but if the output is plausible and if adding up all the individual times is clo

Re: [mpeg2-dev] Clarification regarding the relationship between Decoding Time and Frame Size

2008-02-28 Thread Keith Winstein
Hi Krishna, There's no exact formula -- it's very hard to exactly quantify the performance of a general-purpose computer. In general, the bigger the frame (in resolution), the more work it'll take to decode. The bigger the frame (in number of bits used to code it), the longer it'll take to decod

Re: [mpeg2-dev] Clarification regarding the Decoding Time and Frame Size

2008-02-29 Thread Keith Winstein
Hi Krishna, I did some experiments on a Pentium 4 at 3 GHz with libmpeg2 0.4.1, using some MPEG-2 video streams I had lying around of various resolutions. Here are the results: Luminance resolution -- speed 720x480 -- 319 fps 1280x720 -- 124 fps

Re: [mpeg2-dev] Clarification regarding the Decoding Time and Frame Size

2008-02-29 Thread Keith Winstein
est, Keith On Fri, 29 Feb 2008, Krishna Prasad wrote: > Hi Keith > > Thanks for your earliest reply. > I will look in to the details of whatever you had sent.If I have any doubts, > I will keep you posted. > > Regards > Krishna Prasad > > > On Fri, Feb 29, 2008 a

Re: [mpeg2-dev] "dest" parameter in mpeg2_idct_copy and mpeg2_idct_add functions

2008-04-16 Thread Keith Winstein
Hi Mateus, You're right that the literal output of the inverse DCT is saturated to the range [-256 .. 255]. MPEG-2 pt. 2 calls this the "transform data," f[y][x]. See clause 7.5. Meanwhile, the motion vectors are applied to other pictures to produce blocks of "prediction samples," p[y][x]. Th

Re: [mpeg2-dev] extract duration from MPEG files

2008-05-01 Thread Keith Winstein
On Thu, 1 May 2008, Thomas Richards wrote: > I'm attempting to write a small application that extracts the durations > from MPEG2 files. I've been looking at the documentation and the > samples, and have come up with a simple app that calls "mpeg2_parse()" > until it returns "STATE_GOP", and when

Re: [mpeg2-dev] extract duration from MPEG files

2008-05-02 Thread Keith Winstein
On Fri, 2 May 2008, Thomas Richards wrote: > I now have a first-pass solution working. Basically I iterate over the > entire file, and count the number of times I get STATE_PICTURE from the > mpeg2_parse function. > > This works, but it's horribly slow. A 24 minute clip (400 MB on disk) > takes

Re: [mpeg2-dev] frame_rate_extension_n

2008-05-04 Thread Keith Winstein
Hi Craig, On #1, I think we're good -- you can only have one sequence_extension following a sequence_header. See 13818-2, clause 6.3.1 ("sequence_extension() shall only occur immediately following a sequence_header()"). On #2, I think that's a real bug (that would, as you point out, only affe

Re: [mpeg2-dev] MPEG-PS (DVD) Atomizer?

2009-02-26 Thread Keith Winstein
Hi Hibiki, We can help walk you through this, and I'm happy to help you with some demo code if you'd like. I don't know of any existing program that meets your needs. It might help if you explained what the overarching goal is. The problem is that MPEG-2 may be more interdependent than you rea

Re: [mpeg2-dev] MPEG files with audio

2009-07-15 Thread Keith Winstein
Hi Gus, libmpeg2 itself can only parse an MPEG video elementary stream -- video only. Within the MPEG-2 world, a stream that combines video and audio is an MPEG-2 systems stream -- either a transport stream or a program stream. You can demultiplex these with the mpeg2dec and extract_mpeg2 ex

Re: [mpeg2-dev] unable to decode properly

2009-07-15 Thread Keith Winstein
Hi Gus, If I had to make a wild guess, you're trying to play an MPEG-2 system stream (a transport stream or program stream). sample2.c only works on an MPEG-2 video elementary stream -- the raw video that is multiplexed into the system stream. Does the file play back properly with mplayer o

Re: [mpeg2-dev] Commercial license or LGPL

2009-07-16 Thread Keith Winstein
Hi Gus, FFmpeg's libavcodec can also decode MPEG-2 video and is licensed under the LGPL. Best, Keith On Thu, 16 Jul 2009, Gus Issa wrote: Hello,   Is there a library out there that is similar to libmpeg2 but available for commercial licensing (not GPL)? Or can libmpeg2 be licensed non-GPL?

Re: [mpeg2-dev] Fwd: segfault on bad pictures / low link power

2009-09-08 Thread Keith Winstein
Hello İşbaran, If you feed libmpeg2 bad data (e.g., if you're dropping packets and not replacing them), you will certainly see green blotches -- that's generally what you see when there's missing intraframe data. (There are more sophisticated ways of doing error concealment in the presence o

Re: [mpeg2-dev] Fwd: segfault on bad pictures / low link power

2009-09-22 Thread Keith Winstein
you actually want usable video, you need some of the practical improvements above... Happy hunting, Keith On Tue, 22 Sep 2009, İşbaran Akçayır wrote: 2009/9/8 Keith Winstein Hello İşbaran, Helloes again, If you feed libmpeg2 bad data (e.g., if you're dropping packets and

Re: [mpeg2-dev] Malformed image

2009-12-25 Thread Keith Winstein
Andrey, Please post foo.mpg somewhere we can get to it as well, please. We need that to see if it's a valid MPEG-2 video elementary stream. Just the first 10 megabytes is enough. Just to emphasize: libmpeg2 decodes MPEG-2 video elementary streams (streams that can contain video only). If the s

Re: [mpeg2-dev] Exception in mpeg2_idct_copy_sse2

2010-05-01 Thread Keith Winstein
Hi Matthew, We're here. Unfortunately I don't have Windows and would have a hard time trying to reproduce this problem for you. (It works fine for me with gcc on Linux; I recognize that's not very helpful to know.) Are you able to compile the "mpeg2dec" program that ships with libmpeg2? Does i

Re: [mpeg2-dev] mpeg2_parse always returns STATE_INVALID

2011-06-15 Thread Keith Winstein
Daniel, It's hard to help you debug this without knowing what you are feeding in. To be clear -- you are using a valid MPEG-2 video elementary stream that plays perfectly fine with mpeg2dec and the other sample decoders distributed with libmpeg2? Maybe if you can post a sample of your file, I can

Re: [mpeg2-dev] How to reduce Intra block DC bits prior to IDCT

2011-08-03 Thread Keith Winstein
Hi pebble, I'm not sure exactly where you're getting the [0, 32768] (the DC component can be negative), but I think you may probably barking up the wrong tree. IEEE 1180 only defines the IDCT statistically, so different MPEG-2 decoders can produce slightly different output. libmpeg2 may even produ