Waiting for the wind

programming memo in different platforms

「Uncategorized」分類文章彙整

Goto Jpeg

發文作者 cotton5415 於 十一月 18, 2008

Chroma Subsampling YUV subsampling
1×1 4:4:4
1×2 -
2×1 4:2:2
2×2 4:2:0

YUV subsampling 4:2:2, 4:2:0 當中又有不同的取法。比chroma-subsamplingf 複雜。
Reference: impulseadventure

發表於 Uncategorized | 已加上的標籤: , , | 張貼留言 »

UPnP Intel builder Send Variable update

發文作者 cotton5415 於 八月 28, 2007

every state variables of UPnP AVT RCS should be updated to CP by through of LastChange variable 56
every state variables of UPnP AVT RCS should be updated to CP by through of LastChange variable.
the variable (LastChange) should be well formated as <Event ……> </Event>
the codes are as following:

void UPnPFireLastChangeEvent(UPnPMicroStackToken upnptoken, char * service_name, char *var_name, char* val)
{
char *tmpXML = (char *) malloc(strlen(service_name) + strlen(val) + strlen(var_name) + 103 + 20) ;
char *eventXML = NULL;

sprintf( tmpXML , “<Event xmlns=\"urn:schemas-upnp-org:metadata-1-0/%s/\">"
“<InstanceID val=\"0\">"
“<%s val=\"%s\"/>"
“</InstanceID></Event>", service_name,var_name,val);

eventXML = (char*)malloc(ILibXmlEscapeLength(tmpXML)+1);
if ( tmpXML == NULL || eventXML == NULL)
return;

ILibXmlEscape(eventXML,tmpXML);

if ( ! strncmp(“AVT",service_name,3) )
{
UPnPSetState_AVTransport_LastChange(UPnPmicroStack, eventXML);
}
else if ( ! strncmp(“RCS",service_name,3) )
{
UPnPSetState_RenderingControl_LastChange(UPnPmicroStack, eventXML);
}
else
{
fprintf(stderr,"%s %d: Service Nmae should be \"AVT\" or \"RCS\"\n",__FILE__,__LINE__);
}

if ( eventXML) free (eventXML);
if ( tmpXML ) free ( tmpXML);
}

發表於 Uncategorized | 張貼留言 »

CTorrent reference

發文作者 cotton5415 於 五月 16, 2007

a crazy guy document CTorrent.
yaoxuchen’s blog

發表於 Uncategorized | 張貼留言 »

 
Follow

Get every new post delivered to your Inbox.