Thank you very much for your help, can you please send the source code as well,
so i can compare it, and use it in a way suitable for my applcation.
Thanks again,
Uros
Matthew Fullerton <[EMAIL PROTECTED]> wrote:
Something else I forgot to mention - the coefficients stored in libmpeg2
are not in a regular 8x8 order, but something like this:
0, 4, 1, 5, 2, 6, 3, 7
32, 36, 33, 37, 34, 38, 35, 39
8, 12, 9, 13, 10, 14, 11, 15
40, 44, 41, 45, 42, 46, 43, 47
16, 20, 17, 21, 18, 22, 19, 23
48, 52, 49, 53, 51, 54, 53, 55
24, 28, 25, 29, 26, 30, 27, 31
56, 60, 57, 61, 58, 62, 59, 63
You can probably see the pattern there, things increment in alternate
columns and then go back and do the same in the empty columns. The same
process happens for rows too. You may therefore need to do some
rearranging of your output for the values to make sense. I figured this
out by using custom quantization matrices in the input stream.
Again, its been a while since I've done this so if I'm wrong please
someone correct me.
Matt
Matthew Fullerton wrote:
> What we were doing was multiplying the coefficients by some externally
> set value. This value was dependent on the position of the block within
> the picture and the position of the coefficient within the block.
>
> The way we did it was to read in values in decode.c, and store them in
> similar data structures to those already used for the quantization
> tables inside
>
>> mpeg2_state_t mpeg2_parse (mpeg2dec_t * mpeg2dec)
>>
> but that probably isn't important for what you're doing.
>
> Where we multiply these values by the coefficients (along with the
> regular quantization multiplication) is in slice.c, inside the functions
> static void get_intra_block_B14, static void get_intra_block_B15,
> get_non_intra_block. The latter deals with the content of inter blocks
> (P and B). Within each of these functions the multiplication can happen
> in one of two places, depending on the return value of an IF statement.
> Also depending on the stream only the B14 or B15 function will be
> executed. The result is that I use similar code in 6 places. At each of
> those places I get info on where in the picture I am using
> decoder->height, ->width, ->offset and ->v_offset. You can from there of
> course output the source values before they get multiplied by outputting
> tab->level or whatever the source value is inside the function (see the
> val=statement).
>
> The variable cc will tell you whether you are dealing with a luminance
> block or a chrominance block.
>
> If its any help I can send you our code, there is lots in there that you
> won't need but it should make it obvious where to look. Just looking at
> the source code for the functions I mention above should make it obvious
> what you need to do.
>
> This is based on my own experience... others are free to correct my
> mistakes!
>
> Hope it is of some help,
> Matt
>
> uros damnjanovic wrote:
>
>> Sorry, but i still havent found the way to do it. Instead of
>> extracting the low level features directly from the compressed domain,
>> i am using other approach, that's not dealing so much with compressed
>> domain. I am using some module, that is devloped at our group, that is
>> extracting these features, and i am using results of this module as my
>> inputs.
>>
>> Maybe if you try to contact this guy that answerd me first, ha said
>> that they were doing this, so maybe he can help you..
>>
>>
>> */Boris Mansencal /* wrote:
>>
>> Hi,
>>
>> Have you found where in libmpeg2 source code the DCT coefficients
>> can be
>> extracted ?
>> I have not yet dug in libmpeg2 source code, so I would be very
>> interested if someone knows the code enough to give me some
>> hints... (I
>> will have to extract motion vectors too...)
>>
>> Boris.
>>
>>
>> Matthew Fullerton wrote:
>>
>> >It is possible - I am a bit busy right now but could talk by
>> email in a
>> >week or so, maybe someone will help you before then.
>> >We did this a few years ago to multiply the coefficients, the same
>> >process could be used to extract them using libmpeg2.
>> >
>> >http://www.eri.harvard.edu/faculty/peli/papers/JSID2006MPEGmanuscript.pdf
>> >
>> >Matt
>> >
>> >uros damnjanovic wrote:
>> >
>> >
>> >>Hi everyone, i need to extract some low level features from the
>> each
>> >>frame of the video, and in order to do that, i need to have DCT
>> >>coefficents for each frame. I want to know if that is possible,
>> and if
>> >>someone have the idea or some advice, i would be very thankfull.
>> >>
>> >>
>>
>>
>> ------------------------------------------------------------------------
>> Now that's room service! Choose from over 150,000 hotels
>> in 45,000 destinations on Yahoo! Travel
>>
>> to find your fit.
>> ------------------------------------------------------------------------
>>
>> -------------------------------------------------------------------------
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share your
>> opinions on IT & business topics through brief surveys - and earn cash
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Libmpeg2-devel mailing list
>> Libmpeg2-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/libmpeg2-devel
>>
>>
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Libmpeg2-devel mailing list
> Libmpeg2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libmpeg2-devel
>
>
---------------------------------
The fish are biting.
Get more visitors on your site using Yahoo! Search Marketing.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Libmpeg2-devel mailing list
Libmpeg2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmpeg2-devel