[gstreamer-bugs] [Bug 327028] MS Video 1 palettized AVI

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Sun Feb 19 14:14:28 PST 2006


Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=327028
 GStreamer | gst-plugins-base | Ver: HEAD CVS





------- Comment #8 from Fabrizio Gennari  2006-02-19 22:14 UTC -------
Tim, you are probably mixing two different problems here.

The addition of the "palette_data" caps is done by the line

+      palette = strf_data;

Later on, the (already existing) code checks if the palette pointer is not
null, and, in that case, creates the "palette_data" caps.

  /* palette */
  if (palette && GST_BUFFER_SIZE (palette) >= 256 * 4) {
    GstBuffer *copy = gst_buffer_copy (palette);
[...]
    gst_caps_set_simple (caps, "palette_data", GST_TYPE_BUFFER, copy, NULL);

The justification for "palette_in_frame" is different. ffmpeg's decoders put
the palette as part of their output buffer, independent of GStreamer. The
result is, in gst-ffmpeg the resulting GST_BUFFER_DATA has the palette appended
to it. GStreamer decodres don't.

This is reflected in gstffmpegcolorspace: ffmpeg's avpicture_get_size returns
the size of the buffer in bytes, including the palette bytes, just as every
buffer output by a ffmpeg decoder. gstffmpegcolorspace deals with GStreamer
buffers, which do not have those bytes. Therefore, it has to correct it by
subtracting the number of palette bytes.

The "palette_in_frame" caps (which is bool) set to TRUE just means: this buffer
was produced by an ffmpeg decoder, so the number of bytes computed by
avpicture_get_size is right and does not have to be corrected.

An alternative to the "palette_in_frame" caps would be:
- gst-ffmpeg trims the GST_BUFFER_DATA by removing the palette bytes added by
ffmpeg (which are totally unnecessary, since the palette is already in the
"palette" caps)
- gstffmpegcolorspace trims the size, unconditionally, as it does now


-- 
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.




More information about the Gstreamer-bugs mailing list